Our Geeky Wedding – Electronic Wedding Wishing Well (eWWW)

Posted in Projects, Wedding by Bill
8 Oct 2012
Our Geeky Wedding – Electronic Wedding Wishing Well (eWWW)

This is the first (and probably only one before the big day) post regarding my upcoming geeky wedding. This was one of those last minute “How can we make this our own?” efforts we wanted done in time for our engagement party. Mara had bought a cheap cardboard ‘Wishing Well’ for the party and our wedding. It was cute, but bland and uniform. We wanted to make it into something original and something that matched our theme ‘Circuits and Swirls’. So we turned it into the ‘Electronic Wedding Wishing Well’.

The base well comes from Oriental Trading for a measly $11. It was cheap and not very sturdy but got the job done. We ended up reinforcing the top with cardboard and covering up the electronics and wires with more cardboard.

Original Well

I had an idea in my head about I wanted it to do but I was short on time and money. In my case, I had less time then I had money, so I put together a shopping list of breakout boards that would get the job done.

In the mean time Mara set out to pant the well in the same styling (Circuits and Swirls) as our wedding theme. You can see that styling in the banner above. The base pattern on the well satisfied the swirls aspect, but it needed some circuit traces.  She masked lines on the sides with electrical tape and painted the traces. After they dried she hand pained the pads on the end of each trace. (Click pictures to enlarge)

End result of the new paint job

Top of Well

Then it was time for the upgrades. We first took a handful of LillyPad Micro LEDs and soldered leads to them.

Micro LEDs

This allowed us to attach the LEDs to the side walls by poking them through the cardboard and bending them back.

LED installed

I then soldered hookup wires terminated with headers to groups of 2 LEDs connected in series.

Wiring the LEDs

We also added two RGB LEDs to the top of wishing well base that light up the tissue paper roof to the well. We also reinforced the top cover with a layer of thick cardboard.

RGB LED Topside

RGB LED Bottomside

The brains behind the show is a run of the mill Arduino mated with a PWM Shield for running all the LEDs.

Arduino and PWM Shield

To play sounds along with the show, I settled on this Audio Playback breakout. It seemed to be the cheapest, but easy to implement solution out there. I also threw in a cheap speaker amp as well just to make sure it was loud enough.

Audio Playback, Amp and Speaker

To trigger the show, I designed and 3D printed a latch that would trip a photo interrupter.

The trigger sensor

It took a few tries to get it to work right.

Latch Attempts

The 3D files for the trigger mechanism are on Thingiverse.

Here’s a picture of all the electronics mounted on the top of the well.

Full Package

With the hardware in place, it was time to program the show. I created an MP3 of the sound effects I wanted to play, but didn’t have an easy means to program a light show to match. I considered doing it by hand. After all a light show choreographed to music is just a list of brightness values played back at a steady rate with the music. Trying to do that by hand though seemed like a daunting task without a quick way to make adjustments.

So instead I started looking at the same programs used to make those impressive Christmas light shows. The popular one, Light-o-Rama sadly isn’t free. I looked around for a while and found a clone that is free called Vixen.

Screenshot of Vixen

Even better, it saves sequences as plain text XML! Perfect for extracting data. Well, almost perfect. While the XML is plain text, the actual data that makes up the light sequence is stored as a binary list of numbers encoded to base64 ASCII. Further more it had no identifiers for channel or frame number so the data has to be parsed carefully to extract the right order of frames in channels.

Vixen Saved Sequence File


Well, hey an excuse to learn some more Python! I’m barely to the skill level of being able to hack python scripts so I spent a few hours Googling and learning. After that I had a script that would parse Vixen Sequence files and output a array formatted for Arduino of all the data that makes up the light sequence. (I have since wrote a Tutorial on the process to help anyone else wanting to do something similar.)

Python Script

Output of script formatted for Arduino use

