1

Lets start with my goal: I want to control my raspberry pi tracked vehicle via wifi using nodejs. See the attached picture, it is awesome already.

I've got the following working:

  • rolling tracked vehicle chassis
  • raspberry pi with raspbian
  • usb powerbank with specs: 5000mAh, output 1: 5v 1A, output 2: 5v, 500MA
  • wifi usb
  • camera module with a working stream displayed within jade
  • nodejs/socket.io/rpi-gpio application accessible over my local lan/wifi

What I think I need to do:

Is the above list correct and complete? Please verify.

Additional questions:

  • is it possible to power everything just using the powerbank? Is it powerful enough?
  • Instead of switching the engines on/off, is it possible to control the speed of the engines connecting the engines directly to the breadboard, or do I need a speed-controller for that? If so, can someone point me to a speed-controller I can connect 2 engines to (pi compatible)?

I would love to hear remarks or advice, thanks!

enter image description here

1

You'd need some transistors to control the battery power going to the motors. You need some diodes to protect the transistors. If you shut down an induction motor, the collapsing magnetic field will create a current spike into the other direction. These will do fine http://www.kiwi-electronics.nl/1N4001-Diode-5-stuks?search=diode

Also, you say the motors are 3V, but the battery holder will provide 6V.

To control the speed you could PWM the pins controlling the motor.

Since those kinds of motors can use up-to 2A amps of current, I don't think your powerbank is powerful enough to run both the Pi and 2 motors. Unless you can find some way to limit the max current of the motors. Otherwise, too the power bank would not be able to provide enough power, and the voltage will probably drop, which will most likely crash the Pi. And maybe even damage the powerbank.

PS cool rover you have there my fellow Dutchman.

  • Thanks a lot for your answer Gerben. So am I good to go if I buy in addition to the list above: transistors(kiwi-electronics.nl/…), the diodes you mention and this set of cables (kiwi-electronics.nl/raspberry-pi/gpio-accessoires/…)? – Maarten Hartman Jan 8 '14 at 17:48
  • Darlington transistors is a good choice by you (instead of normal transistors). Also, that specific part already has a diode inside it, so you could leave out the diodes. You do however need a resistor for between the pis gpio and the base of the transistor. Can't think of anything else at the moment – Gerben Jan 8 '14 at 23:01
  • Okay, thanks a lot for your advice. Could you point me to a resistor(on a webshop) for between the pis gpio and the base of the transistor? I really want to make sure I buy the right things :) I will accept your advice as an answer. To other readers: you are still welcome to give advice, could be useful to everyone. – Maarten Hartman Jan 9 '14 at 8:47
  • from this list: kiwi-electronics.nl/prototyping/weerstanden?page=1 - which set would you recommend? This is the full spec list of both engines: pololu.com/product/77/specs – Maarten Hartman Jan 9 '14 at 20:52
  • 1
    1K ohm. kiwi-electronics.nl/prototyping/weerstanden/… . The TIP120 has a gain of 1000, so to allow for 2A of current to the motor, you'd need 2mA of current to the base. Ohms law; R=V/I => 3.3/0.002 => 1.6K ohms. Just add a some leeway by rounded that down to 1K ohm (resulting in 3.3mA of current to the base, which the Pi can source without a problem). – Gerben Jan 10 '14 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.