Optocoupler & DC motor


I've hacked a toy and I'm trying to trigger a DC motor using optocouplers (should I even try?) I've got my circuit working triggering an LED but when I replace the led with a Motor it won't work. Any ideas why? should I use a TIP120 transistor instead? I would like to keep the circuits separate if I can. The motor does work and have tested it and it runs if I connect the two wires together that I'm connecting to the optocoupler. Am i being really stupid?

Any help much appreciated



Maybe the motor is drawing more current than the optocoupler can handle ?

A tip120 tranisitor should be able to do the job, don't forget the snubber diode acros the motor like here:


Hi there, why don't you use the optocoupler to pull in a tip20 that would then "switch" your dc motor.

thank you both for your replies, I will give it a go tonight and see what happens :slight_smile:



You could also use this instead of the optocoupler: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=IRLD024PBF-ND

This is what the Teleo I/O module used for DC output, and it was pretty indestructable.

Got it all working using the TIP120, you have to make sure you share the ground with the arduino, otherwise it won't work. Thanks for you help guys.

The whole point of an opto isolator is that you DON'T share the ground. The clue is in the "isolator" part of it's name. If you do share the ground you can get current flowing between the two systems and they are not really isolated. There is no need to share the ground if you have the circuit right. The transistor and motor and motor supply should be on the other side to the Arduino. Make sure there is no common ground between the two supplies.

I used this circuit by Tom Igoe:


where he says you do share the ground :-(

where he says you do share the ground

Yes but he's NOT using an opto isolator. That is the right way for a direct connection but not when you are using an opto isolator.

Just use his circuit on the transistor side of the isolator and have the Arduino on the IR diode side of the isolator like you did in the original diagram. That is share the device GND with the transistor GND only and leave the Arduino GND to its self. However as the opto's transistor is not a source of power to drive the transistor's base you will need a pull up (3K or so) on the collector of the opto isolator's transistor to the supply you are driving the motor from. (9v)