Anyone have experience with 12v LED Indicator lights 20ma?

I'm currently planning on hooking up a 12v power supply to two different colors and have only one on at a time, the arduino will control them via a 12v relay. But I'm curious if these would need a resistor or would it have some onboard electronics/resistors.

Polarity doesn't seem to matter, terminals are labeled x1 and x2, here's the only spec.

Should I be worried about voltage drop/adding resistors or anything else you can think of?

Inside it's powering 6 tiny LEDs.

Number of Items 6
Part Number AD16.22D-2G2Y2R-12V
Size 22mm
Style 12V AC/DC
UPC 850015671098

If it's rated for 12V it's ready-to-go with a built-in resistor. Regular little "raw" LEDs operate between 2-3V but they are designed to run from a "current source" so a resistor is used in series to limit/control the current.

Like all series circuits the same current flows through all series components and voltage divides between the series components so there will be about 2V across the LED and about 10V across the resistor. Like all diodes, LEDs are non-linear (the resistance changes with voltage) and with the proper resistor the voltage across the LED "magically falls into place".

We know the Arduino will not drive a relay directly it needs some type of driver circuit. The relay will work but you can use a MOSFET, much smaller and you basically use the relay driver circuit. The easiest way is use some small N-Channel MOSFETs such as the 2N7000. Simply connect the gate to the arduino pin, the source to ground, and the drain to the lamp with the other side of the lamp connected to 12 volts. Be sure to connect the grounds of both power supplies together.

Thanks for the great feedback.

Could I use a PN222 to act as a switch?

How do you determine when to use a 2N7000 vs something like a PN222.

It depends on the decade in which you live.

If it was the 1990s, you would use the PN2222. If in the 2020s, use the FET. :grin:

It depend on which side of the sun the moon comes up. It is almost that. I make the choice depending on what I have. I also tend to design on the consiverty side. If I have at least 4.5 volts to drive it I will generally usually use the MOSFET, if less then I would use a Transistor but not a darlington. A lot of people work from examples. the 2N2222 series of transistors by Motorola at the 1962 IRE Convention. Since the initial product launch, the 2N2222 has become the most widely used and universally recognized transistor of all time. the 2N7000 is much newer but is following the path of the 2N2222 in popularity. My favorite transistor is the 2N4400, I got thousands of them in a good deal and they work great! You can use most any transistor as a switch, check the data sheet for the requirements needed to drive it.

There is no PN222.
It's PN2222

hey, thanks, typo.

Actually I cut one apart and it has a top LED module with two 1500 ohm fuses, one on each leg. I'm guessing this allows it to operate at 12v.

Removing those it looks like the LED module is already setup for 5v, I tested with a 320 ohm fuse and the power was really low well below the 20mA noted in the product specs. It's setup where + can be on either leg so it must have some onboard electronics. So I'm just going to power it directly off a pin at 5v +/-.

fuses are not rated by resistance.
I presume you mean RESISTORS.
Perhaps the size of the resistors led you to believe they were fuses which
they most certainly are not.

A fuse is a fast conducting device , usually self-destructing , whereas a current limiting ballast resistor simply drops voltage and limits current.

Hey thanks for catching a 2nd typo.

y, resistors.

I did some testing with the LED component, it actually works well on 5v so I'll be wiring up this project this weekend.

It's a garage stop light using an ultrasonic sensor to turn from Green to Yellow (4') then Red (3').