One of my colleagues at work got quite a surprise today. He called me over, “Come check this out Nicko.”
He had the covers off a machine he was testing for a customer. “Watch what happens when I put it in Test Mode” he exclaimed.
Holding down the button combination he switched on the mains. The power board emitted a loud crackling sound and part of it immediately erupted into flame.
Acrid smoke poured from within. “That’s the protection PTC on the transmission drive” I squinted.
“It’s not protecting much now!” he laughed and pulled the plug.
So how did this happen? It transpired that the inside of the machine was gummed with used coffee grounds. The infuser had lost lubrication for whatever reason and had become very stiff and hard to move. In this situation the used coffee cake is not cleanly swept aside into the grounds drawer but breaks up and falls below the infuser. Let this go too far and the transmission can no longer bring the infuser all the way down.
This is not to say it does not try. The distressed whine of a seized transmission has always made me leap for the power plug. If it is left to struggle, the motor will overheat and cook it’s insulation. Eventually this kind of abuse usually makes the motors go short circuit.
This is when the board fails. Without the motor’s winding resistance in circuit large currents flow in the surge protection PTC thermistor. My understanding is that the manufacturer includes this component in series with the motor to dampen commutation and back-emf surges. PTC stands for Positive Temperature Coefficient and means that the component’s resistance increases the hotter it gets. Current flowing through the device heats it, the increasing resistance reduces the current flow thus reducing the heat, allowing more current flow and so on. This electro-thermal negative feedback loop is intended to stabilize the motor drive current.
The problem is that when the transmission is seized too long and the motor goes shorted, huge currents flow and the thermistor becomes hot enough to explode into electric flame. Moral: keep the infuser well lubricated and clean out the machine occasionally.
An SD Card failure has prevented me presenting a bunch of build pics as planned. Instead I feel like discussing the recycling of used electronic parts as recovered from defunct equipment.
E-waste is a problem for just about everybody these days. Electronic equipment has become so cheap and disposable that repair is no longer economical. It would seem apparent these piles of unwanted, failed or simply obsolete equipment contain a majority of good, working components.
Of course we would like to make use of this huge free resource but by doing so we step into a minefield. Not all of the recovered components will be good. Even the good working components may have reduced lifespans. If we need to thoroughly test every component as well as recovery it begins to seem like too much effort.
Unfortunately, many of these quite modern components require special techniques to recover and reuse. The ongoing miniaturization of surface mount makes it increasingly impractical for the hobbyist to employ making recovery of these components a waste of time for the home hacker no matter how useful or desirable. For instance I find old mobile phones have not much of interest as far as reuse is concerned, certain models excepted.
Fortunately, this is not always the case. Certain industries and classes of device still use the good old gear like through-hole passives and chips in dip packages. The commercial coffee machine industry is a case in point. Also there will always be vintage equipment ready to strip down to obtain period or obsolete components.
So what approach to take? What to keep and what to chuck? When I was younger, parts were expensive. I would keep just about every bit of wire, screw, resistor and capacitor. My parts boxes were (and still are) littered with just about every kind of chunky, dirty old resistor and capacitor from years past. Projects I made with these parts rarely worked. The main culprit were the capacitors, especially the electrolytics.
These days I recover and keep only the components I see as useful, valuable or interesting. The approach depends on the item but usually follows the same pattern. The really nice stuff, the switches, lights, displays and dials I am sure many of you would already be keeping, but I do not stop there.
The large semiconductors such as microcontrollers, memory and peripheral chips as well as power semiconductors, rectifiers and especially stuff on heatsinks are usually the first to be identified and come out. I will look their part numbers up as I go to decide whether the function is useful enough to justify the effort. Big electromechanical gear like relays will follow along with crystals and resonators. Semiconductors do not generally get old but beware the relays. This is generally the lion’s share of good stuff on the board, many would be satisfied with that.
Next for me comes the specials. Much equipment will contain some elements that are peculiar or special to that machine’s particular function or design. Many inductors like switch mode transformers and chokes are special this way. These generally need to be rewound for effective reuse. I keep them all because it is hard to know how difficult particular inductors may be to rewind and I break quite a few while trying sometimes. Other specials like heating elements, keypads, battery compartments and so forth for me have not proven easily reusable without imagination and luck/force.
Next, out with the large and/or expensive passive components. Power resistors, tantalum capacitors, MKT and other polystyrene capacitors and some electrolytic capacitors. Beware the electros! In my experience these do not age well and are only worth recovering if they are especially new, large, or expensive to buy. Other components fare better with time but may reveal signs of physical stress under close visual inspection. One should always examine recovered components and it would seem best to discard components showing anything suspicious like bulges, rattles, discoloration, leakages, bad smells, dents and other physical damage even if it measures good.
This makes room to check the small semiconductors. If I am feeling patient out come voltage regulators, zener diodes and the better transistors. Some very small value ceramic capacitors I find worth keeping as I go through quite a lot.
See all those small resistors and capacitors left over? I don’t bother. Such components are so cheap to buy new and count so much towards the ultimate reliability of a construct made using them that their recovery cannot be justified. I get a few different bulk bags of passives from my favorite electronics retailer when I need to restock the parts bins with small stuff.
But wait, I have not finished. So far as I am concerned, one of the more valuable items for the hobbyist to obtain is the wiring loom. Unless the cannibalized device is of surpassing cheapness, there will be plugs on the ends of the loom and sockets on the boards. Stick in the plugs and unsolder the sockets whole. Leave the socket on the end of the plug, it will be there when it is needed. There it is, instant loom. It is so much easier, faster and often neater to modify or use part of an existing factory-made loom to provide interconnect in one’s own projects than making it all from scratch.
Almost done? Not quite. Screws are collected, rubber feet reclaimed if any good, metalwork kept if usable, hinges and handles and of course whatever power cord it may have had. The rest is then returned (eventually) to the earth from which it was conjured.
So now there is a neat pile of veteran components ready to return to service. They are not to be trusted however, the cautious constructor uses sockets for these chips and is never too far from the test equipment during constructions. It was worth it though, some of these components were wonderful discoveries seeding ideas for whole new projects. Others may turn out to be just what is needed for a quick repair here and there or the glue holding together the next lash-up.
Most of my (quite large) parts stock is recovered and I have successfully built no small number of complicated, functional and proven reliable devices using mainly these parts. This stuff was way too good for the bin and there is that particular recycler’s satisfaction that easily compensates any extra effort in recovery. Not to mention all those saved monies useful for purchasing really fun parts that don’t usually turn up in domestic e-waste.
So don’t bin it, rat it first. If your parts bin is slim I cannot recommend enough finding one of the old silver top-loading VCRs from the late 80’s and strip it down. So much screws, plugs, wires and other constructional goodness it astounds they made it all fit.
Next time: Photos!
The ADE7756 energy monitor circuit requires a low voltage supply that is also isolated. This was achieved by placing a complete power supply and regulator on the main energy monitor circuit board.
The power supply configuration is a very common arrangement. Space limitations required the use of physically small components so output current drive is quite low. Like the rest of the Energy Analyzer, recycled components were used wherever they would fit. Most of the components were obtained from a defunct control board out of a Sunbeam EM6910 coffee machine.
The mains supply is tapped early where it passes through the energy monitor to power the transformer. The way most transformers work provides isolation for the secondary winding, i.e. the 7.2 volt AC output is “floating” relative to the mains input, there is no direct path for current to leak from primary to secondary.
The 7.2 volts AC is rectified in a small bridge rectifier to produce a peak DC output across the first filter, or “reservoir capacitor” of about 10 volts with no load. Those not familiar with the term reservoir capacitor should know that this is only applied to capacitors performing this particular first filtering function. The term is very old and originates with the AC mains power supplies known as “B battery eliminators” used on the first domestic wireless radio sets which bear more than a passing resemblance to the circuit above.
The water analogy of electricity was popular in those days. The idea was if one imagines the rectified AC coming off the bridge as jets of liquid, one might then conceive the capacitor as a reservoir, collecting the jets and allowing a steady flow to drain out. The bigger the reservoir, the less the jets would affect the outflow and the same with the capacitor. Generally speaking, the bigger the better.
This capacitor is overrated to 25v for a good reason. The reservoir capacitor has to work quite hard in most cases and can wear out prematurely if poorly chosen. Electrolytic capacitors are usually selected for this duty when size is not an issue as they are cheap and can have large values. They are not ideal though, they present some resistance to flowing current which causes them to dissipate energy as heat. Over time this dries out the wet electrolyte and causes loss of capacitance and eventual failure.
This resistance is known as the Equivalent Series Resistance, or ESR of the capacitor. Lower ESR capacitors generally perform better in certain applications like this one. Special low-ESR electrolytics are available at a cost but one also finds higher voltage ratings have much lower ESRs for the equivalent capacitances, often at lower cost than specially designed capacitors provided the larger physical size is not a problem.
Manufacturers use this trick often to shave costs. The cannibalized EM6910 control board power supply was using these very components for this reason. In these coffee machines the logic power circuit has proven most reliable, the failure that decommissioned this particular board was over in the high voltage switching circuits.
This contrasts to another commercial brand of coffee machine that suffers from common failure of the first reservoir capacitor on the control board supply because the designer saw fit to barely rate it above the working voltage.
Need to check a suspicious reservoir cap? In coffee machines symptoms include unexpected resets, blank or garbage displays, no response to buttons, random behavior and general strangeness. Put a multimeter on DC volts range, power the circuit safely and measure directly across the capacitor. Make a note of the voltage. A low voltage on the rail can often be spotted immediately if you can approximate what the rail should be, often possible by tracing nearby regulators and determining their requirements. Switch to AC volts and measure again. More than about 3-5% of the DC reading is suspicious, although this depends on applied load and could get to 10% if load current is flowing. Don’t like what you’re seeing? Replace and measure again.
The filtered voltage developed across the reservoir capacitor is fed to the input pin of one of those ubiquitous 3-terminal linear regulators, in particular a small to-92 low current version, the 78L05. This device takes a voltage between about 7 and 15 volts and outputs a steady, regulated 5 volts suitable for powering logic circuitry at up to 100 milliamps or so. The energy monitor draws not more than 65 – 70 mA, and runs the device slightly warm. A second reservoir capacitor is connected to the output of the regulator to assist regulation and dampen transient loads.
Because this supply has a very short connection to a decoupled load, no high frequency decoupling capacitors on the output are shown as would usually be required if cables of any significant length were needed to connect the supply to the load. This would consist of a 100 nanofarad ceramic capacitor in parallel with the second reservoir capacitor. This would be needed because the imperfect properties of electrolytic capacitors give them poor high frequency response. The decoupling capacitor has a low impedance to these high frequency signals and provides a path for them to circuit ground without disturbing DC operation. I intend to discuss circuit decoupling in more detail at a later stage.
Next I will bring the energy monitor circuit together along with the complete mains circuit with output switching relay.
I was not going to be able to fit six optocouplers in the space allocated without some extreme prototyping. I decided to build the optocoupler circuit using small sections of perfboard arranged in layers. Each section contained a pair of chips and needed to be laid out in such a way as to maintain physical separation between the isolated regions.
Here are diagrams of each of the three layers with the six 6N138 optocouplers.
The base layer is part of the main energy monitor circuit board with the middle and top layers sitting directly above. Wire links connect all boards straight up and down in two rows along each side. This gives access to all signals from the base board.
All resistors are 470 ohms, somewhat taxing the small power supply which gets a touch warm but ensuring high speed by providing good drive current for the LEDs as well as quickly discharging the capacitance present on each phototransistor junction.
Next I will present details of the energy monitor power supply.
Now I had to choose. I had decided on a method of communication by transferring data signals bidirectionally through optocouplers, but which signals did I need at what kind of data rate?
At this stage I was still unsure precisely what load information was of most interest. Having deferred the details of the interface design to a later stage meant I did not have a clear idea what features of the energy monitor circuit would be needed to make the Energy Analyzer work.
Because this section of the circuit would be difficult to modify after installation I decided the best approach was make it a nice prototyping module, self contained and as full-featured and capable as I could reasonably devise. What features the Energy Analyzer actually needed would be determined experimentally later on.
The ADE7756 is able to provide sampled current and voltage waveform information. According to the datasheet, data is made available at sample rates of up to 27.9 kSPS (thousand samples per second). As each sample is three bytes (24 bits) plus the command overhead it seemed to me the raw bit rate through the interface would probably want to be as fast as possible.
Optocouplers in general are slow. Reading datasheets for commonly-available optocouplers like the 4N25 revealed they would be unlikely to achieve anything like these high data rates. I knew of another optocoupler though, a high spec and cost device I was familiar with from many years previous.
I had needed to obtain some fast optocouplers to construct a small range of MIDI music projects. MIDI is a serial interface with 31.625 KHz bit rate IIRC which required the use of high speed 6N138 optocoupler devices. A quick check of the datasheet revealed these devices can reach data rates up to 100k bits per second.
These days the 6N138 is not so hard to get or anything like as expensive. A bunch of these devices appeared to be my best shot at maximum interface speed and therefore flexibility.
The input side and output side of each optocoupler should be arranged to be completely separate. Different earth, different power supply. According to the datasheet the device can withstand 5000 volts potential difference between the two sides without disturbing operation.
But how many would I need? The ADE7756 has a bunch of signals in addition to the SPI-compatible serial interface, some provide information already available over the serial interface, others have extra information. Because the optocouplers fit well in pairs and four lines was only enough for the serial interface after some pondering I chose to have six optocouplers to make available the four serial interface lines Data In, Data Out, Serial Clock and Chip Select along with the Interrupt Request signal and the Zero Crossing signal.
So the interface would need to be bidirectional with six data lines. Each data line requires it’s own optocoupler, three optocouplers conduct signals from the microcontroller to the energy monitor and three optocouplers conduct signals back the other way.
More Soon…
So I had a simple working circuit that I could not physically touch, interface to or even power up without great care.
Sure, when functioning correctly it shows little voltage difference between most of the circuit and me (reference ground). I’m still not touching it though, and I want to make sure nothing else does. Small children, animals, curious technicians and other parts of my circuit included. There follow good reasons why not.
Here in Australia our domestic power supply is 240V AC MEN (Mains Earth Neutral). The way I understand it the Neutral line of each household socket is connected to Earth back at the switchbox. Our wall sockets are polarized, Active and Neutral are always the same way round. This ensures the neutral line will be close to earth potential and is generally the safest part of the AC circuit.
Or is it? It was not always the case people were so careful with mains polarity. Households could be wired incorrectly. Extension cords can prove faulty. An infamous range of early double adapters would reverse the connections to one of it’s outlets. In these cases the Neutral line of any device connected to an affected outlet is energized with full mains potential.
Given the simple ADE7756 energy monitor circuit I was considering, a transposed mains connection means the whole circuit and power supply connected to it has the potential to become live. That could cause any amount of carnage and destruction.
Even if I could guarantee polarity there are other issues. Current flowing in household wiring can cause voltage drops between the Earth and Neutral returns. If Earth and Neutral are shorted at the energy monitor circuit, significant amounts of unexpected current might end up flowing in undesirable ways. And we have not yet considered the effect environmental influences such as lightning strikes might have.
The Energy Analyzer was to be a user-serviceable device. I decided the only suitable solution was total galvanic isolation of the energy monitor circuit. This consists of six optoisolators for the microcontroller (UC) communication lines and a small mains transformer to provide an independent isolated power supply.
In addition to encapsulating the full circuit in a sturdy, close fitting plastic enclosure for physical insulation the completed Isolated Energy Monitor was to be the first and core internal peripheral for the Energy Analyzer device.
Next up: Optoisolator bus communication circuitry
The ADE7756 is a very capable energy monitor. The manufacturer calls the ADE7756 an Active Energy Metering IC with Serial Interface. According to Analog Devices:
“The ADE7756 is a high-accuracy electrical power measurement IC with a serial interface and a pulse output. The ADE7756 incorporates two second-order sigma-delta ADCs, reference circuitry, temperature sensor, and all the signal processing required to perform active power and energy measurement.”
The device has two input channels, one for current and one for voltage. These are amplified, digitized and multiplied together to produce a real power signal that is accumulated in an energy register. It would appear to be intended for use in power company meter boxes and emphasizes accuracy of measurement.
It can extract a great deal of information about a monitored load. Line voltage, line frequency, consumed current, instantaneous power and accumulated energy over a given time period are available over the serial interface along with high-resolution raw sampled waveform data. The chip even has a built-in temperature sensor which the datasheet suggests using for thermal drift compensation.
I notice the device has become obsolete. However it’s replacements are likely to share many characteristics of the device described.
I decided to use the chip I owned in a circuit configuration similar to the one in use in the Silicon Chip energy meter from which the chip was cannibalized. This would allow me to follow the simple configuration advice given in the excellent kit instructions but meant the energy monitor circuit, including the chip and computer interface would need to be considered “live”, and unsafe for direct connection to the rest of the Energy Analyzer.
Observe that he earth of the circuit is connected to the mains neutral input so measurements can be made relative to this point. This is mainly what makes the circuit so dangerous.
V1P and V1N on the chip are the differential current sense inputs. R7 is the current sensing, or “shunt” resistor in the Neutral line. The small voltage developed across R7 as current flows through the mains circuit is applied to the differential inputs through R1 and R2 which are current limiting protection resistors. R8 is simply a length of wire running close to the shunt resistor R7. This helps to cancel electromagnetic noise induced in R7 as the noise in R8 is fed out-of-phase to the differential amplifier.
V2P and V2N are the voltage sense inputs. R3 and R4 are in parallel in order to present the same impedance and noise profile to the differential inputs as the combination of R5 and R6 and ensure good common-mode rejection. R5 and R6 form a simple voltage divider to monitor the voltage on the Active line.
All inputs are bypassed with 33nF capacitors to prevent high frequency noise like radio waves picked up by the mains wiring from disturbing circuit operation.
Next I will explain my decision to go with total galvanic isolation for this particular circuit.
So why would measuring the current flowing through the appliance not be enough? Because when measuring AC this does not necessarily correspond to the current actually consumed by the appliance.
Something inside the appliance is consuming current and putting a load on the mains supply. Certain types of load “reflect” or bounce some current back into the supply with each cycle. The current used by the load may be less than the current flowing in the wires to the load.
As we all know (don’t we?) electrical power, in watts, is the product of voltage (volts) and current (amps). This is expressed in books as P = V * I where P = power, V = volts and I = amps.
What this is saying is that the voltage on the wire also needs to be taken into account when trying to obtain total power use. We need to measure both the voltage and the current and multiply them together to obtain a measure of actual consumed power. At this point avid readers are referred to an in-depth discussion of power factor to see precisely why.
Easy enough? Don’t forget that we are measuring AC, the actual consumed power measurement output is also an AC waveform. This again needs rectifying and filtering for display, and even more processing for energy accumulation and other function candy. All up, building an accurate power meter from discrete components is not a trivial undertaking.
So what about integrated solutions? I may have mentioned earlier an energy meter kit I once built. At the time I examined the datasheet for the integrated energy monitor chip it was based around, the ADE7756. My impression was of a bewildering device full of mysterious functionality, certainly more capable than the project it was attached to would lead one to believe. But this was all inside, the circuit connections appeared simple and neat. Indeed it seemed fully able to perform the tasks I wanted and with a handy microprocessor interface.
It is certainly not the only energy monitoring solution on offer by the numerous chip manufacturers and is unlikely to be the best but it is certainly very good, I already had one I wasn’t using and it appeared most suitable for this application.
Of course it is not quite as easy as all that. Because the chip is used in a configuration that is connected directly to the mains there is no safe part of the energy monitor circuit, any part could provide a potentially lethal shock. I wish to make an instrument that can be considered safe to use, disassemble and work on live (High voltages insulated internally). The mains-connected energy monitor circuit must be completely enclosed, insulated and isolated from the rest of the device.
Next: ADE7756 energy monitoring solution details
“So what makes a moving-iron meter good? Why not stick a multimeter on it?”
Moving iron meters are a very old technology. Unlike moving coil meters they deflect the same direction for either polarity of applied voltage, as if they had a rectifier built in. They were widely used with encapsulated shunt resistors as meters for monitoring large AC currents in industrial machinery and are still available but seemingly becoming rare. My colleague described some difficulty obtaining his desired specification.
They are a neat, rugged, easily readable and passive solution to the problem. The movement of the big heavy needle is positive and fast. The weight of the needle is a deliberate design feature as the inertia of movement acts as a filter to dampen fast oscillations. In conjunction with the pointer’s zero return spring the physical system would be tuned to reject 50-60Hz line frequency and “integrate” the signal thus minimizing pointer wobble with steady loads.
Of course one could design a simple rectifier + moving coil meter solution but that would probably work less well. Not being specifically tuned to line frequency means the circuit would probably also need a filter (or integrator). Depending on the characteristics of the chosen meter the filtering time constant would probably end up being a disappointing compromise between wobbliness and responsiveness.
All of these meters only show current consumed in amps. This is indeed useful information but it is by no means the complete story.
As for a multimeter, first consider digital. Users well know what it is like watching transitional signals on a digital, even the pricy ones. What about analog? Just another wobbly moving coil. Not all that convenient to connect and I can’t use my meter for other things. Get another meter special for this? Why not build it into a box with an easy wall socket? So lazy.. but not very good.
Next: I discuss why I feel just measuring amps is not nearly enough.
“Why not just use my cheap energy meter? Reads output in watts, watt-hours, power factor, whatever you need. Available everywhere, little more than pocket change. Even tell you how much the electricity will cost!”
A few friends have asked me this so far. I tried to explain that their device is actually a different instrument, very useful but not fit for my purpose.
There was a kit project released by Silicon Chip (Australian electronics enthusiast magazine) some time ago that consisted of just that type of energy meter. Being a new technology at the time, I purchased and built the kit. It was a somewhat disappointing result, the kit quality was excellent but the software was lackluster and slow. Fifteen seconds between display updates seemed excessive. It served some duty monitoring a small solar inverter before being shelved.
It’s replacement was a cheap and cheerful energy meter of the type described by my friends, shown above. Once again, it’s performance was unsuitable by way of it having a small, hard-to-read screen and three second display updates.
These energy meters are unable to present the information of interest which is right there on the appliance’s mains cable. I want to see very short transitions, pulsing, fluctuations and other events that are the signatures of the individual systems within the appliance. I’m not saying they’re not great, just not right for this.
I am sure there must exist already a class of laboratory instrument that performs the functions I need. Anybody got one spare? No worries, this is more fun anyway.
In the next post I will discuss simple current metering devices.














