7
\$\begingroup\$

How do I control a hobbyist DC motor with a TIP122 transistor?

I want to control it with the Arduino PWM pins, the power supply is 4 1.5V AA batteries connected in series giving 6v.

Also, what steps should I take to protect the arduino against and EMI from the motors?

\$\endgroup\$

1 Answer 1

11
\$\begingroup\$
  • Wire the Arduino PWM pin to the Base of the TIP122 through a 1kOhm, or at least 270 Ohm, resistor in series.
  • Wire the TIP122 Emitter to Ground of the Arduino.
  • Wire one lead of the motor to the positive side of your battery pack, the other lead to the Collector of the TIP122
  • Put a diode across the leads of the motor, perhaps a 1N4007, wired reverse biased (cathode towards battery positive in previous point).
  • Add an electrolytic capacitor of say 10 uF 12 Volts in parallel with the diode, connected with its negative lead (usually marked) towards the Collector of the TIP122
  • Wire the negative of the battery pack to the Arduino ground.

This article has a description and a schematic: Scroll down to the section titled "DARLINGTON TRANSISTORS AND HIGH CURRENT DC DEVICES" Motor driven by TIP122

\$\endgroup\$
3
  • \$\begingroup\$ I'd also advise the OP to be sure the motor can be powered by the AA batteries. If it can't, the battery voltage may sag enough when the motor is starting to reset the Arduino, leading to weird behavior. \$\endgroup\$
    – Phil Frost
    Jan 30, 2013 at 12:33
  • \$\begingroup\$ @PhilFrost Can this problem be solved by adding a big enough capacitor parallel to batteries? \$\endgroup\$ Jan 30, 2013 at 14:01
  • \$\begingroup\$ @abdullahkahraman it can help in some cases, but not really. A capacitor can provide a short-term reserve of energy, but it can't make energy from nothing. A bigger capacitor can provide a bigger reserve of energy, but if your motor in the long term requires more power than the battery can provide, no capacitor can fix that. \$\endgroup\$
    – Phil Frost
    Jan 30, 2013 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.