(12 - 5) x 0.850 = ouch

by ericgu 17. February 2010 07:04

I recently finished the construction on my landscape lighting base station, putting everything into the boxes I have, and wiring everything up.

Turned the power on, pressed the buttons, and the relays worked fine. Turned on the remote, and it worked as well. Win.

And then I did the important heat test, where you grab the components to make sure that they weren't overheating. The relays were fine, the transistors driving the relays were cool, and the avr was also cool.

Then I burnt myself on the 7805 voltage regulator. Which isn't very surprising. The 4 relays pull about 750 mA in total, and along with the xbee and everything else, the total current draw is 0.85 amps. The regulator itself is rated up to an amp, so it's fine, but since the input voltage is 12V, that means we need to get rid of (12Vin - 5Vout) * 0.85A = 6 watts. Not a ton of heat, but waaay too much for the regulator by itself. I dug out the data sheet, and found that the 7805 is rated up to 125 degrees C at the junction which is pretty darn hot. I modded a heatsink into the side of the case, hooked it up, turned everything on, and let it bake for a bit. My IR thermometer says that the heatsink stabilizes at about 74 degrees C. This is okay for the device, but hot enough that you don't really want to be touching it.

So, I'm thinking about the option. There are really two that I've considered...

The first option would be to rework the output board. If I had been thinking ahead of time, I would have used 12VAC relays, driven then from triacs with opto-isolators that connected to the AVR. That would have dropped the per-channel current down to perhaps 24 mA, and the overall current to perhaps 200mA. But that's still going to dissipate over a watt, and still require a heatsink - though it would be a lot cooler.

The better option is to switch to a switching regulator. Those run at high enough efficiency to not need a heatsink, and they come in drop-in replacements for the 7805. A bit pricey, but certainly a simpler choice.

Tags:

Electronics

Landscape light update

by ericgu 26. January 2010 07:13

I've been pretty busy with skiing, but have made some good progress. I've played around a bit with the available commands, and have made a few decisions.

First, I've decided to use the xbees in their simple serial replacement mode. In this mode, it just acts like there's a serial cable between the two modules. The more complex stuff looks interesting for future stuff.

Second, I've figured out what I want to do to handle the handshake between the two devices and how to structure the code. I'll share some code when I get it written.

Base station:

  1. The main loop will constantly send out a heartbeat with the current status of the lights. It will send “EG0” if the lights are off and “EG1” if the lights are on, at an interval of 1 second. I'll either do the loop with a simple delay routine (delay_ms() from the standard library), or I'll piggyback on the short-period timer that I'll use to debounce. Probably the former.
  2. The interrupt service routine for the xbee will look for commands and process them. If it sees S0 it will turn the lights off, and S1 it will turn the lights on.
  3. The interrupt service routine for the pushbuttons (“all on”, channels 1-3 on individually, “all off”) will handle servicing the buttons. I'll probably use the short-period timer to debounce the pushbuttons
  4. The interrupt service routine for the long-period timer will handle turning the lights off after a time period.

That's going to use up most of the capability of the 2313 I’m using. I decided to do 3-5 output channels, each with a dedicated 30A relay to do the actual switching. The relays will be driven off of the avr using a transistor to get the necessary current, which is something like 200mA, far more than you can get from an AVR.

The xbee unfortunately runs on 2.8-3.4V, not the 5 volts I bought for the power supply. The adapter boards that I bought down-regulate the voltage, but I don't want to waste them on a project like this. I could put a nice 3V regulator on it if I have it, but I'm thinking of just putting three silicon diodes in series, which would give me 0.65 * 3 volts - almost perfect - and it will work fine assuming I don't pull too much power through them.

Remote station:

This one is going to go in a tiny project box, which an on/off switch, a link LED, a status LED, and a pushbutton. I'm going to fit all that into a tiny project box, along with two AA alkalines (or maybe AAA if I don't have the space).

The code will be something like the following:

  1. On startup, blink the link LED a few times.
  2. On the interrupt service routine for the xbee, look for the EG0 or EG1 data. If it's there, turn on the link LED, and turn on the status LED if the command was EG1. Set the short-period timer for about 900 mS.
  3. On the short-period timer interrupt, turn off the link LED. This will have the effect of blinking the link LED off for 100mS as long as the remote is receiving data from the base station.
  4. I'll use the long-period timer to debounce the switch. On that interrupt I'll send S0 if the current status is on, and S1 if the current status is off.

 

Lights

I mounted three sets of three lights on trees over Sunday, so this weekend I'll be able to wire them up to the transformer and see what voltage I need to use for each zone.

Tags:

Electronics

Outdoor Lighting Project

by ericgu 7. September 2009 07:01

I have a lighting issue at my ski place that I need to solve.

If the weather's good, we just drive up, unlock the gate (in the car's headlight), and wait for the motion detector lights to kick on.

If there's a little bit of snow - say, 3" or so - the Outback handles it fine, and I get out the snowblowblower and clean off the driveway. Except once I get about 50' away from the house, I can't see anything any more, and snowblowing in the dark isn't a lot of fun.

If there's more snow, we can't get into the driveway, and have to park out in front, unload in the dark, and then walk across the meadow and through the woods to the house. In the dark.

Seems like we need some lights.

The first choice is whether to go with line voltage or low voltage. Really simple in this case - I need to get the power to two locations about 150' from the house, and I need to get the lights up into the air. That means a whole lot of trenching through the woods and putting up poles to attach the lights to. Or, it's running some zip cord through the woods and then mounting some lights up in the trees. So, we're going the low voltage route.

Which has some problems of it's own. One of resistance.

The transformer for the system will mount in the house, and that means about 150' of wire to each of two remote locations. Let's say we buy 12 gauge wire, just to make it easy. We have 300' of wire total, and if we look up the resistance, we find that it's 1.588 ohms/1000 ft, putting us right about 0.5 ohms for the 300' of wire.

That doesn't seem like a lot of resistance, so let's look at some numbers. If we want to run two 20 Watt lights, that will take 40 / 12 = 3.3 amps, so we'll lose 0.5 * 3.3 or 1.6 volts. With 12 volts running into the run at the start, that means we have 10.4 volts into the lights. If they're halogen lights, they don't like that - halogens require full voltage or their lives are reduced considerably. If we bump up to 2 50 watt lights, it's much worse - we're pulling 8 amps and losing a full 4 volts in the wire.

The professional low voltage transformers have taps at higher voltages, so we'd hook up the 14 volt tap for the 20W lights, and the 16 volt tap for 50W lights. Unfortunately, the pro transformers are fair bit more expensive than the ones I'd like to buy. Another option would be to go with thicker wire 10 gauge only has about 2/3 of the resistance, but it's also half again as much copper, so it's a lot pricier.

As an alternative, let's consider a system with LED bulbs instead of halogen ones. You can now find 3-5W LED MR16 lamps that in the $20 range, producing the same amount of light as a 20W (ish) halogen. It's about 5 times more efficient, which means that if you put two of those out, you are only pulling 1 amp, and you only lose 0.5 V. I can probably step down to a smaller wire gauge with the right transformer.

Not sure which way I'm going to go yet. But I do have the control system designed. That's up next...

Tags:

Electronics