# determining R2 for a simple supply circuit

Hello.

I have very little electronic background so I am sorry for the simple question. Could someone look at the attached schematic and help me determine R2? I would also like to add a led and resistor to show the power output, ie. when the TIP120 output is zero the led is off, when the TIP120 is outputting 1/2 power the led is 1/2 bright, etc.

Thank you so much for your help.

lg, couka

Consider that the optocoupler has a current limit, so that you can't make the base current arbitrarily high.

How much current is required by your motor? Eventually you'll need a second transistor, if your motor requires a higher base current than the optocoupler can source. Or you use a FET instead of the bipolar TIP120, which requires not much current to turn the FET on and off.

I'd also swap the resistor and optocoupler. This won't affect the calculation, but I prefer to keep the more delicate part closer to Gnd level. Then you risk less trouble when accidently shorting pins with a DVM test clip.

Need to know motor current to properly answer that question.

A TIP120 darlington saturates with ~1:250 base current.
R2 = 1k (~20mA) would be ok for up to ~5Amp.
A TIP120 (bad, high saturation voltage) needs a heatsink above 1Amp.
Indicator LED (Vf ~2volt) could also go in series with the opto LED.
Then R1 has to be re-calculated for 20mA LED current.
You might need a selected TLP621 with >100% transfer ratio if motor current is more than ~4Amp.

Don't forget the back-EMF diode across the motor.
Without it, the transistor will be soon in silicon-heaven.

If you don't need opto isolation, then use a logic level mosfet.
Leo..

Thank you guys for your kind replies!!!!

motor (solenoid really) is 24V, 30W.

If you can share 24volt ground with Arduino ground, then use a logic level mosfet and this circuit.

If not, use your circuit with R2 = 2k2 (10mA base current).
Indicator LED can go in series with the opto LED (if R1 = ~120ohm).
Or across the solenoid with a 2k2 current limiting resistor.
Leo..

outstanding!