On the Trail of the MCU, Part 3: Oh, No… Not the Tea Kettle.

It’s only been a couple of days since I wrote On the Trail of the MCU, Part 2: What the Hell is a Lattice GAL Doing in My Stove Hood?  That’s because during the depths of winter I updated my to-do (read: to fix) list, and it was long.  “Long” as in fifty or so things around here that need attention.  Well, maybe they don’t need attention, but I need to give them my attention in order to reclaim some mental bandwidth.  The problem is that as I move around the house, I keep seeing defective things, and each one – every time I see it – reminds me that I have to get to it.  I want to reduce the number of those thoughts that distract me from more interesting, more creative work, so (short of just throwing the fuckers out) I have to repair them so they no longer represent those intrusive reminders.  Hence my drive to grind through the busted stuff.

After the long-suffering KitchenAid stove hood, I figured I’d make short work of a water boiler I picked up at another thrift shop some months back (I don’t mind telling you which this one was – Value Village – because they mostly suck).  Here it is, the Sunpentown JP-430 Automatic Dispensing Hot Water Pot:

jp_430.1280.1280

(Forgive my calling it a “tea kettle” in the title, because we don’t use that phrase around here – if it’s made to boil water, we call it a “water boiler”.  Making tea is a totally different thing.  But it made for a snappier, easier-to-understand title.)

Anyway, it was DOA when I got it for ten bucks or something, and I could (should?) have returned it, but we cook a lot and one of my girls has a one litre tea cup, so having four litres of boiling water on hand is pretty great.  (Note:  I do have an InSinkErator built-in hot water dispenser new-in-box in the basement – also a thrift shop score – but how about if you don’t add anything to my to-do list, okay?  Besides, I’m kind of thinking of saving that for the next place I live.)  At the time, I pulled the cover, and sure enough found another goddamn computer and parked it until… sometime.

IMG_6018

The microprocessor is the 14-pin DIP at the top corner of the board.

When “sometime” came around last night, I lucked out:  The data sheet for the (Chinese) Cmsemicon (never heard of ’em) CMS16P53 OTP (One-Time Programmable) MCU was readily found online.  Looking at the (cursory) data sheet, though, I’m not at all convinced that this is actually an OTP chip, which means it’s shipped without anything in its program memory and the designer installs his/her software using a special programming procedure (e.g. using a “device programmer” of the sort I used for my Lattice GAL, JTAG, etc.).  The “one-time” part means you can only do this once, as the device cannot subsequently be erased.  But since the data sheet doesn’t contain any discussion of the programming process, I suspect that this is a mistranslation, and that rather than being OTP, it’s actually “mask programmed” at the factory and cannot be field-programmed at all.  So this isn’t like the Lattice GAL of the previous article; it’s not a part I might have kicking around along with the convenient ability to make copies.  If it’s NFG I’m SOL and out a sawbuck.

But let’s take a step back:  Is there anything in this water boiler that needs a computer?  The answer is a resounding Hell No.  For at least 50 years people having been building them with simple bimetallic thermostats, and the added functions here (an electric dispensing pump and safety interlock) are, as with the KitchenAid hood, just as easily – and more reliably – implemented with a relay or two.

And again, as coincidence would have it, the problem here was simply a bad power supply, though a little more subtle than in the previous case.  Having downloaded the MCU’s data sheet, I threw a meter on the Vcc and GND pins and came up with 4.70V (which might be okay for a part with a wide power supply range) – but with 70mV of ripple, which is definitely a deal-stopper.  I might have put the scope on it, but since it appears to be powered by a little switcher, that would have been risky without first taking a closer look at the circuit, as clipping my ground lead onto a hot (non-isolated) ground would probably have blown the lead out of my hand – and I’ve been able to avoid repeating that mistake for 42 years.  So I took a SWAG (Scientific Wild-Assed Guess), spotted a couple of 470μF 25V capacitors whose tops seemed to be bulging a little, and replaced them.  And up it came, since one of those caps was on the MCU’s power supply rails and failing to do its job.

So here we are again:  An appliance featuring unnecessary digital electronics dead and discarded thanks to a failure of the extra circuitry needed to support those electronics.

On the Trail of the MCU, Part 2: What the Hell is a Lattice GAL Doing in My Stove Hood?

This is a little different than my original OtTotMCU article, in that it’s about appropriate design rather than odd supply chain paths.  But it starts in the same place, namely my being a bottom-feeder always looking to save a buck.  This time I’m not scouring a computer surplus warehouse, rather our favourite local thrift shop.  It’s a lulu – among a lot of other stuff over the past few years I’ve picked up four Dyson vacuums (I think I have less than $100 in the lot, and may actually love them more than my children, since the latter do not clean the house) and two Rancilio cappuccino makers ($15 each – kept one, sold the other for $600).  And no, I’m not going to tell you where it is.

