Yes, the cap that smoothes the rectified control voltage, C3 in post #64, is much higher than it needs to be.
I must have missed this thread completely. Now, coming in with fresh eyes, I can see that the circuit doesn't need to be very complicated at all.
No regulator is needed for a simple transistor circuit like this; as long as the design and component values are chosen to ensure it will do what it should do over the widest range of input voltages, there's no problem. Steve pointed this out in post #23 but it didn't go anywhere.
With a maximum current drain of only 10 mA, there's no need to full-wave-rectify the supply either. These changes eliminate four diodes, four capacitors, a transistor, the regulator, and one resistor.
Also I have a suggestion for a better LED drive circuit. It doesn't eliminate any components but it's a clever design and I like it. So here's my suggested design:
Note that R3 and R4 must be rated for 1W dissipation; at all times, one of them will be dissipating about 0.3W. Here are the simulation waveforms:
The green trace is the AC coming in on the CTRL net. I've assumed it's a 60 Hz sinewave at 3.39V RMS. In my simulation it's generated by a separate circuit that I haven't shown.
The red and blue traces are the currents in the LEDs, which relate to the current markings on the right side. Whichever LED is illuminated will have about 8 mA flowing through it.
When the AC at CTRL disappears, there is a short time during which the illumination changes from one LED to the other. It looks like it's about 0.3 seconds. You can reduce this time if you want, by changing C2 from 1 µF to 2.2 µF and adding a 10k resistor across it.
The LED driver circuit is a clever little circuit that Steve likes to post as a MOSFET gate drive circuit. I don't know what it's called.
When AC is present on CTRL, current through D2 charges up C2 and current flows through R1 and into Q1's base, biasing it ON. It pulls its collector low (to less than 0.5V anyway) and this pulls the E2 net below 1.5V through D3. This leaves insufficient voltage across LED2 for it to light, and applies almost the full supply voltage (VCC) (about 40V) across LED1 and R3.
That part of the circuit would be enough to give a correct indication when AC is present on CTRL, but without Q2, when AC disappears from CTRL and Q1 turns OFF, its collector would not pull up fully to the positive rail. The E2 net would sit about half way between 0V and VCC, and both LEDs would light at half brightness.
So Q2 takes over in this situation. When Q1 turns OFF, its collector is pulled almost fully to VCC by R2. The LEDs don't affect this voltage because D3 is reverse biased at this time, as its cathode is being pulled up to VCC. Q2 is connected as an emitter follower, and it pulls its emitter up to about 0.7V lower than its base, which is less than 1V below the VCC rail. Only a small current flows into Q2's base, so very little voltage is dropped across R2. Since the collector-emitter voltage of Q2 is less than about 1V, there isn't enough voltage across LED1 for it to illuminate, and almost the full supply voltage appears across R4 and LED2.
D3 also protects Q2's base-emitter junction against reverse bias. If a transistor's base-emitter junction is reverse-biased by more than about 7V, this will damage the transistor. So that's another nice trick which makes this circuit clever.
I haven't shown which LED should be red and which should be green. Actually I forgot, but you should be able to work this out, now that you understand the circuit, right?
Some other comments for this thread.
We have all been assuming that your 3.39 VAC indication is fully floating, and that it's valid to connect one side of it to the 0V rail of your LED circuit. Are you sure that's true? Can you tell us some details about where this signal comes from? Back in post #8 you said it's from an irrigation controller. Can you tell us the make and model?
An AC voltage source in LTSpice is specified with the
peak voltage, not the RMS voltage. This is a real trap for young players, and I personally think LTSpice should display a big reminder about this on the parameter entry field for the voltage and current sources when a sinewave is selected, because sinusoidal voltages are (by default) always specified as RMS values.
So if your transformer voltage source is 28.5V AC RMS, the peak voltage will be sqrt(2) times that value, i.e. about 40.3V, and that's the value you should enter for the voltage in LTSpice.
Harald, if you're reading this, perhaps you should add a warning about this, and a warning about using "Meg" instead of "M", to one of your LTSpice resources.