Light progress

Lots of progress this week.

After teaching skiing all day Saturday, I went back to the cabin and wired up the lights in two places. I had bought some outdoor wire nuts that are filled with silicone, but they turnout not to work well at all and to be exceedingly messy. I ended up using crimp-on connectors (yellow), which should work okay in the weather if they’re crimped well. After it got dark I went into my shed and hooked up two lights there, 20 watt auto lights just hanging from the rafters.

In the morning we were tired, too tired to go skiing, so I went out and measured the voltage on each of the away locations, and found that they were both at about 8.5 volts. I moved that circuit to the 15V tap on the transformer, and then wired up the middle-distance lights, and switched them to the 14V taps. All of them look much more like halogens now.

When I got home, I finished the base station code by adding in a status light, and then started on the code for the remote. It was pretty simple, and only took a couple of hours – I was able to adapt the code that I wrote for the base station.

And now for the real test – could the remote talk to the base station? I breadboarded up the remote and got it working talking to the second xbee on the PC, and then hooked up one Xbee to the base station and the other to the remote. After remembering to reverse the transmit/receive pins, it fired up and worked first time. Press the button on the remote, the lights toggle on the base, and then the status light on the remote switches as soon as it gets word back from the base station.

I took a little trip outside, and found that the remote could still get a signal for from the base about 200′ or so away from house. That’s pretty good considering that my workbench is in an office that’s mostly underground. It’s also possible that the antenna orientation is sub-optimal – there’s a short antenna attached to the module but it’s currently flat against the module, which may compromise the dispersion pattern.

I lost control over the lights at about half that distance. I think the jury-rigged diode-drop power supply for the xbee didn’t give enough current for the remote xbee to transit consistently at full power. In the real version of the remote I plan to run everything on 3 volts from the battery, and that should work a bit better.

I’m also going to speed up the frequency of the updates that go from the base to the remote – right now they only go at 10 Hz, and sometimes there’s a noticeable delay between when the button is pressed and when the light shows up.

Here’s a picture of the breadboarded remote and the base station. Click on it for a Flickr view with some more information.

I did some test fitting of components in the case I got for the remote:

Fit test for remote components

I thought it was going to be too tight, but I think i will probably be fine. 

I really like microcontrollers – it takes a while to do the code but the discrete component count is so much smaller.

Remote bill of materials:

  1. Attiny2313v
  2. 2 AAA batteries
  3. Battery holder
  4. on/off switch
  5. momentary pushbuttons
  6. 3 leds & dropping resistors
  7. xbee pro module
  8. Case/wire/etc.

Base bill of materials

  1. 3.3V regulator
  2. Bridge rectifier
  3. 2 – 10uf filter caps
  4. attiny2313v
  5. xbee pro module
  6. 5 momentary pushbuttons
  7. 1 led & dropping resistor
  8. 4 relay sections (5V 30 amp relay, transistor, 2 resistors)

So, what do you think ?