I’d long needed an exhaust hood for my kitchen stove (a “range hood” to some).  As with all thrift shop stuff, you don’t really go shopping, but have to be aware of every thing that might someday be useful and ready to grab it in an instant – because at [instant + 5 minutes] someone else will have it in their car.  It smarts when that happens – last weekend I turned away for a moment from a countertop ice maker (I’ve been to France and do not take ice for granted) and someone else snagged it; I still feel like an asshole.  This is tricky business if you’re a pack rat like me.  So I ran across a KitchenAid KWVU205Y, which is a nice retractable hood with light, perfect for my application, and apparently worth about a grand new.  Five or ten bucks, can’t remember.  Took it home, powered it up on the bench, and everything worked – light and three fan speeds (the number matters).  Then, over a rather protracted stretch of time (price a 6″ hole saw you expect to use once to cut a hole through the outside wall of a cedar log house and you’ll see why I was willing to wait for one to come from China) got it installed and wired.  And it was great – eliminating the annoyance alarms coming from our smoke detector during cooking.

Then it stopped, and I mean really abruptly.  Light and fan went off and refused to be restarted, except for sometimes, and even then not often or for long.  Clearly that’s why it wound up at the thrift shop – an intermittent fault, the worst kind.  The cover comes off the little controller board in the wiring compartment, and the damn thing has a Lattice 16V8 GAL on it.

IMG_5994

This is where we sharply depart appliance repairman territory and rejoin the computer hardware engineers.  “GAL” stands for Generic Array Logic, a family of programmable logic devices (PLDs) from Lattice Semiconductor, a plucky, independent semiconductor company based not in Silicon Valley, but in Oregon.  GALs were a modernized, low-power reprogrammable version of the original OTP fusible-link PAL (Programmable Array Logic) chips from Monolithic Memories (MMI, which was absorbed by AMD).  The short version is that all of these PLDs allow the designer to pack an awful lot of “random logic” functions (gates and flip-flops and stuff) into small, inexpensive, field-programmable chips.  They really are awesome and a lot of fun to work with, and here I’ll put a plug in for Tracy Kidder’s terrific book “The Soul of a New Machine”, which is about a team of engineers at Data General in the late 1970s designing a new superminicomputer to compete with the Digital Equipment (DEC) VAX-11/780.  Their pioneering use of PALs figures prominently into the story.  Anyway, these small early PLDs aren’t used anymore (Lattice discontinued their first-generation GALs in 2010); modern PLDs are incredible, massively dense devices like Xilinx FPGAs (Field Programmable Gate Arrays).

But back to the stove hood.  Appliances are (or used to be) of a class of consumer products known as “durables”.  That is, they’re supposed to be built to last – 10, 20, 30 years – because they’re made of metal and inherently reliable.  I mean, a clothes dryer is a box with a heater, a motor, and a fan.  So is a furnace.  And so is, pretty much, a stove.  A drop of oil from time to time and shit like that runs for decades.  At least that’s how it used to be, but it ain’t that way no more.  Without going off on a tear over China and plastics, the reason that durables no longer are is complexity, for which “efficiency” has been a common Trojan horse.  Why put an old-fashioned mechanical dial timer in that dryer when you can give it snappy, high-tech digital controls that make your competitors look positively Jurassic?  It may seem more modern, but what it really is is more complex, and with increased complexity comes not only increased failure modes and rates, but accelerated obsolescence.  What added benefits did all this high technology (and don’t fool yourself – the use of a GAL qualifies) bring to my stove hood?  Nothing but state memory; that is, when you push the hood in it shuts off the light and fan, but restores them to their previous settings when you pull it back out.  Big deal – you could do that with an all-relay design too if you wanted to, but it’s not much of a feature.

As it happens, a few years back I designed a little controller almost identical to the one in this hood.  The guys at a local grow shop asked me if I could build them an auto-change nutrient reservoir.  Hydroponic growing is about water and fertilizer solutions that not only have to be maintained, but changed regularly, and that can be a hassle.  They wanted to automate that change process, so at the push of a button the reservoir would empty itself down the drain and refill with fresh water.  No sweat – that’s a machine with three states:  Circulate nutrient solution, pump out, refill.  Two relays will automate four states, so those and a couple of valves and float switches (all 110VAC devices) and Bob’s your uncle.  Worked out the logic, wired it up, handed it in, and they were thrilled.  Then one of them – the clever one – made a show of explaining to me that you could do this with a microprocessor.  As patiently as possible, I explained that he was right, but then you’d need to add a power supply for the MCU and relays for it to drive the valves, so what would be the point when you can do it all with the relays alone?  He didn’t say anything after that.

