rwaldron / johnny-five

JavaScript Robotics and IoT programming framework, developed at Bocoup.
http://johnny-five.io
Other
13.3k stars 1.77k forks source link

does this motor driver work with johnny? #995

Closed nofear87 closed 8 years ago

nofear87 commented 8 years ago

The driver is the Pololu Dual VNH5019

https://www.pololu.com/product/2507

dtex commented 8 years ago

Yes, use the 3-pin example:

http://johnny-five.io/examples/motor-3-pin/

The fritzing diagram shows a shield (which is not very helpful TBH) but the code will work.

If this answers your question, feel free to close the issue.

nofear87 commented 8 years ago

thanks, I will give it a try! Is it also possible to read out the encoders?

I have used this motors:

https://www.pololu.com/product/1447

to read the currents of the shield I only have to do an analog read?

dtex commented 8 years ago

Hi @nofear87 sorry for the lack of response on this. We are considering adding support for encoders right into the motor class but that probably won't happen too soon. For now, you would have to write your own code to work with the two inputs. It's not something I've looked to deeply into... maybe someone else here knows more or has some examples?

dtex commented 8 years ago

@nofear87 I'm assuming that the 3-pin example worked for you. Is it okay to close this ticket?

nofear87 commented 8 years ago

I need some time for testing. Then I will give some feedback! Thanks!

dtex commented 8 years ago

@nofear87 I'm going to go ahead and close this. If for some reason the 3-pin example didn't work, feel free to re-open.

chironxie commented 7 years ago

@nofear87 Hello guys, did that 3-pins example worked for you? I got into trouble while working with "Pololu Dual VNH5019"

rwaldron commented 7 years ago

@cheerx hope this helps:

Name Pin Name/Number J5 Class & Pin
M1INA 2 Motor/Motors, dir
M1INB 4 Motor/Motors, cdir
M1PWM 9 Motor/Motors, pwm
M2INA 7 Motor/Motors, dir
M2INB 8 Motor/Motors, cdir
M2PWM 10 Motor/Motors, pwm
M1EN/DIAG 6 Sensor/Sensors
M2EN/DIAG 12 Sensor/Sensors
M1CS A0 Sensor/Sensors
M2CS A1 Sensor/Sensors

Using this shield to...

nofear87 commented 7 years ago

@dtex are there any upddates regarding the implementation of the encoders?

dtex commented 7 years ago

No updates. I have a project the requires encoders (using hall effect sensors), but it's still on my to-do list.

nofear87 commented 6 years ago

@dtex any updates? Did you have a nice solution for a soft start of the motors? With low pwm they did not run...I ever have to start with high pwm and then decrease it until I reach the target pwm. Maybe there is a smart algorithm for that?

dtex commented 6 years ago

No, I haven't worked on encoders.

I don't recall the soft start issue, but we don't have a fix for that. It would be a nice addition to the motor class though. I'll add that to the wish list.