After the recent round of enjoyable bass guitar fettling a much more mundane thing needed fixing.
The little gadget in the pic is the monitor unit for a Watchman Plus domestic heating oil tank level monitor. This is a little module that looks something like a wall-wart mains power supply. On the top is an antenna that communicates to a sensor unit that is buried inside a domestic heating oil tank reporting back the oil level.
This is quite an old and obsolete model now, but it has worked perfectly for years until this summer when it started periodically losing the tank signal (the little red led at the bottom right flashes and the display indicates “r”).
Step one was replacing the battery pack in the tank transmitter as it was at least 5 years old and that is around the usual battery life. This was quite fiddly and awkward to do as the pack was buried in between the inner and outer shells of the tank and could only be reached blind at arm’s length. The results were promising at first, but after a few hours the signal was being lost again. Very annoying!
Especially annoying since the transmitter battery pack was about £331 and I really didn’t want to fail to fix it having spent that much.
Time to get dismantling! The pic on the left is the circuit board after I had extracted it from the plastic case by levering the case open2.
Fortunately, I have a superpower3. My first career was in Electronics design and I specialised in embedded systems. What that means is that I can look at a gadget like this and work out enough about it to deduce how it works and stand a good chance of fixing it as long as it isn’t completely toasted.
The first thing that struck me was that there was no mains transformer or evidence of a switch-mode power supply. Oh, oh – that means a capacitive reactance voltage dropper … which also means the circuit is live to mains with no isolation. That makes the board pretty dangerous to work on and hard to test as there is no simple way of getting a ground reference to measure things4. My thought was to try and trace the power supply part of the circuit and see if I could reason about the fault based on the failure modes I was seeing5.
This is the power supply circuit:
Because the circuit is mostly surface-mount it is pretty hard to work out the values of some of the components, or even what kind of components they are. That is where the professional experience comes in – I know what type most surface-mount components are just by the look of them and I can reason out what the mystery ones are based on how the circuit must work6. There are various capacitors that have mystery values, but they are not important in determining how the circuit works.
The key component in this circuit is C1, a 330nF mains rated (X2) capacitor. In normal operation this presents a capacitive reactance of around 10k7 at 50Hz meaning that very roughly 24mA flows through it and is split between the zener diodes and the current drawn by the circuit through the 5V voltage regulator. That is pretty consistent with the PIC microcontroller and a 433MHz receiver module – I’d bet they take 10mA-ish @ 5V.
So far, so good. I’d already had a bit of a google for failures of these oil monitor units and I found a link8 suggesting that the mains rated capacitor can fail. This was enough of a clue that I went looking for failure modes of mains rated metal film capacitors. They couldn’t be failing open-circuit as the unit still worked intermittently, nor could they be failing short-circuit as this would cause a large over-current and blow the unit to bits.
It turns out that the clue is in the “X2” rating which means that the capacitor can survive over-voltages and is safe to connect directly across the mains between Live and Neutral. The way it survives these over-voltages is by self-healing, which crudely means that if the insulation between the capacitive plates fails, the current that flows vaporises the metal film immediately around the failure. This cunningly clears the short-circuit and the capacitor continues operating. Sneaky.
However, there is a snag. If this happens often enough, quite a lot of the metal plate material can be lost resulting in the capacitance value getting smaller as time goes on. If this happened the capacitive reactance would rise, and if the capacitance got too low there would not be enough current flowing for the voltage regulator to work properly if the mains voltage dropped slightly – the 5V would dip9 and cause the microcontroller to reset. This was exactly what I was seeing happen.
So, enough theory – let’s remove the 330nF capacitor and see what it measures…
…and there we have it, 0.177uF10 – just over half the proper value. That capacitor is stuffed!
The rest is routine – buy and solder in a new 330nF X2-rated capacitor (22.5mm radial pitch, costs 29p from RS components), stick the case back together and the monitor is repaired.
I tested it in situ and it ran happily indicating the tank level for a weekend without resetting or doing weird things.
(See here for someone else who found the same problem in a little mains timeclock and made an interesting video about it.)