Saturday, December 20, 2008

A Cautionary tale.


Some time ago I built a trivial irrigation controller. Based on a Atmel NGW100 (AVR32 CPU) it just controlled 2 x AC solenoids. Taking the easy way out, I used a couple of solid state relays to do the buffering between the CPU and the solenoids.

In keeping with keeping things mildly simple, I also derived the board power supply from the 28VAC that drove the solenoids. 28VAC, into a bridge rectifier, across a capacitor, and into an LM7815 supply a nice 15VDC that the NGW100 was very happy with.

The thing that wasn't happy was the LM7815. It was sinking the best part of 150ma across a ~15 volt drop. AKA a 2 watt dissipation. The LM7815 is something like 65 Celsius per watt to air, so that wasn't going to fly. I add a tiny heat sink I had lying around, but it got a bit hotter than I'd estimated (and than I was really happy with), so I just bolted it to a whacking big hunk of aluminium and called it a day. That's been working nicely for a couple of months now.

In the interim, I'd ordered some DC/DC converters. Little drop-in replacements for LM78xx devices, they promised to make all the heat issues go away.

So today I pulled the box out, and happily removed the LM7815 and added in a dimension engineering device. Adjusted it for 15 volt output and all looked good.

In an abundance of caution, I checked the voltages across everything between taking it all live.

This was fateful. Much to my surprise, the DC voltage from the bridge rectifier was over 40 volts! No wonder the poor little LM7815 was unhappy. I guess nameplate rating don't mean much on AC devices. It's putting out considerably more AC than it's rating. (Too light a load probably?)

A thought tickling the back of my mind had me looking up the datasheet: The absolute maximum rating for the DC/DC converter was 35 volts.

Yuck.

At this point, I should have put anything back and called it a day. But no, I was much to pig headed for that.

The next thought that occurred was "Well, 40V is too much for the DC/DC and too much for the LM7815, so why don't I just run the DC/DC with a floating ground to make it happy?". I.e. connect the ground for the DC/DC convertor to the output of the LM7815, so it only sees a ~25 volt differential. The connect the input of the LM7815 to the output of the DC/DC so it only sees a ~2 volt drop it has to manage, and every one's happy.

Oh, sorry day.

So I stupidly wired this all up, blightly ignored concerns about "what does this look like when it's powering up?" and "Is it stable!?" and promptly managed to stuff a 40volt power-on spike into the NGW100. Which has it's own DC/DC convertor with a 22V absolute max rating. Which blew up. :(

In hindsight, this was bleeding obvious. The DC/DC is going to look like a short circuit to ground on power-up (charging caps), so it's going to drop the full 40V to the line after the LM7815 == Boom! No shortage of haste and stupidly around here! No siree!

Very unhappy. To make it better, on my TODO list for later in the day was to write the software to backup all these boards I have running around the place. :( And all the mucking around, testing and poking, and then trying to coax the NGW100 back into life had chewed up most of a day. Very, very unhappy.

But the time I'd put a new board in, put the old power supply back in, and re-writing the software it was a 14 hours exercise in utter pointlessness. Not that I'm bitter or anything!


The only bright spot was: I got a new toy. I've been meaning to get a Li-ion cordless drill for some time, but last I looked (umm, about 2 years ago) they were pretty expensive.

Today I picked one up at bunnings for ~$AUD200 including spare battery. Wow. Prices really had dropped! It seems to work well: I was putting 7mm holes into timber this afternoon and it was doing just as well as the corded beast.

(The corded beast really is a beast: I bought it when I was driving 150mm bugle screws after the 600W drill I was using leaked all it's magic smoke. The beast has enough torque that I'm in fear of my wrist bones on occasion).

No comments: