I have a raspberry pi and I was wondering if there was a way to make the GPIO pins control a DC motor in both directions.
I came up with a little schematic but I'm sure I did it horribly wrong.
Any suggestions would be greatly appreciated!
I have a raspberry pi and I was wondering if there was a way to make the GPIO pins control a DC motor in both directions.
I came up with a little schematic but I'm sure I did it horribly wrong.
Any suggestions would be greatly appreciated!
The connection of your transistors makes no sense if you intent to make a H-bridge. (all NPN transistors is not a common solution, (there are ways to do it for sure), and will not work the way you connected them)
Read up on the theory, check this article : http://www.robotroom.com/BipolarHBridge.html
And read this :http://learn.adafruit.com/adafruit-raspberry-pi-lesson-9-controlling-a-dc-motor/overview
I would suggest a H-Bridge IC (easily found eg. L293D or similar), and some protection (opto or resistors) between your IO ports and the power circuits.
Also, look at mosfet variants, these need less cooling and can handle more current.
Good luck,
Edwin van den Oetelaar.
The connection of your transistors makes no sense if you intent to make a H-bridge. (all NPN transistors is not a common solution, (there are ways to do it for sure), and will not work the way you connected them)
Read up on the theory, check this article : http://www.robotroom.com/BipolarHBridge.html
And read this :http://learn.adafruit.com/adafruit-raspberry-pi-lesson-9-controlling-a-dc-motor/overview
I would suggest a H-Bridge IC (easily found eg. L293D or similar), and some protection (opto or resistors) between your IO ports and the power circuits.
Also, look at mosfet variants, these need less cooling and can handle more current.
Good luck,
Edwin van den Oetelaar.
Thanks,
I decided to go witht he L293D. I just have one question. Does the VCC1 pin (top-right) need to provide power to something. In other words, the Pi is powered by other means, so can I just leave that pin alone?