Anti-Sunflower - Points to Your Darkness!
by shivtej1505 in Circuits > Arduino
2239 Views, 7 Favorites, 0 Comments
Anti-Sunflower - Points to Your Darkness!
Since childhood, I always wanted to try my hands on electronics. Recently I bought the Arduino and started exploring it. In this process, I got to know more about Light Dependent Resistors (LDR).
Somehow, I stumble across this idea. Basically, it's an electric sunflower which does the opposite of actual sunflower. It points to the darkness!!!
Stuff You Need
- 3 LDRs
- 3 10k Ohm resistors
- A servo motor
- Arduino Board
- Few Jumper wires
- Soldering Kit
- Perforated PCB
- Small Pot along with some dry soil.
The Circuit
The crux is each LDR is responsible for an angle, left for 180 degrees, middle one for 90 degrees and right one for 0 degrees. For example, if the middle LDR not receiving any light and other LDRs are getting some light then
Arduino will receive following input:
- Left LDR => HIGH
- Middle LDR => LOW
- Right LDR => HIGH
Based on this input, Arduino can compute the angle (90 degrees in this case) and send this information to the servo motor.
The Code
In layman terms, that's what the code does:
- It takes input from 3 LDRs.
- Using this input, it calculates the amount of light each LDR is getting.
- Now, it computes the angle it should go. For example if the right & middle LDR both are not getting any light, then the angle calculated will be 45 degrees (Mid angle of 0 degree & 90 degree is 45 degrees).
Find the code here.
Build the Circuit
Use Perforated PCB to solder resistor and LDRs. Use the Arduino breadboard for connecting PCB and servo motor. Upload the code and test.
Plant the Anti-sunflower
I've used a small pot and made a hole in it to pass the wires. Put some soil, keep the servo motor, add some more soil. Then just connect the servo motor with Arduino and you're done!