I'm trying to create programmable Christmas lights - a very simple circuit controlled via Arduino or NodeMCU. My problem isn't on the microcontroller side, but the basic electronics.
Now... I have 2 sets of 50 LED lights that use 3 V and draw 0.23 W meaning about 77 mA, which is significantly more than Arduino or NodeMCU can handle from a single pin. This doesn't really come as a surprise, so I need some kind of a transistor, relay or optoisolator to drive it.
I have a bunch of 2N2222A transistors that I tried to use, but running 3 V from the lights' original battery pack to the collector and connecting the lights to the emitter and running 3 V to the base (or less using a resistor - didn't check for the ohms of the resistor as the results didn't change from the direct 3 V current) I did get lights on, but due to the voltage drop involved in the transistor, they were markedly dimmed. I didn't measure the exact drop at this stage yet.
I had a 4-channel optoisolator on hand as well (HW-3999) that I decided to try as well, but it had the same results. This time I measured the voltage drop and it was around 0.6 V. Not surprising really, since the optoisolator (as I understand them) is basically a light-controlled MOSFET.
So I would like to know what are my options here? Either use a relay as a switch or should I use 5 V as the base voltage and calculate the voltage drop involved in the optoisolator and/or transistor and then calculate a fitting resistor to use in order to drop the total voltage to around 3 V that the lights can handle, or should I just use a relay?
Thanks!