I have an object with a series of led and I want to turn on and off these leds from my Arduino. The input of the LED circuit is 24v DC 100mA.
What I've done is the following:
- I've cut a wire of this object and I connected one end to the collector and the other end to the emitter of a NPN transistor
- I connected the base of the transistor to a digital output (through a 1k resistance)
- I connected the power to the led series while the digital pin was LOW (actually completely disconnected)
But with no current on the base of the transistor, the LED has turned on to my surprise. I may have completely misused the transistor and other items. How do I fix this circuit?