This hood is that reservoir controller.  The fan has off and three speeds (four states, again two relays); add another relay and the light is covered, logically speaking.  But instead of doing it the low-tech way that would be inherently more reliable and serviceable by anyone until the end of time, some smartypants KitchenAid engineer (no doubt frustrated at having to design appliance controllers rather than computers) put a GAL in it to contain that state logic.  With a power supply to power the GAL.  And low-voltage relays to interface the GAL to the fan and light.  And I’m willing to bet that I’m the only person on earth who had one of these hoods die and has the knowledge and specialized equipment necessary to suck the fuse map out of that GAL so I can burn a fresh chip out of my stock of old PLDs.  To KitchenAid‘s credit, they socketed the part (though I replaced the cheap stamped socket with a machined one) and they didn’t blow the GAL’s security fuse, which would have made the fuse map unreadable by my device programmer.  Since this is an intermittent fault that could be anywhere, it’s not certain that I can successfully read the GAL’s contents, but if I can I’ll be able to burn a fresh part and/or back it up in case it dies later.  After all, what we’re talking about here is the software that runs the hood, software that’s bound up in a special little chip.  If that chip packs up and I can’t get that code into a replacement, I’m SOL.  I surely do like my KitchenAid stand mixer (named “Stan”), but phooey to KitchenAid for designing unserviceability and accelerated obsolescence into this appliance.  To be honest, I haven’t asked, but if I did I’ll also bet that a replacement for this board is either prohibitively expensive or completely unavailable.  So much for durables.

So what was the fault?  A bad power supply bridge rectifier (in the photo, it’s the little black cylinder to the right of the GAL) – the one responsible for the low voltages (+5 and +12) needed to operate the GAL and relays.  As I explained, without the solid state logic there’d be no need for that supply, a perfect example of added complexity and increased component count compromising reliability.

If I’m wrong on my first bet, and someone else on this planet has the same dead hood and the knowledge and a GAL programmer and some 16V8s lying around, here’s the fuse map.  You don’t really have to know how to read it to grasp that there’s not much going on in here (relative to the chip’s capability), but without it you’re buying a new hood – as, presumably, did the person who dropped this one off at the thrift shop for some bottom-feeder to deal with.

*QP000020
*QF002194
*G0
*F0
*L000000 11111111111111111111111111111111
*L000032 11111111111111111111111111111111
*L000064 11111111111111111111111111111111
*L000096 11111111111111111111111111111111
*L000128 11111111111111111111111111111111
*L000160 11111111111111111111111111111111
*L000192 11111111111111111111111111111111
*L000224 11111111111111111111111111111111
*L000256 11111111111111111111111111111111
*L000288 11111111111111111111111111111111
*L000320 11111111111111111111111111111111
*L000352 11111111111111111111111111111111
*L000384 11111111111111111111111111111111
*L000416 11111111111111111111111111111111
*L000448 11111111111111111111111111111111
*L000480 11111111111111111111111111111111
*L000512 11111111111111111111111111111111
*L000544 11111111111111111111111111111111
*L000576 11111111111111111111111111111111
*L000608 11111111111111111111111111111111
*L000640 11111111111111111111111111111111
*L000672 11111111111111111111111111111111
*L000704 11111111111111111111111111111111
*L000736 11111111111111111111111111111111
*L000768 11111111111111111111111111111111
*L000800 11111111111111111111111111111111
*L000832 11111111111111111111111111111111
*L000864 11111111111111111111111111111111
*L000896 11111111111111111111111111111111
*L000928 11111111111111111111111111111111
*L000960 11111111111111111111111111111111
*L000992 11111111111111111111111111111111
*L001024 11111111111111111111111111111111
*L001056 11111111111111111111111111111111
*L001088 11111111111111111111111111111111
*L001120 11111111111111111111111111111111
*L001152 11111111111111111111111111111111
*L001184 11111111111111111111111111111111
*L001216 11111111111111111111111111111111
*L001248 11111111111111111111111111111111
*L001280 11111111111111111111111111111111
*L001312 11111111111111111111111111111111
*L001344 11111111111111111111111111111111
*L001376 11111111111111111111111111111111
*L001408 11111111111111111111111111111111
*L001440 11111111111111111111111111111111
*L001472 11111111111111111111111111111111
*L001504 11111111111111111111111111111111
*L001536 11111111111111111111111111111111
*L001568 11111111111111111111111111111111
*L001600 11111111111111111111111111111111
*L001632 11111111111111111111111111111111
*L001664 11111111111111111111111111111111
*L001696 11111111111111111111111111111111
*L001728 11111111111111111111111111111111
*L001760 11111111111111111111111111111111
*L001792 11111111111111111111111111111111
*L001824 11111111111111111111111111111111
*L001856 11111111111111111111111111111111
*L001888 11111111111111111111111111111111
*L001920 11111111111111111111111111111111
*L001952 11111111111111111111111111111111
*L001984 11111111111111111111111111111111
*L002016 11111111111111111111111111111111
*L002048 11111111010000110100000100110000
*L002080 00110000001100010011011000000000
*L002112 00000000111111111111111111111111
*L002144 11111111111111111111111111111111
*L002176 111111111111111111
*C0B4D
*^C26F3