On the top level there is the control circuit and 3 IR sensors. One IR sensor is directed upward and is used to play the lights while the other two are on the sides and are used to change the pattern of colors or change the mode (one hand change the color, two hands change the mode). The lights are played with music unless there is a hand on top. As in the previous version the scale of VU meter is adapted automatically in software but with a different algorithm: a IIR filter calculates the average sound intensity and that is used as 1/4 of the scale. This works better than computing the maximum sound intensity and use that value as the maximum of the scale as a occasional loud sound do not suddenly scale down the lights. Usually the beat of the music is 4 times louder than the average sound intensity so the VU meter fully light up when the is a beat.
All is controlled by a old school PIC16F883, the software is written in assembler and there are not multiply or divide instructions nor i used the routine provided from Microchip as were too slow. To scale the value of the sound intensity i recursively shifted and added the bits in two variables in the same way (one the current sound intensity, one the average) until the reference variable reached the top limit, then the other variable was scaled proportionally.
The IR sensors measure the amount of light that is reflected back from a hand or a object and is a cheap alternative to a distance sensor. For this application is not important to know the exact distance but is enough to feel if the hand is more close or more far from the sensor. This sensor works in this way: the IR emitter is off , the voltage across the photo-transistor is sampled as a reference of the ambient IR light, then the IR emitter is turned on and the voltage across the photo-transistor increases based on the amount of light reflected back from the object in front of it. It took me quite a bit of time to design the IR sensor. I did have the problem that the signal coming from the photo transistor easily saturates when the hand was close and if did decrease the sensitivity i could not detect the hand when was far. I solved this problem measuring the rate at which the voltage increase (for close range that saturates the sensor) and the voltage reached at plateau for far objects. After this i did have the problem that the resulting value was highly NOT linear with the distance of the hand (the value was exponentially higher with closeness of the hand), so i create in software an algorithm to linearize the response. After this i did have the problem that holding the hand in some position, a light on the VU meter scale may intermittently blink even in the hand was steady as a result of some noise coming from the sensor. I solved this problem with a sort of software Smith trigger: the new values changes only if the difference from the previous value is grater than a threshold.
There are two single addressable RGB leds 8mm for each level (25 leves) and in the base there are four 3 W RGB LEDS.
At the base there is also a touch button used as ON/OFF.
There are 5 modes that can be played with sound or with the hand:
- VU meter (louder the sound or closer the hand, more light ON)
- fading Vu meter
- Bouncing ball
- Wawe (the sound intensity or the position of the hand dim the lights at the bottom, then that value is shifted upward)
- Strobo light (the beat of the music or the hand getting closer to the top trigger short pulses of light)
All the plastic parts are cut with my home made CNC router. In the files section can download the mechanical files. The 25 sections are hold together by a long screw in the middle