Go Down

Topic: Transistor for 12V motor drive? (Read 8965 times) previous topic - next topic

CrossRoads

Have you consider using an H-Bridge?
L293D will let you spin both directios, has the correct transistors builtin to do that.
http://www.ti.com/product/l293d
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

dc42

#16
Oct 02, 2011, 09:11 pm Last Edit: Oct 02, 2011, 09:14 pm by dc42 Reason: 1
To drive the motor in both directions, you need an H-bridge. See attached diagram. Note that if you make the mistake of driving both output pins high at the same time, you will short out the 12v supply, so a fuse is highly recommended.

The built-in diode in a power mosfet is not a problem, it is an advantage because in a half-bridge or full-bridge configuration, it acts as a flyback diode.

Alternatively, use an H-bridge chip such as the L293D (if you are certain that the motor stall current is less than about 0.5A) or the L298 (for higher current), but expect to lose up to 3.6v or so in the chip, so you will need to increase your 12v supply to 15v or so.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

kivig

#17
Oct 03, 2011, 03:54 am Last Edit: Oct 03, 2011, 04:02 am by kivig Reason: 1
Thank you very much for the circuit!
Do I understand it right, that the "rule" is - high side should be P-channel and low side N-channel?
Is it possible to drive P-channel transistor gate directly from Arduino pin without inverting it or all P-channel transistors operate as "inverted"?


Have you consider using an H-Bridge?

This is the first time I hear of such IC :) Seems to be the easiest way, but I'm worried about 1A limitation as I don't have precise spec on motor and might change them later.

dc42

#18
Oct 03, 2011, 09:02 am Last Edit: Oct 03, 2011, 09:05 am by dc42 Reason: 1

Thank you very much for the circuit!
Do I understand it right, that the "rule" is - high side should be P-channel and low side N-channel?


If you were to use N-channel mosfets for the high side, you would need to drive them with a gate voltage at least 5v or 10v higher than the motor supply voltage, and such a supply is not normally available. That is why it is easier to use P-channel mosfets on the high side.


Is it possible to drive P-channel transistor gate directly from Arduino pin without inverting it or all P-channel transistors operate as "inverted"?


To turn the P-channel mosfet off, its gate voltage has to be about the same as its source voltage, which for your system is +12v. If you were using a 5v motor supply and could find a P-channel mosfet that needs only 5v to turn it on sufficiently to pass your motor current, then you could drive the gates of the P-channel mosfets directly from Arduino pins. The purpose of the NPN transistors in my diagram is to shift a 0->5v signal to a 0->12v one (actually 12v->0 because of the inversion). The inversion is also convenient because it allows a single Arduino pin to control both one N-channel mosfet and the opposite P-channel mosfet.



Have you consider using an H-Bridge?

This is the first time I hear of such IC :) Seems to be the easiest way, but I'm worried about 1A limitation as I don't have precise spec on motor and might change them later.


The L298N might be a better choice than the L293D. It is rated at 2A max DC per channel (it is a dual H-bridge), and you can connect the 2 channels in parallel to get 4A total. However, its voltage drop at 1A is 1.8v minimum, 3.2v maximum, so you will need to increase the motor supply voltage to about 15v. You will also need to provide 4 flyback diodes.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up