Sunrise Lamp Project

Started 8/15/2008

With my new job and the start of the school year and with winter coming soon in Minnesota getting up in the morning when it's really dark out can be a chore also my wife is from a warm sunny country and misses the sun in the morning. I remembered I'd seen some lamps which turn on the morning slowly and use special natural light bulbs and I looked into purchasing one but all the ones I found were expensive and did not get very good customer reviews and the replacement bulbs were also expensive. They also didn't even have basic functionality or control that my current alarm clock radio has like weekday only operation or even a radio on some. So I looked into finding a way to do things myself.

The first place I looked was SmartHome because I had purchase some home automation stuff from them before and I knew they sold power outlet controller lighting products but the best I could find was to preset a device for a max 9 minute adjustable ramp rate brighten cycle and that would be for anytime you wanted to turn on the light. I wanted more control than that. I found a couple timers which might work but again I didn't have a lot of control. It looked like you could use the PC but then it needs to be on all the time. These solutions would also cost more than just buying a lamp. So I continued to look.

Finally I thought I'd try the manufacturer of x10 devices directly. Oh man what a garish web site, it's sure hard to look at. These are the guys that made me swear off all Internet advertising with that damn x10 camera banner ad along with catch the monkey ad from a few years past.

The first thing I found was the firecracker, a direct serial device that allows you program x10 devices directly. There was not much direct support but there were users making it work for them and it was cheap. But it would probably require quite a bit of work to make it do what I wanted.

But, looking at their other products a bit closer I found they had a programmable USB controller that looked like it would do the trick and much cheaper than the smarthome solutions. They also seem to have a sale everyday with different stuff. I decided I'd buy a package for $100 with a bunch of different controllers and at least three dimmable lighting plugin controllers and see what I could do, if it failed I could a least play with the technology. I thought I could maybe purchase 3 lights (red, green, and blue) and even recreate an accurate simulation of the colors of the sky during sunrise.

They arrived in a big box and inside were lot's of little blue boxes containing an assortment of  power line control devices (sorry no picture but they were cute). The software install was all through the Internet and didn't go really smoothly (I rather they just included a disk) but I did get things working eventually after trying it again and the x10 forums people did provide prompt support so no complaints there. The control device is USB and you download the macros and timers to the device and the batteries in the device retain the programming through power outages. It also knows about sunrise and sunset and holidays throughout the year which can be fully customized, better than my alarm clock.

Getting started with programming the device I plugged a lamp into a module next to my desk and gave it a go. Using the dim and brighten macro commands resulted in some problematic behavior. The device would either bright or dim from full on or full off every time you sent it a command. Not exactly what I had in mind for a smooth transition from off to on.



Back to the Internet resulted in some useful information on the devices. There are apparently two versions of the LM465 device the older one worked as I envisioned and the new one didn't but the new one also support some extended command codes that would do what I wanted. Using the extended code command byte of 0x31 and then data byte with the dim level (0-0x3f) I could finally control the device as I wanted. I programmed up a macro and ran a test with success.



You cannot control CF bulbs this way so you can't conserve energy. For CF bulbs you need to just use the appliance module which switches with a clunk and does not dim, not too friendly for the bedroom. A visit to Menards resulted in a full spectrum 60W standard bulb for $4 which is much cheaper than the replacement bulbs in those sunrise lamps. I also found a set of three colored bulbs (red, green, blue). I guess I can build a lamp and mount all the bulbs inside and set up the controller to simulate the sunrise colors but that's another project at this point I think.



I installed the controller unit and the lamp module and a wall switch module in my sons room to get him up in the morning for school. It worked great for my lamp but for some reason not in my sons room. Back to the Internet again resulted in some more information that the electricity in a house are usually split in to two sides and these electric circuits are not connected. You need to install a power coupler between the two sides to be able to send signals from one half of the house to the other. You can purchase a special adapter that plugs into a 240V 30A dryer socket or use a unit  installed next to the breaker box. I didn't have any 240V 30A dryer sockets but I did have a 240V 50A Nema 6-50R socket for a welder from the previous owner. Investigating the socket reveled that the two plugs were connected to the two sides of the house and the ground plug was incorrectly connected to the neutral. The actual ground line was left loose in the socket box and it used some massive power cables. The breaker box power coupler unit installation required connection between the two sides and neutral so this was advantageous for my case but was wrong and made me wonder about the wiring skills of the previous owner. I would probably want to rewire the box correctly before plugging in an actual welder and making use of the socket for a 50A device. For the moment I will use it as is and make sure I put a note on it for anyone who might use it in the future.



After ording the coupler and a trip to Home Depot resulted in all the parts needed to make a coupler dongle to plug into my welder socket. I was able to assemble it without too much difficultly but I needed to test things before I plugged it in. I verified that the line was 240V across the plugs and that neutral to each plug was 120V. It's always a little nerve racking when dealing with 240V which can kill you and especially a socket capable of 50A so be careful and get someone who knows what they are doing to help you if you have any doubts. I turned it off again and plugged in the device and then turned on the circuit breaker. No sparks at least. Testing the lighting control from one side of the house to the other now worked. I now have a sunrise lamp capability throughout the house and can control a few other lamps as well to turn on at sunset and off later in the evening or whatever a much better deal than just buying the sunlight lamp radio. I still need to work on the sunrise color simulator.
$13   CP000 Passive Power Coupler (smarthomeusa not to be confused with smarthome which costs more)
$4 60W Sunlight Light bulb
$12 25W Red, Green and Blue Light Bulbs
$15 6-50R Nema plug (home depot)
$0.50 1 foot 3 wire power cable (home depot)
$1 Electrical box (home depot)
$0.50 Electrical box cover (home depot)
$1 Electrical box cable clamp (home depot)
$100 Active Home Pro starter package (x10)
1 Active Home Pro Software plus all modules
2 Appliance Modules
1 Programmable USB Interface
1 Screw-in Lamp Module
3 Dimming Lamp Modules
1 Maxi Controller
2 Dimming Wall Switch Modules
$147 total


Another successful project.

back