An interactive lamp representing a forest. Different areas on the object represent different sounds that get activated if someone is approaching that area with their hands. It creates a forest feeling in the room by filling the room with shadows using the light placed inside the core of it. To see and use the close we used please visit out
Github repo . The instructions how to get the project into your computer and add the libraries are there.
Step 1: How It Works
Capacitive sensors sense human hands proximity → Measured by Arduino 1 → Output signals as PWM → Low-pass filter to filter out carrier frequency and even out the output → Arduino 2 reads as analog input → signals are controlling the volume of different sounds of the synthesizer on Arduino 2 and light intensity and color on LED ring
Step 2: Components Overview
2 Arduino Uno boards
1 Breadboard for prototyping, soldered final connections
4 Proximity sensors. Can be made from aluminium foil, in our case we used beer cans
1 Neopixel ring
1 Wifi module ESP8266
Step 3: Build the Sensor Circuit
Step 1: Build the sensor circuit.
We have decided to build our own proximity sensors. We used this tutorial from instructables.com for making them. However after initial experimentation and making the first version of sensors with foil we then made them from the beer cans - we cut it and straighten it. We used 10 MΩ resistors in the circuit to get a range of about 5 - 30cm.
We used the CapacitiveSensor library for sensing the distance. The values are arbitrary and the scale changes depending of the environment and the person using the device, so adjusting the values is needed. We are using a potentiometer to adjust the scale so that we can get nice feedback from the device while keeping it from being too sensitive.
Step 4: Connect Sensors and Sound
After we go the proximity sensors to work and could read the output and values coming in on the serial plotter in Arduino IDE, we passed the signals to a second Arduino in our circuit which reads the outputs coming from the sensors as analog input. This is then passed as signals controlling the volume and different parameters of different sounds of the synthesizer. We used the Mozzi sound library for creating the sounds. Each coming in signal from the proximity sensor is representing different sound.
The resources on an Arduino are quite limited, so you cannot use many different sounds and complex effects. We acheived four different sounds by lowering the sample rate of Mozzi from 16384 Hz to 8192Hz. For some of the sounds, we used wavetables included with Mozzi, and for some we used sample files found online and converted them to C header files using a python script provided with the Mozzi library.
Step 5: Connect the Lights Into the Circuit
In addition to the sounds we also have a neopixel ring controlled by the second Arduino. So not only do we use the sensor input to the second Arduino for passing and controlling the sounds, we also map it to different colors, as the neopixel ring allows us to do this for the since the color are represented as RGB values. We used the following tutorial for this and the Adafruit Neopixel library. Since running the control loop of the synthesizer should not take too long, we are updating the color only one led per loop, but since the control loop runs 64 times per second, this is barely noticable.
Step 6: Add Internet Connectivity
We used the wifi module ESP8266 to enable connections to the Arduino over the wifi. Using this, we could send UDP signals to the wifi module and use that to communicate with the Arduino to relay commands like start and stop. To do this, first you will need to upload the code to login to a wifi connection and respond to UDP signals onto the ESP8266 board. You can find instructions on how to program the module using the Arduino IDE through an Arduino online. Add additional instructions to relay the command received over UDP to the Arduino board through one of the GPIO pins available on the wifi module. After doing this, switch to the Arduino programming mode and add instructions to receive the inputs from the wifi module and set the Arduino to react appropriately to start and stop commands. You can find the code we have used on our GitHub repository.
Step 7: Make the Cuttings and Shape
We chose the following shape as base for our lamp, made out of glass.
After that we cut the tree decorations from cardboard and paper and we painted it black with acrylic paint. We glued the shapes outside the glass shape but they could probably also be glued inside.
Step 8: Solder the Circuit
One you have the connections on the breadboard ready solder it. This way electronics take less space and are easier to hide.
Step 9: Put Everything Together and Hide Electronics
Finally you can put the sensors made out of foil inside the glass ball. The tree shapes are hiding them in our case and we also put a white curtain on top of the glass for this purpose. The electronics are hidden in the base - the black box. We made a hole in the middle of it so that the wires can go through.
We have a be nice policy.
Please be positive and constructive.