1
\$\begingroup\$

I'm new to EE. I burned out a Raspberry Pi by running an electric motor directly from its GPIO pins, and then I learned about transistors. I now have another RasPi, but I'm not sure what transistors to buy. I plan on using the RasPi's 3.3v GPIO pins for the base and a 4 AA batteries connected for the collector. What NPN transistor should I buy (or what pack of general-use NPN transistors should I buy that I can adapt to fit) for this project? Are there any methods to determine which transistor values are required? If it's best to just get a pack of general-purpose transistors, what do I need to do to accomodate for the difference in voltage/amperage tolerance? Would any capacitors be required in the circuit to account for the motor's interference? If I wanted to replace the motor with an antenna, would I have to change anything?

Let me know if my phrasing is unclear. Thanks for any replies, I know that this kind of thing must be annoying to you.

Edit: The motor is an example. I just wanted to know what to use for that current.

\$\endgroup\$
  • 1
    \$\begingroup\$ Buy an appropriately-rated motor driver. \$\endgroup\$ – Ignacio Vazquez-Abrams Feb 16 '15 at 3:12
0
\$\begingroup\$

You'll want to keep in mind what kind of motor you'll be driving and what voltage it is rated for. That said, to control a motor, for simplicity sake you'll want to use an h-bridge motor controller. This will allow you to take the guess work out of how to start/stop/reverse the motor without great concern for fault conditions/motor stall.

For example, I found this one here that can be used specifically with an embedded system http://www.amazon.com/Makerfire%C2%AE-Raspberry-L298N-Motor-Driver/dp/B00N7IYTKE/ref=sr_1_3?s=electronics&ie=UTF8&qid=1424107521&sr=1-3&keywords=raspberry+pi+motor+controller

\$\endgroup\$
  • \$\begingroup\$ Alright, but I really just want to know what transistor I would need to use for a RasPi and that current. The motor is just an example. \$\endgroup\$ – mckryall Feb 16 '15 at 3:35
  • \$\begingroup\$ I'm considering this now. That part says that it's an arduino shield. Would I just be able to stick jumper wires into the pin slots and use it, or should I look for another one? \$\endgroup\$ – mckryall Feb 16 '15 at 3:44
1
\$\begingroup\$

that part cowboydan linked is not an arduino shield. the guy selling it is just listing words he thinks will get good google hits. anyway, yes, you can wire it to any kind of controller.

i found a description on how to use it here:

https://www.bananarobotics.com/shop/How-to-use-the-L298N-Dual-H-Bridge-Motor-Driver

it's not for that specific board, but one that's almost identical in function. just keep in mind, the logic in the ebay auction has a max voltage of 12V, when using the on-board voltage regulator. not the same as the one in the how-to.

\$\endgroup\$
0
\$\begingroup\$

Although a transistor will work fine, may I suggest you look into a motor driver?

Here is a nice motor driver: Sparkfun Dual Motor Driver 1A

I don't know if it will meet your requirements as far as ratings go.

The motor driver allows you to run the motor clockwise and counterclockwise.

\$\endgroup\$

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.