Sun tracking
Sun tracking project
The project can follow the sun and maximize the solar energy output by using a light detector resistor as a sensor, a servo motor as the output mode, and Arduino as a brain.
I used Tinkercad to simulate the circuit
After that, I used the breadboard to see how the circuit worked.
LDR sensor kit , servo motor, breadboard, and Arduino are tools used.
Tinkercad
Tools
Breadboard
Design circuit in Tinkercad
Components:
Servo motor
Used PIR sensor instead of LDR sensor kit because no LDR in Tinkercad
Arduino uno
Steps:
Connect the servo motor to the Arduino
Connect LDR to the Arduino
Writing the code block
Screening from Tinkercad
Code block
Connect LDR sensor to Arduino
Conncet servo motor to Arduino
Screening of the sun tracking project
Arduino code
// C++ code
#include <Servo.h>
Servo servo_9;
void setup()
{
pinMode(2, INPUT);
servo_9.attach(9, 500, 2500);
}
void loop()
{
if (digitalRead(2) == 1) {
servo_9.write(90);
} else {
servo_9.write(0);
}
delay(10); // Delay a little bit to improve simulation performance
}
During this week, I worked with the team which made a great effort and we helped each other. We Build a Smart Waving Hand using Arduino.
The lantern combines two parts:
Manual work using the potentiometer.
Automatic mode using Ultrasonic sensor.
When I got stuck, I asked Ahmed or Farida to help me.
Challenge
When I did my assignment, I faced a challenge connecting the servo motor and LDR sensor kit to Arduino. I forgot to connect the source 5V to the circuit. So after checking the connector, I saw this problem and finally connected the circuit to the source power 5V from Arduino.
We can avoid this problem when we do the assignment.
Focusing on how to combine analog sensors and output motors are the skills and knowledge that I have acquired this week in my final project.
The coolest thing that I have learned this week is how to combine digital and analog input to actuator output.
Revision connections of the inputs and the outputs of the Arduino is the thing that I will never forget from this week