I need to control a DC motor with an Arduino. The motor needs approximately 9-12V and 200mA (700mA peak current). I use a 9V battery or a power supply, a transistor (BD135) and a 250 Ohm as base resistor. The following diagram illustrates the circuit - note that R2 is the DC motor and the flyback diode is missing in the diagram, but I used one:

Circuit now

The Problem: I need to be able to stop the motor much more faster than with setting. I read about shorting out the motor's wires or even to turn the motor in the other direction. I've found an explanation, how to control the direction of the motor using 4 diodes and two transistors, but I'm unsure how to try shorting out the motor's wires.

Can I really just connect the two motor wires to a second transistor to stop the motor? How much current/voltage will flow through this transistor?


To stop the motor hard you short its connections. A simple but not elegant way is to use a relay. Make sure the first transistor is off, then energize the relay.

A more elegant solution would be to put a P channel FET or PNP transistor accross the motor:

Q1 is used to turn on the motor as you have it now. Q3 will short the motor and therefore electronically brake it when turned on. R2 keeps Q3 off when no current is being deliberately drawn from its base. Q2 is a current sink when enabled, which turns on Q3.

The worst case current the brake has to handle is the maximum current you ever put thru the motor, which you say is 700 mA. Let's say Q3 has a minimum guaranteed gain of 25. That means it needs 28 mA to turn on. If BRAKE is a 5V logic signal, then there will be about 4.3 V accross R3 when BRAKE is high. 4.3V / 100Ω = 43 mA, which is good enough to keep Q3 saturated with up to 1.1 A of collector current. A little margin like that is good, and the extra base current will keep the saturation voltage of Q3 low when on.

You shouldn't need to turn on the brake for very long each time, so a little extra current thru Q2 shouldn't matter. Make sure Q1 is off, wait a few µs to make sure it has finished turning off, then enable BRAKE. With experimentation you can find the minimum brake time to guarantee the motor has stopped. Add a little, then turn off BRAKE after that.

|improve this answer|||||
  • \$\begingroup\$ you'll probably need a series resistance in the brake input if you're wiring it directly to an arduino \$\endgroup\$ – Taniwha Mar 18 '14 at 4:26
  • \$\begingroup\$ @Taniwha: No, you don't. For homework, assume Q2 has a gain of 50, compute the current drawn from BRAKE when it is being held at 5 V, and report back. \$\endgroup\$ – Olin Lathrop Mar 18 '14 at 13:30
  • \$\begingroup\$ @OlinLathrop Since I want to implement the brake function on a H-bridge controlled motor can I use a triac? \$\endgroup\$ – Pedro Quadros Jul 30 '15 at 14:06

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.