Introduction: Remote Light Source Using Light Sensor
In this instructable I will show you how I made a light source which will be triggered by a light sensor through a 2.4GHz communication module allowing you to move the light sensor without it being attached to a wire.
What my struggles were at first was choosing a power source, since it has to generate plenty light to lighten a dark area the Arduino Uno will not be able to supply all of the current, I will just wreck my Arduino since its limited at 400mA.
My choice to power the light sensor box was to use a power bank, since I had this already and it would be a waste to use anything else in my opinion, an alternative choice would be to use replaceable AA-batteries.
Step 1: Required Items
To make this little fancy project of ours we will need the following:
- Arduino Uno (2x), one Arduino Uno can be replaced by an Arduino Nano.
- NRF24L01 2.4GHz data communication module (2x)
- 3W RGB Led (3x)
- TIP120 (9x)
- AC 100-240V power supply adapter 5.5 x 2.1mm 5V 2A
- 5.5 x 2.1mm male dc power connector
- Light sensor module
Step 2: Designing the Boxes
To protect the electrical circuits when we will put the final product to use we will have to design and craft the plywood box. The biggest box will hold the RGB LED lights including drivers, one Arduino uno, NRF24L01 communication receiver and the 5.5x2.1mm male connector.
The smaller box will hold the following: one Arduino Uno/Nano, NRF24L01 communication transmitter, light sensor module and the power bank as power source.
Step 3: Designing Electrical Circuits
In order to light the LED's with the proper colours we will have to use a transistor with the power source, else all the current will go through the Arduino Uno, which will result in your Arduino to break.
The circuit we will use is as following:
Since we will not be using a potentiometer you can simply scratch that from the drawing, but this was the clearest picture I found so I used it anyway. We will have to build three of these circuits per RGB Led, one for each color. Resulting in 9 total for the end result, which will fit easily in the box we designed in step 2, I recommend not actually crafting the box untill the end so you can adjust the dimensions in the box, if you need a smaller or bigger box its still adjustable that way.
As the power source described in the picture above we will use the 5V 2A Power adapter.
Step 4: NRF24L01 Module
The hardest part of this whole project in my opinion is the wireless data communication, since the software is quite complicated. How to use this module will be added later on as this project goes on and I will figure out how to use it.
Connect the Arduino like this:
Pin 9 - CE
Pin 10 - CS(N)
Pin 11 - MOSI
Pin 12 - MISO
Pin 13 - SCK
3.3v - VCC
GND - GND
On the Receiver Pin 3 - LED
On the Transmitter Pin 7 - Button
As for the code I can already give you a few tips. The library used can be found here: https://github.com/tmrh20/RF24
Download this gifthub as a ZIP on the right, extract it in your Arduino library folder.
Use the following code for the transmitter:
Use the following code for the receiver:
Step 5: Integration
When all of these parts work indivually, hook em up, and ENJOY
I hope this Instructable guide was helpfull for all of you :D
We have a be nice policy.
Please be positive and constructive.