Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Wednesday, December 24, 2008

SMD Oven

I started looking some time ago at a temperature controlled oven to do surface-mount device soldering.

An oven has a couple of advantages: It's much easier to get even temperature distribution, and it's easier to follow the temperature soak profile listed in the datasheet (Important for some of the more complex sensor devices).

The first point has been a serious pain to me: Devices with sharp edges are likely to see those edges heat up very quickly so when using a hot-air gun it's easy to burn the edge of the part before the solder is close to melting. (Very easy. Really, really easy. Especially with expensive sensors that have wierd things poking out. Or expensive ZIF ribbon connects. For example. I'm just saying).

So I put together a simple board to interface to a K-type thermocouple. It's just a MAX6675 which does a K-type thermocouple on one side and an SPI interface on the other. This connects to an NGW100 board, and the SPI drivers in the linux kernel take care of all the hardware interfacing.

A tiny userspace program handles reading temperature. The end result is ~ 0 - 1000 celsius with 0.25 degree precision and ~ 2 degree accuracy.

This is coupled with a computer-driven relay switching 240VAC that drives an SMD reflow oven (aka, an electric frypan I picked up at K-mart). I just drilled a hole in the side of the lid to insert the thermocouple into.

The frypan is turned up to maximum, and the element is pulse-width modulated. (Actually, it's sigma-delta modulated with minimum on and off times, but let's not split hairs).

From here, it's a trivial matter of writing some software to run closed-loop control of the heating element to walk the temperature through a profile.

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).

Thursday, December 11, 2008

Oops!

Ooops! Stuffed it up. Shortly after I send the board off, I realized that I had the 12V and GND the wrong way around on the jumper!!

This is just my sillyness in not checking it: I normally put power pins above ground pins, but the NGW100 doesn't follow my standard.

Being extra careful before sending it off again, I noticed that I had also managed to get the distance between the two 36-pin header wrong. Argh! Really not my day. And they were 34 pin headers instead of the correct 36 pin.

Ahh well. Board is now very carefully checked, send it off to batchpcb.com
Posted by Picasa

Wednesday, December 10, 2008

Relay board (plus a bit)


Following on from my successful 240V project, I designed a board to attach to the NGW100 and drive up to 8 relays.

The form factor for the board was dictated by the placement of the J5 and J6 jumpers on the NGW100, so there was a lot of spare board area.

So the logical thing to do was stuff in just about everything thing else I could think of that I ever interfaced to the NGW100. Which is why there's also 8-channel 1-wire interfaces, an SPI interface, and an RS-485 half-duplex driver.

The silk screen lists the RS-485 driver as the MAX-487, but it's really the equivilant 3.3V part. (I got lazy and skipped making a custom part in the library for it).

This board will plug straight into the NGW100, picking up all the signals from J5 and J6, and picking up supply power for the relays from J15, being the pre-DC/DC voltage.

This means that I can supply the NGW100 with 12VDC, which the onboard dc-dc convertor will drop down to 3.3V for the ARM32, and the daughterboard will take directly as 12VDC for the relay driving, but 3.3V for the SPI, 1-wire, and RS485.
Posted by Picasa

Monday, December 8, 2008

First 240V project!

Created my first 240V project over the weekend.

I now have a NGW100 emebedded ARM board driving a relay that switches 240V on or off.

This is wired to a K-type thermocouple that measures temperature up to around 1000 degrees celcius.

The final result is that I can now do controlled temperature profile for SMD soldering. The board monitoring temperature in an electric fry pan, and turns it on or off according to time and temperature to do a nicely controlled profile per the component datasheets!