# How much ohm resistance I should put between tp120 base and uno?

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 ! • 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 Dec 3 '16 at 6:30
• 24 volt dc, I have added Fritzing Dec 3 '16 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? Dec 3 '16 at 9:31
• sorry fixed the fritzing, yea I am talking about resistor. Dec 3 '16 at 10:59
• 1-2.2k comes up in a web search Dec 3 '16 at 11:36

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 )`.