Electronic – Short life of LED parallel to Solenoid as indicator

circuit-protectionledparallelsurge-protection

I have a relatively simple circuit: 12 V to a switch; on the other side of the switch is a solenoid and an LED in parallel. Nothing special about either component; the LED is a 20 mA typical LED rated for 12 V and the solenoid is a solenoid on an LPG gas line. The idea is when the switch is flicked, the solenoid does its thing and the LED lights up to indicate the switch is on. The LED is just from the switch to ground.

The problem is that the LED doesn't last more than a month. I can put it a brand new LED in and flip the switch and it'll light up, but after a couple of weeks the LED will die. After the first time it dies, I can turn the switch off again and then slowly ease the switch back on and the LED will gradually come back on (weird behaviour that I can't explain?). However this only works a couple of times and after that the LED is dead.

Any ideas on how to rectify this? I'm thinking the LED is getting ruined by spiking voltage but am not sure and don't know how to fix it if this is the case.

Best Answer

The LED may already have a series resistor, the OP states that it is "rated" for 12V. I suspect so because without current limiting an LED wouldn't last a second with 12V across it. In that case it may be the inductive kick from the field collapsing during turn off that is avalanching the LED and causing the short life.

To "rectify" this put a regular diode across the solenoid coil so that it's reverse biased in normal operation and carries the inductive current when the solenoid turns off.

It should be rated for more than 12V (around 30V would be good) and for the same current as the solenoid.