Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Controlling a DC motor with a transistor

Status
Not open for further replies.

BronzeG3

New Member
Hi all,
I plan to modify a toy cart with 2 small DC motors so that I can control the motors with a transistor connected to a microcontroller. Will this setup work, and do I need to add anything to protect the transistor from the motor.

Thanks.
 
YOu will only achieve unidirectional control with one transistor. With that arrangement, you will need a schotky diode (low forward voltage, fast recovery time) in anti-parallel with the motor so protect the transistor from the motor's inductive spike whenever you cut current flow to the motor.

For bi-directyional you need an H-bridge as well as diodes (Which are in different positions due to the bidirectional current flow through the motor)
 
I plan to modify a toy cart with 2 small DC motors so that I can control the motors with a transistor connected to a microcontroller. Will this setup work, and do I need to add anything to protect the transistor from the motor.
Do yourself a favor and get a SN754410 H-Bridge chip or similar. They're cheap and easy to use, and made to do what you want. They have built-in snubber diodes so you won't fry your microcontroller.

Heat sink the chip properly and it can handle 1 amp continuous.
 
I believe you can also stack the IC futz recommended to increase current ratings. Buying on of these chips is a lot cheaper and easier than designing and building your own h-bridge (but not as fun ;))
 
Thanks everyone! I originally looked for a H-Bridge IC, but the cheapest one I found was about $8 in quantities of 1000, so I decided to go super simple with the transistor. I will order the SN754410 with my next trip to mouser.com, but until then, I think the transistor + diode will work for now.

If anyone is curious, I will be using this for the RF link and a PIC on either side. I have an old joystick from an Apple IIgs to use as a control and am going to use PWM on the other PIC to control the transistor or H-Bridge.
 
I tried setting up the motor control like so **broken link removed** , but I can never get Vce to go to zero. With 0V at the base Vce is at 5V; with 5V at the base Vce is 4.2V. I tested the circuit using an LED and a resistor which worked fine, but not with the motor. I tried changing the base resistor out and replaced it with a 330 ohm, but still no go. Am I missing something fundamental about transistors?
 
Last edited:
How much current does the motor use?

Have you considered using a power MOSFET like the IRF540?
 
You are going to need a Power MOSFET as stated by Hero999. Those are signaling transistors your using, they are not meant for high current. Or use Darlington or make your own. You have not giving the specs of the motors, that will help in designing your circuit.

-BaC
 
take a 555 timer for gen pulses and one thyrestor combine with a microcontroller ..... set the puleses in one range for pwm tech.... follow with one condition that if u press one button to speed up and one button for down ...... if u speed up the width value should inc in such a way to control the current over the motor........... program in such a way that if u inc one variable then the width pusle should inc .... u see that in condition u can even stop the dc motor
 
If they are only slightly different speeds a microcontroller being fed by sensors (light, IR, sonar) would automatically compensate for the difference. Massive differences would probably not work.
 
Status
Not open for further replies.

Latest threads

Back
Top