The diode is to protect the LED from the reverse waveform of the ac voltage. With 18vac and only half the cycle that the LED conducts for, the effective voltage on the LED circuit is only about 12 vrms. So you’re good on voltage. We wouldn’t need the diode if it weren’t for the peak reverse of the ac that can harm the LED.
|