In Let’s Make Arduino LED Holiday Lighting, we made a decorative lighting using Arduino and a full color LED string light. This time we’re going to incorporate ROHM proximity sensor and make the lighting more interactive, so once an object is nearby the LEDs will light up in fancy colors!
Estimated time to complete: 60 minutes
We’ll be using ALS/proximity sensor (RPR-0521RS) introduced in ROHM Sensor Evaluation Kit Overview. Let’s connect the sensor shield and the sensor to the Arduino.
When an object (e.g. your hand) is brought close to the proximity sensor, radially arranged LEDs are triggered and will give off crazy fancy lighting effect.
Let’s take a look at the location and the voltage required for the sensor shown below. Since the proximity sensor is I2C, it’s placed in the blue area, and the required voltage is 3V, so we need to set the jumper pin to 3V in the middle.
As for the power supply of the LED string, we need another 5V power other than Arduino. If we try to take the power from Arduino’s VCC or 5V, Arduino may fry due to the large amount of current consumed by the LED string light.
Last time we used only one LED string, but this time we’ll connect 3 LED string lights in parallel. Since connection method is parallel, power supply and GND share common points. We may connect more LEDs but how many depends on the number of LEDs that can actually shine with LED string and the current capacity of the power adapter.
Operating current is about 20 mA per one LED on the LED string. Since the supply current is 1.3A, about 65 pieces can be lit all together.
Now that the hardware part is done, let’s move on to program the LED string light.