Having built up and tested the peer-to-peer RS485 network protocol, it was only a matter of coding for a few days to write up the firmware for these “smart lights”. Here is a quick video capture of an early test:

The 3 lights on the desk are the top part of the lamp posts. They are sitting upside down on the desktop with the microcontroller and power electronics sitting on top. These boards will go down into the light post once it is mounted on the land.

The firmware supports cycled light flashing via a number of parameters. You can separately control light brightness rise time, on time, fall time, and off time. It also allows you to set things like maximum brightness and you can even randomize the amount of time it spends in the different stages of the cycle. And of course high time and low time can be set to infinity to hold it there.

Another fun value you can set is rise/fall “style”. You can do linear, S-curves, etc. with a few parameters to control them.

All of these values and more are set remotely over the RS485 serial bus via the packet protocol I developed previously.

For this video test I sent a single packet to the 3 lights to set maximum brightness to 50%, rise time of 2 seconds, high time of 0 seconds, fall time of 2 seconds followed by 2 seconds off before cycling back and doing it again. Each of the 3 lights has been instructed to be 33% out of phase to give it the feeling of “passing the light around”.

One of the cool parts is that all of this was set-up with a single packet from the PC sent once. This is the “smart” part of this “smart light” project.