I am working on a robotics project for a competition, and I need to control 3 continuous-rotation servo motors from a Raspberry Pi A+.
I've planned it all out with a bill of materials and everything, and have ordered some transistors (2N2222, from Pimoroni) to drive the servo motors, as described in this tutorial: http://www.doctormonk.com/2012/07/raspb ... servo.html
I've now realised that there is potentially a problem in that that tutorial was for one servo and I need to drive three servos.
Can I do this with these transistors? I've organised an external 5V supply to power the servos (and Pi) but I don't know if I need to get any extra components. Ideally I wouldn't have to, as I have done a whole bill of materials and ordered all the stuff, and I really don't want to be sending things back and reordering things.
Additionally, I have an Adafruit Trinket, if that would be of use to help solve this issue. I also have an Arduino Uno R3 SMD, but I'd rather not use that if possible.
Thanks in advance,
4 posts • Page 1 of 1
I have no idea what the transistors were for. The sort of hobby servos I have don't need the signal amplified.archieroques wrote:Fantastic! So, do I need to use the transistors at all? What would they do? And would I just connect servos like in that article, but to different pins?
Generally you power servos externally from a 5V or 6V supply.
A servo will have a wire for power, a wire for ground, and a control wire.
Connect the power and ground wire to your external power supply. Correct the control wire directly to a gpio or via a, say, 1000 ohm resistor if you are worried.
Also connect a Pi ground to the external power supply ground (the control signal needs a return path).
Then send pulses to the gpio and the servo will move to the commanded position.
The ribbon cable is just for convenience.