TLDR; Where is the fault in the attached schematic? I think a ground needs to be added on one side of R1/R2 that doesn’t seem to exist on the physical board. What else could be a potential fix?
Background:
New User. I will try to attach KiCad schematic if permissions allow me to. See link instead.
KiCad Files
My Dad has a Lionel train layout. He acquired a used Microwave Tower accessory at a swap meet. The tower had one blinking LED at the top but it quit blinking. I took a look at it and it actually has 3 LED’s, two side white “lights” that should stay on, in addition to the red blinking LED on top. I wasn’t able to find any information about the schematic for this tower. This seemed like a good opportunity for me to learn ngspice simulation with KiCad as the front end. The idea was to learn how the circuit was supposed to work so that I would have some idea of how to go about troubleshooting it.
Using the visible traces on the top and bottom of the board, along with checking continuity, I was able to use KiCad to model the circuit. Most of the components were identifiable except for a SMD capacitor.
My own observations and research findings:
- The board has obviously been worked before. There are three electrolytic capacitors that look new’ish. All three are the same physical size and value, 100 uF. However, the outline circles drawn on the board indicate that C1 was meant to be a larger diameter capacitor than C2 and C3 which have the same size outlines. More about C1 in note 3) below.
There at 3 sets of pads on the board for connection of the LED leads. However, the wires were all soldered to the same pad, i.e. all grounds on a single ground pad and power wires on one power pad (or maybe two, I don’t recall exactly). I removed all the LED wire leads, clean up the board and soldered in some test LED’s (white). All three now light up, but still no blinking on any of them. I expect one of them to blink.
-
Lionel trains and accessories operate on AC supply. Accessories are about 18 volts. But the design probably allows for direct track connection which would be a max of about 24 volts. The small transformer I’m using to power the board measures about 12-13 volts RMS on my multimeter. I set the VSOURCE ngspice model to 18 volts sinusoidal.
-
The AC power input is put through a bridge rectifier chip. The result is used as input to a voltage regulator with capacitor C1 in between them. I believe that a larger capacitor might have originally been used to provide smoother input to the voltage regulator. Board does work, as is, to power the 3 LED’s.
-
The output of the 5 volt voltage regulator seems to be the main power supply. It powers the two side LED’s (non-blinking) via 330 ohm resistors. It provides power to the Op Amp chip. There are also two capacitors hanging on the power line, one of the electrolytic, C2, and the SMD C4. I’m not certain of their intended function. The SMD is located close to the Op Amp power input pin. So I assume it supports the Op Amp. Finally, the power line is fed to a NPN transistor that drives the blinking LED light that is also on a 330 ohm resistor. The NPN transistor is controlled by a complicated Op Amp circuit.
-
The operation of the Op Amps, how they work, and why it was used to blink the LED, is what took me the longest to puzzle out and gave me the most trouble with KiCad/Ngspice. I got lucky here, because I ran across a comment on one of the data sheet web pages from someone asking about the “breathing LED circuit”. That gave me the search term needed to avoid all the simple LED blinker circuits. It involves two Op Amps with one working as an integrator and the other as a comparator (at least that’s what I think I learned about it). KiCad/Ngspice was very useful in observing how this all works…once I finally got it to work. The third electrolytic capacitor, C3, is the feedback for the integrator Op Amp and part of the RC time constant used to control the blink rate.
Dilemma:
I wanted a working circuit model to troubleshoot a failed board. But I seem to have just replicated the bad board. Where is it going wrong?
The model does indicate that it would power up the LED’s (which matches reality), but not blink the top LED (which matches reality but is not expected behavior). The Op Amp breather circuits that I’ve researched online, and modeled separately, require a reference voltage of about half the supply connected to each Op Amp. The examples I’ve seen use a voltage divider to provide the reference voltage. R1 and R2 look like they could be the voltage divider that would do this. However, the voltage on each end are wrong.
This is related to the voltage regulator configuration. If the “COMMON” pin of the voltage regulator was grounded, then the output, “VO”, would be a nice clean 5 volts to power the devices and make R1 and R2 provide 2.5 volts as the reference input to the Op Amps. The model then oscillates like it was intended to. But the actual layout of the board does not have a ground connection there. Instead “VO” is a noisy ten’ish volts on one end of the voltage regulator and the “COMMON” is a slightly higher noisy ten’ish. So there is very little actual voltage difference across R1 and R2 for it to divide. This means that the Op Amps don’t oscillate. I can’t seem to identify any damage on the board that would indicate an open from the voltage regulator “COMMON” connection to ground.
Another configuration that would work is to disconnect R2 from the supply line and ground it instead. This means the devices would be powered by a noisy 12 volts instead of the the clean 5 volts. However, the Op Amps would oscillate and the LED’s would have higher current through them.
It seemed “obvious” that the Voltage Regulator Common should be grounded. What caused me to start second guessing this obvious fact is that the data sheets for the Voltage Regulator show configurations in which the “COMMON” is not grounded for various purposes, adjustable voltage, current control, etc. So the data sheet along with not finding an obvious ground fault on the board has me confused on what to do.
So I’m looking for anything that I might be missing before I attempt to jumper a ground and get on with it. Have I missed another change that would make the Op Amps oscillate? Have I tortured a completely different circuit into looking like a “breather”?