Now I could use Vixen to design the light show with the music and easily embed the show onto my Arduino. With gratuitous program space (32k) I figured I didn’t need any external storage for the light show file. I’d simple store it in program space on the Arduino. My 14 second show of 16 channels and 20 frames per second only took up 4k of space.  Room to spare. The python script formats the array to be store in program space.

To playback the show, it’s a simple function to code.

void playShow(){

  //start music track

  int temp = 0;
  long start = 0;

  //start playing back show file and run LEDS
  for(int i = 0; i<vixen_frames; i++){
    start = millis();
    for(int y = 0; y<vixen_channels; y++){
      temp = pgm_read_byte(&(vixen_show_data[y][i]));
      temp = map(temp,0,255,0,2048); //scale to lower half of TLC range.
      Tlc.set(y, temp);
    delay(vixen_frameduration - (millis() - start));


The idea is simple, load up 16 channels of values for one frame, update the TLC chip, and then wait for a bit and do it again for the next frame. You might notice it’s a bit trickier to pull values from program space. You have to use the pgm_read_byte() macro with the address to the array in memory. If you don’t you get random data.

After uploading the firmware, The EWWW is complete. The parts list (without the Arduino) comes to about $92 but I had some of the needed parts lying around.


Source Code

The source for what’s running on the Arduino is available HERE.

For the python script and a tutorial on using it go HERE.


Trackbacks / Pingbacks

  1. Tutorial: Vixeno, Vixen Sequence Conversion for Arduino « The Mind of Bill Porter
  2. The Mind of Bill Porter

Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/46/d285670699/htdocs/bill/wp-includes/comment.php on line 879
  1. 8 Comments.

    • […] If you haven’t seen videos of those awesome Christmas light shows that sync lights to music then you haven’t ever been on the internet. The software used to create those shows is actually pretty simple to use. Load up a music file, setup number of channels and go to town creating complicated fades, sparkles and other animations with ease. A show or light ‘sequence’ is really just an array of values feed to a controller when played back. I wanted to use a popular (and free!) light show creator called Vixen to create a short light show to be embedded in a project run by an Arduino. This is the script I wrote to do just that so you can too. This tutorial will walk you through using Vixen to create a light show and then how to use my script to embed it in your next micro-controller project. Here’s what I did this it: The Electronic Wedding Wishing Well […]

    • Nice articles. Good luck to you and thanks for the tips!

    • RobNo Gravatar says:

      I can’t get this to work on my Arduino setup. It won’t compile. I get a mysterious error message that says:
      core.a(main.cpp.o): In function `main’:
      C:\…\arduino-1.0.3-windows\arduino-1.0.3\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop’

      It seems to be related to the #include line in VixenShow.cpp. Can you tell me how to fix it.

      Also, I’m a newbie and the “snippets” of code above are a bit confusing. Any chance you can post the entire *.ino file?


    • RobNo Gravatar says:

      Update – I found the *ino file (I had been looking for it on the tutorial page), but still get the compile error. I’ve read some things online about typedefs in avr/pgmspace.h being deprecated. Could this be the problem?

    • Kristin GNo Gravatar says:

      Did your wife design the bride and groom swirl graphic in your banner? I am in love with it! Please tell me if she didn’t where you found it. I am a mechanical engineer and my fiance is an electrical engineer. A lot of your designs and ideas speak to us. Thanks so much!

    • LOL> very geeky, but so cool at the same time!

    • […] write well-wishes for the couple. We decided to make a well that did more then just sit there by adding some light and sound effects. Combing an Arduino, an inexpesive music player, an PWM shield, and a 3D printed latch, the well […]

    • nction `main’:
      C:\…\arduino-1.0.3-windows\arduino-1.0.3\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop’

      It seems to be related to the #include line in VixenShow.cpp. Can you tell me how to fix it.

      Also, I’m a newbie and the “snippets” of code above are a bit confusing. Any chance you can post the entire *.ino file?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.