How to Make Sun Tracking Sunflower Robot Using Arduino
by ROBO HUB in Circuits > Arduino
14247 Views, 110 Favorites, 0 Comments
How to Make Sun Tracking Sunflower Robot Using Arduino
Hello there I'm happy that this project caught your interest, This is a sunflower which you can call an electronic version of an actual sunflower.
What does an ordinary sunflower do? It tracks the sun and keeps its face toward the direction of the sun, In this project I managed to build a sunflower robot that faces towards the sunlight.
So how does this work might be your question, This was possible with the help of LDR also known as light light-dependent resistor. The arduino board processes the light that falls on the LDR and sends signals to the servo to move in that particular direction.
Since the servo is able to move 180degress each LDR is placed in the opposite direction so that the exposure to the light could be more.
I have given the complete details of building this project, also there is a working video given at the end of this project.
Try building this project since it gives you a hands-on experience in building such creative robots and helps you learn coding.
With this being told we can head over to gathering the materials for this project.
Supplies
Arduino Uno
Entire Kit to build this project i got from Here
LDRx2 (light dependent resistor)
Small breadboard
Micro servo
Color paper
Paper glue and scissors
Arduino ide and programming cable
Jumper wires
Hot glue
A place with sun access!
Circuit Diagram
This is the circuit I made with Tinkercad Circuits and before building the actual project I tested the circuit with simulation.
This is really a smart way to save your costs and time that might sometimes occur due to improper circuits, In my case, everything was tested with simulation with the circuit and codes, and then I started to build the actual project.
I recommend you to replicate my circuit and play with different values so you will know the area of impact, After the simulations are complete we can head over to building the actual circuit.
Arduino Code
The code is really simple in this project even though few think it is complex.
This code is to adjust the position of a servo considering the amount of light received by LDR. Where the most of energy is received the servo horn moves in that direction and if the energy received by both is the same the servo also becomes stable.
You can make changes to the code if you know the basics of arduino code if not I recommend not making any changes and directly uploading the codes to Uno.
Make sure to check the type of board and proper port number during the time of upload.
Downloads
Circuit Building
Since we already made connections in the prototype making the real connections should not be that hard.
Start by connecting the micro servo to the D9 pin of uno whereas the Gnd and Positive pins are connected to the breadboard power supply rails.
Now connect the LDR to the breadboard and connect one end of the LDR to the power supply and the other end to pin A0 also known as the analog pin of uno.
After this is done connect the power supply USB cable to any power source and connect with uno
If you are exposing the LDR to a light source the servo might move until the motion stops, Now you can place your finger on any LDR now you can see some movements in the servo.
Now the circuit is successful and works fine, we can proceed with adding the sunflower.
Simplify this circuit with a PCB, Complete your electronic projects in the best way from PCBWay
Check here to participate in their sixth design competition, where you can enter to win a free Raspberry Pi pico.
Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market
A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.
With their expertise in advanced manufacturing techniques, they offer a seamless integration of rigid and flexible components, ensuring enhanced reliability, durability, and space-saving benefits
Check Here for Rigid-flex Pcbs with this your circuit becomes flexible! i have added the images on this step kindly check
I bet you have not seen anywhere such assembly capabilities.
Finishing and Testing
I made a sunflower model with the help of colored paper, i chose yellow and green color paper and with some glue and paper cuttings I was able to make a flower that blooms and looks similar to a sunflower, i was happy because I did not expect such good results.
Now to the base of this flower glue the servo horn, and then attach this to the shaft of the servo.
Glue everything and to make the wire look less messy I used an elastic band that helped me to hold all the hanging wires.
Now you can connect the USB and check if the sunflower works, and indeed it should work if you followed my steps.
Take this project outside to the sun and enjoy the fun of your build, Like always if you have any questions ask me in the comments.
Working Video
Don't miss to check out this amazing working video where I show you the timelapse of the sunflower, Since in my time zone sun shows up for 12 hours I just placed this on the sun and placed a piece of board to hide and unhide the LDR and with no doubt the sunflower points towards the sunlight.
Thank you for your interest in my project. Have a good day