Heiniger-Net

Lava lamp project, part 1 — hardware

I want­ed to build a device that can light in dif­fer­ent col­ors, and where the col­ors can be con­trolled from a com­put­er. My idea was to hook it up with a com­put­er, who then should sig­nal some state by light­ing the appro­pri­ate col­or. For exam­ple, while build­ing and com­pil­ing a pro­gram, the lamp should blink in blue col­or. When the build is fin­ished, the lamp should light either in green (when the build ran fine) or red (when some­thing went wrong).

I found the lava lamp shown to the right, which is equipped with a col­or-chang­ing LED and is pow­ered from USB. I bought one and intend­ed to mod­i­fy the con­trol­ling elec­tron­ics to my purposes.

The lava lamp has a built in col­or LED with a con­troller chip, that goes through all the rain­bow col­ors in a pre­set tim­ing. Indi­vid­ual col­ors can not be dis­played as need with this kind of LED. Only the col­or red can be achieved by puls­ing the input volt­age. This LED, there­fore, does not ful­fill the intend­ed purpose.

Instead I need a RGB-LED, whose col­ors can be con­trolled indi­vid­u­al­ly. That kind of LED can be bought in your favorite elec­tron­ics mar­ket, for exam­ple this one with com­mon cathode.

What I need­ed now is some con­trol elec­tron­ics, that can inter­face to USB, can be pro­grammed from the com­put­er, and con­trol the col­or of a col­ored LED. A friend of mine told me about the Picaxe micro­con­troller as an easy way to receive ser­i­al sig­nals and which also has dig­i­tal or ana­log out­puts to con­trol an LED. There­fore, this is what I came up with:

J1 is the main con­nec­tor with these pins:

  1. VDD, 5V
  2. Ser­i­al out
  3. Ser­i­al in
  4. VSS, or Ground, or 0V

J2 cor­re­sponds to SW1 and it can be used for doing what­ev­er the Picaxe can be pro­grammed to do with it. Maybe it can start a fixed col­or-chang­ing pro­gram, or it can turn the LED on or off.

R6 is a pow­er resis­tor sup­posed to warm the lava lamp water a lit­tle, so that the glit­ter in the water gets moving.

Now I need a USB-to-ser­i­al adapter. I bought this one, whose fat plug I removed and sol­dered the rel­e­vant pins direct­ly to J1 of my cir­cuit above. Now I only need to attach the whole thing in the foot of the lava lamp 

With this con­struc­tion, I end up with a USB device that announces itself to the com­put­er as a ser­i­al COM port, which is attached to the Picaxe micro­con­troller. The Picaxe can be pro­grammed with the help of the nor­mal “Picaxe Edi­tor 6IDE. I will talk about the nec­es­sary firmware pro­gram­ming in anoth­er article.

As a con­clu­sion, one can say that my project idea requires mas­tery of the fol­low­ing three challenges:

  1. The Hard­ware must be built. I described this process here roughly.
  2. The Firmware for the Picaxe must be writ­ten. This is a piece of soft­ware, that reads the desired col­or com­bi­na­tions from the USB port and lights up the three col­ors of the LED accord­ing­ly. I wrote this firmware already.
  3. The Soft­ware, that sends the nec­es­sary col­or codes to the USB port as a result of more or less com­plex events in the com­put­er has only just begun its devel­op­ment phase. I am afraid that this part has the great­est com­plex­i­ty. In oth­er words, it is pos­si­ble to invest a huge amount of effort in order to cre­ate a more or less lux­u­ri­ous thing. This part may nev­er real­ly be finished. 🙂

 

Here is part 2 of this series.

Exit mobile version