Arduino / LED Matrix Control

– https://github.com/chrols2014/UVLEDMatrixArduinoCode/blob/master/UVLEDDrivers.ino

Processing / LED Model / Trackpad Interface








Several years ago, while I was still living in South Africa, I experienced a beautiful natural phenomenon. While walking through the shallow waters of a salt-water river mouth, I noticed a shimmer in the water as it swirled around my legs and feet. Thinking it was merely a figment of my imagination I dismissed it, however, moments later, the water unmistakably illuminated all around me and I realized that in fact there was something beautiful occurring. Bioluminescent plankton contained within the water from a Red Tide earlier that day, were lighting up in amazing displays of colour as the water was disturbed. Fascinated by the effect I decided to collect some of the water and the organisms within it, so I could observe them further at home, unfortunately they didn’t last long and soon died the next day. This experience stuck with me from that moment on and further fuelled my fascination with the natural world and the astonishing beauty it contains.

When starting this project with the assignment theme of water as an interface, my mind instantly went back to this childhood experience. I wanted to somehow convey this experience through means of technological methods. I already knew that tonic water contains quinine, a substance known to fluoresce when exposed to ultraviolet light, therefor I wanted to exploit this property to achieve the effect. By using UV LEDs and tonic water, my hope was to create an interactive experience that would recreate the sense of wonder that I felt back then as a child.

To aid me in this endeavour I managed to find various sources to help influence my design choices. The first of these sources, a YouTube video depicting the same effect I witnessed, provided a refresher into the visual aesthetics that these bioluminescent creatures manifest. I wanted to try and achieve the same level of vivid colours in my project. Another source of inspiration I found was an exhibition created by the artist Shih Chieh Huang, after he had been studying bioluminescent creatures in the deeps of the ocean. He, similar to my approach, used neon coloured LEDs to try and convey the same effect as those creatures.

This was accompanied by more research into bioluminescence as well as other artworks that have incorporated the phenomenon. Furthermore, I was able to find good examples of existing, non art based projects that successfully used UV LEDs and tonic water to create glowing, liquid interfaces, one of which is referenced below, this was significant because it demonstrated how my intended use of the materials would work.





Nemerov, Alexander1. “The Glitter Of Night Hauling.” Magazine Antiques 179.3 (2012): 146-155. Art Source. Web. 4 Dec. 2014.





1 – UV LED Through Tonic Bottle

The first thing I decided to test was the effect the UV LEDs had on the tonic water. The desired effect was for the tonic water to fluoresce a bright blue when the UV light would shine through it. My concern was that the low-power LEDs would not be a strong enough light source for the quinine in the tonic water to react.

As seen in the video, the UV LED did have an effect on the tonic water albeit not as strong as I had hoped. I noticed that the effect of the light was intensified when I aimed the light through the opening of the bottle (avoiding the plastic). This would suggest that the plastic of the bottle is filtering out some of the weak UV light.

My initial design had the LED’s below the plastic container in an attempt to avoid the tricky work involved in trying to submerge the LEDs and make their electrical connections water-tight. After these results I think I may have to submerge the LEDs.

2 – UV LED Submerged vs Through Plastic

After the previous test results, it made sense to progress to actually submerging the LED in the tonic water to see if the results were good enough to justify submerging the LEDs in the liquid and committing time to do the waterproofing.

I wasn’t sure how best to test the UV LED in liquid so I just decided to rig up the light using crocodile clips and then simply dipping the the encased surface of the LED into the tonic water, making sure to not get moisture between the electrical contacts.

As soon as the LED met the tonic water and began to submerge, I could tell that the effect was much better than the LED simply being on the exterior. The light seem to create a cleaner beam, illuminating a clear patch of the tonic water. I decided after this test that I would have to submerge the LEDs in order to get the best effect.

3 – Testing UV LED Matrix With Arduino Code

This was a simple test of the LED matrix. I used a simple piece of Arduino code to write a PWM value to each LED in order so that I could make sure each channel was working and that the corresponding LED was in the position I expected it to be. Essentially it was a test of my dressing system. As you can see in the video, I was fortunate that each LED worked the first time around. At this point I knew that if I could get the Processing sketch and the Arduino to communicate via serial, I could achieve the desired effect.

4 – Processing Sketch

Another major part of the project is the middleware Processing sketch that would interpret the input (yet to be determined) and plot those coordinates onto a matrix, updating the Arduino’s UV LED output, depending on position. I wanted to take this approach because I was apprehensive about coding this project without a visual aid of what the output would be. It also allowed me to test the system with a simple input, my computer’s mouse.

A crucial part of the program was the collision detection between the input coordinates and the various LEDs position. I was unsure how to code collision detection but after some research I found the solution. This test represents the testing of the collision as well as the addition of a buffer around each LED, allowing me to configure the distance a finger would need to be from the each light to activate it.

The test was a success and I’m confident it will be able to handle the visual aspects of the LED’s, brightness, fade, location, etc…

5 – Serial Comms

Another major part of the project was to test out the serial communication between the Arduino and the Processing sketch. The Processing sketch was responsible for controlling all of the light values and then outputting the value for each LED via serial to an Arduino. The Arduino’s only job was to receive the array of values from Processing and update the PWM driver, in turn controlling the current value of the matrix.

My concern was that the Arduino would not be able to receive all 16 values at the same time as serial communication can be a bit buggy. I knew that some tweaking would be necessary in order to get the timing right. As you can see in the test, there were initially problems with serial communication. It seemed the Processing sketch was transmitting to fast for the Arduino to keep up. I made some changes and by the end of the test you can see I was able to get a pretty fluid motion across the LED matrix.

6 – Kinect Test

The kinect was another option to use for the input method. I had planned to potentially position a Kinect, pointing at the container of tonic water and then use hand and finger tracking to watch users interacting with the liquid. I had concerns about this approach because of the limitations of it. The angle would have to be very precise and there would be issues with detecting the finger tips when they were submerged in the liquid.

This test was to find out the complexities of setting up the Kinect with my software and the types of constraints I would have to employ in order to get the desired results to work with. From all the data the Kinect can provide I only needed the points of fingers in the liquid.

As you can see in the experiment video, the Kinect worked relatively well however there would have to be some major additions to the library used. In the end I decided against using the Kinect as I felt it was overcomplicating the project. I really wanted the interface to be self-contained, using and external sensor seemed to detract from that.

7 – Cap-Touch Basic Test

The initial plan for the project was to include capacitive touch sensors within the liquid itself in order to calculate the position of contact between the finger of a user and the tonic water. This seemed like the best method to create and actual interface out of the liquid. I was unsure that this method could work and knew it would take a while to work out the complexities of the hardware as well as software.

This test was the first step in trying to determine if this approach would not only work but would be viable for the time frame of the project. I wasn’t sure if tonic water would even conduct the same way water would. I knew that water had been used like this so I had hope it would also work.

I was able to get the capacitive sensor to work well, however, due to time constraints I had to abandon the plan. I hope to do more testing though and perhaps try to incorporate the feature into a “version 2.0”.