I have set up solenoid on of based on soil moisture, The solenoid is powered by 24 volts, so I power solenoid by 24 volt and Arduino uno by stepping down to 6 volt powering through Vin and gnd.

I have used resistance of 10k ohm but I have twice burnt em. Not sure how should calculate resistance required of signal coming out from D6 pin to TP120 base !

enter image description here

  • 1
    Is the 24 V a DC or an AC voltage? Can you draw a circuit diagram to clarify the connections? [Click the Circuit icon on the edit-box toolbar, if you don't have a schematics program to use] Note, edit the question in reply Commented Dec 3, 2016 at 6:30
  • 24 volt dc, I have added Fritzing Commented Dec 3, 2016 at 8:47
  • Your diagram shows nothing connected to one end of the diode - is that an omission? What have you burnt twice? The resistor?
    – Mark Smith
    Commented Dec 3, 2016 at 9:31
  • sorry fixed the fritzing, yea I am talking about resistor. Commented Dec 3, 2016 at 10:59
  • 1-2.2k comes up in a web search Commented Dec 3, 2016 at 11:36

1 Answer 1


To calculate you need to know the maximum current the solenoid uses. The TP120 has a gain of around 500-1000. So the current going into the base needs to be 1/500th of the current going through the solenoid.

So now you know the current needed. Then you can calculate the resistance value you need with R = V/I. So R = 5 / ( <solenoidcurrent> / 500 ).

So with e.g. a 2A solenoid, you get a value of 1.2kOhm.

Your Answer

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

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