light-box-600

Philips has a new led lightbulb coming soon for $12, but of course it doesn’t have wifi or bluetooth radios for that price. cheap and hackable led bulbs are being done on kick starter too (but also without a radio). this is because just the wifi radio costs $15 dollars. but.. is a sweet rgb led bulb with wifi be worth 100?

the costs are mostly in the communications. for this reason, cheeper rf chips, or power line networking is used to send control commands. I can see why others would want to use these remotes, but I want automation, not another remote control to lose.

this makes the spark very attractive because of size and price and ease of use. it gets your device on the network right away, but you need to use their system to claim your cores.

what I really want is my lights to just be lan devices with proper ip addresses. I don’t need to reprogram them over the network, usb is fine. what they have developed looks really slick, but i use arduino for almost everything, so i don’t mind paying more for the larger, more expensive wifi board. I am impressed with mesh networking like open garden too, but I am old.. I just want a socket, tcp, udp.. just a plain socket, because I want to be able to write my own scripts.

now how may leds do I need to get enough light, and how well can I create the colours I want? the arduino mega pictured above is sourcing all the current the leds need, but calibrating the settings to get a proper white is not going to be straightforward. for now I am simply going to find levels I like and store them on the arduino.

the photo above has the following byte levels (not rgb levels, but the number of slices of the 5V output of the available 5 volts).
red: 160
green: 40
blue: 20

controlling the levels over the serial port, or over the wifi socket as follows:


[sourcecode language=”plain”]

if (buffer[0] == ‘m’) {
r = 255;
g = 255;
b = 255;
analogWrite(rPin, r);
analogWrite(gPin, g);
analogWrite(bPin, b);
Serial.println("<max>");
}

if (buffer[0] == ‘s’) {
r = 0;
g = 0;
b = 0;
analogWrite(rPin, r);
analogWrite(gPin, g);
analogWrite(bPin, b);
Serial.println("<off>");
}

Serial.println((String)r);

[/sourcecode]


so.. for 100 bucks a bulb, you can make your own wifi lighting. I intend to hide these under a counter, so I don’t need a nice looking bulb, just some glue and nice paper to diffuse the light some. mood lights and alerts will be pretty easy to code up, hooking into weather reports online: if rainy out, warmer colours in the brad cave. if hot and sunny out, cool and dim. just think of all the seconds of life I will have saved up, never having to adjust a light again.