Flowwwie
Posts: 2
Joined: Mon Dec 23, 2013 12:53 pm

Motor circuit suggestions

Mon Dec 23, 2013 1:04 pm

Does anyone see anything wrong with this circuit? Also where should point "C" go? to the RPi ground or the battery -ve? Also does anyone have any suggestions for the NPN transistor? I am a noob so any help is greatly appreciated thanks Image

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Motor circuit suggestions

Mon Dec 23, 2013 2:25 pm

Your picture is far too small for me to read :)

If you look at this (page 12):

http://www.picaxe.com/docs/picaxe_manual3.pdf

Is that what you wanted?

(That manual has a few other examples too - worth a quick read.)

User avatar
joan
Posts: 14362
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Motor circuit suggestions

Mon Dec 23, 2013 2:26 pm

I think you'll need to post a bigger image. I couldn't make out any detail.

User avatar
Tage
Posts: 287
Joined: Fri May 24, 2013 2:29 am
Location: St Thomas, Ontario Canada

Re: Motor circuit suggestions

Mon Dec 23, 2013 4:40 pm

point C (the emitter of the transistor in this case) should be connected both to Pi GND (so the base-emitter current can return to the 5V supply) and to the negative terminal of you battery (so the motor current through the collector-emitter can return to the battery).
I assume you have a diode connected from collector to the positive terminal of the battery, (so the motor current has somewhere to go when the transistor turns off).

without knowing anything about the motor it is impossible to give advice on a transistor, but if the motor is small it could be any npn transistor that can handle the motor current. it is a good idea if it has a high gain (hfe) so that it does not require much base current. the GPIO has very limited drive capability and you should not try to pull more than a few milliamperes from each pin.

if the motor is large (more than 500mA) it is better to use an n-channel MOSFET that has very low gate threshold voltage so it can drive the motor current with 3.3V gate voltage. you should keep a resistor from the GPIO to the gate to protect the Pi from current transients caused by the gate capacitance, or in case the MOSFET fails and drain is shorted to gate.
look for an n-channel MOSFET that has Rdson specified at 2.5V, or find one that has Rdson specified at 4.5V and also can handle ten times higher current than the motor current. there is a good chance that it will work at 3.3V gate voltage. (the thing to look out for is that the gate voltage is too low to keep the transistor saturated at high motor current. when the transistor goes out of saturation it will dissipate a lot of power and there is not much power left for the motor.)

forget darlington transistors, there is too much voltage drop both base-emitter and collector emitter.

Flowwwie
Posts: 2
Joined: Mon Dec 23, 2013 12:53 pm

Re: Motor circuit suggestions

Mon Dec 23, 2013 6:55 pm

Sorry apparently I posted the thumbnail, hows this. And thanks very much for all the replies i massively appreciate them
Image

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12344
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Motor circuit suggestions

Mon Dec 23, 2013 8:58 pm

Tage wrote:
forget darlington transistors, there is too much voltage drop both base-emitter and collector emitter.
Agreed that Darlingtons are not the best solution for several reasons, but normally the input forward current is just twice that of a normal diode, or 2 x 0.7V = 1.4V, meaning there is 0.9V left for the series resistor, should be enough, especially if you are only interested in sending the Darlington into saturation (meaning no precise current control, but less than 15mA).

picture seems about right.

Return to “General discussion”