Arduino Solar Tracker | Science Project

Science Buddies
23 Jul 202414:37

Summary

TLDRIn this video, Dr. Benino from Science Buddies demonstrates how to build an automatic solar tracker using Arduino. The project uses a solar panel mounted on a servo motor, controlled by two light-dependent resistors (LDRs). As the sun's position changes, the Arduino rotates the panel to optimize energy capture by aligning it perpendicularly to the sun's rays. The tutorial covers the circuit design, Arduino code, and practical considerations such as resistor values and sensor calibration. This simple yet effective project enhances solar panel efficiency by dynamically tracking the sun.

Takeaways

  • 🔧 The video demonstrates how to make an automatic solar tracker using Arduino.
  • ☀️ The solar panel is mounted on a servo motor and tracks sunlight using two photoresistors.
  • 📉 Photoresistors, also known as light-dependent resistors, change resistance based on the amount of light hitting them.
  • 🔄 The Arduino code uses the difference in light intensity between the two sensors to rotate the solar panel toward the light source.
  • ⚙️ The solar tracker adjusts the panel to remain perpendicular to the sun’s rays, maximizing energy production.
  • 🌞 The setup is designed to follow the sun’s east-to-west movement throughout the day, optimizing the panel’s output.
  • 🔍 A dual-axis tracker can also be built, adding a second motor for vertical adjustments.
  • 🛠️ The project uses simple materials like popsicle sticks and hot glue for the solar panel's structure.
  • 💡 The video explains how to wire the circuit, which includes the solar panel, servo motor, and photoresistors connected to the Arduino.
  • 📈 The Arduino reads voltage from the solar panel, but it still requires an external power source.

Q & A

  • What is the purpose of the automatic solar tracker project?

    -The automatic solar tracker project is designed to optimize the energy output of a solar panel by adjusting its orientation to follow the sun's movement throughout the day, ensuring the panel remains perpendicular to the sun's rays for maximum energy production.

  • What components are used in this solar tracker setup?

    -The solar tracker setup includes a solar panel, a servo motor, photo resistors (light-dependent resistors), a support structure made from popsicle sticks and hot glue, an Arduino, and resistors to form a voltage divider.

  • How do photo resistors (light-dependent resistors) work in this project?

    -Photo resistors change their resistance based on the amount of light they receive. In this project, they are used to detect light from the sun. When one of the two sensors is shaded, the Arduino compares the readings and rotates the solar panel to align it with the sun.

  • Why is it important to orient the solar panel perpendicular to the sun’s rays?

    -A solar panel produces maximum power when it is oriented perpendicular to the sun’s rays. If the sun’s rays hit the panel at a steep angle, the panel will generate less power, especially in the morning and evening.

  • What is the difference between a single-axis and a dual-axis solar tracker?

    -A single-axis tracker moves the solar panel left and right to follow the sun’s east-to-west movement throughout the day. A dual-axis tracker, on the other hand, adjusts the panel both horizontally and vertically to account for seasonal variations in the sun’s position.

  • What is a voltage divider, and why is it used in this project?

    -A voltage divider is a circuit with two resistors in series that converts the resistance of a photo resistor into a measurable voltage. The Arduino cannot measure resistance directly, so this technique is used to measure the light sensor readings.

  • Can the solar panel power the Arduino directly in this project?

    -No, the solar panel does not power the Arduino directly. The solar panel's voltage is measured using one of the Arduino’s analog input pins, but the Arduino still requires external power.

  • What precautions must be taken when connecting a solar panel to an Arduino?

    -It is important to ensure that the solar panel outputs less than 5 volts. Connecting a panel with a higher voltage can damage the Arduino, which is designed to operate at 5 volts.

  • How does the Arduino control the movement of the servo motor in this project?

    -The Arduino reads the difference between the two light sensors. If the difference exceeds a certain threshold (e.g., greater than 50), the Arduino adjusts the servo motor's angle to rotate the solar panel towards the sensor receiving more light.

  • What role does the delay function play in the Arduino code for this project?

    -The delay function controls how frequently the solar panel adjusts its position. A longer delay can prevent the panel from jittering back and forth, especially on partly cloudy days when light conditions change rapidly.

Outlines

00:00

🌞 Introduction to Solar Tracker with Arduino

In this introduction, Dr. Benino from Science Buddies explains the objective of the video: creating an automatic solar tracker using an Arduino. He starts by showcasing the setup with a solar panel mounted on a servo motor, supported by popsicle sticks and hot glue. The system uses photoresistors (light-dependent resistors) to detect light and adjust the panel's direction. Dr. Benino also briefly mentions the importance of the voltage divider, and how the Arduino controls the panel’s movement by comparing light intensity on the sensors.

05:01

💡 How Photoresistors Help Track the Sun

This section delves into how photoresistors function within the solar tracker. Photoresistors alter their resistance based on light intensity, and by placing two sensors on opposite sides of a vertical piece of cardboard, the Arduino can detect discrepancies in sunlight hitting them. The tracker adjusts the solar panel’s position to keep it perpendicular to the Sun for optimal energy capture. Dr. Benino demonstrates the process using a flashlight, highlighting how the tracker adjusts its position to balance the light on the sensors.

10:03

🔧 Circuit Setup and Wiring

Dr. Benino explains the circuit setup, utilizing a solar panel, servo motor, and two photoresistors. He clarifies that the solar panel doesn't power the Arduino directly; instead, its voltage is measured by the Arduino. The servo motor has three wires (ground, power, and control), which are connected to a breadboard along with the photoresistors. The photoresistors are part of a voltage divider circuit that converts resistance into voltage, which the Arduino can read. The correct wiring ensures that the system can control the solar panel’s movements accurately.

🛠️ Servo Motor Control and Code Explanation

In this paragraph, Dr. Benino walks through the Arduino code that controls the solar tracker. He introduces the Servo library and explains how the code reads analog values from the sensors to determine the light intensity. Based on the difference between sensor readings, the code adjusts the servo angle to point the solar panel toward the Sun. He also discusses how the margin variable helps prevent the servo from jittering due to small fluctuations in light intensity. Lastly, he shows how to calculate the actual voltage from the solar panel for experimentation purposes.

🔄 Fine-Tuning and Debugging the Solar Tracker

Dr. Benino discusses calibration and fine-tuning of the solar tracker. He emphasizes adjusting the resistor values and the position of the cardboard to ensure the system accurately tracks sunlight. The importance of monitoring light sensor readings during setup is highlighted, as it allows for better design adjustments. He also mentions how adding delays between rotations can prevent constant movements caused by passing clouds. The section wraps up with a TinkerCAD simulation demonstration, showing how light sensor values impact the servo motor’s rotation.

🔚 Conclusion and Project Resources

In the final segment, Dr. Benino provides concluding remarks and encourages viewers to try the solar tracker project using real sunlight. He reiterates the need for real-world testing due to the differences in sensor readings compared to the simulation. Lastly, he points viewers to additional resources for written instructions, the code, and over a thousand other STEM projects on the Science Buddies website.

Mindmap

Keywords

💡Arduino

Arduino is an open-source microcontroller platform used for building electronic projects. In the video, the Arduino is central to controlling the automatic solar tracker by reading sensor data and adjusting the position of the solar panel. It acts as the brain of the project, executing the code that directs the servo motor based on input from light sensors.

💡Photoresistor

A photoresistor, or light-dependent resistor (LDR), is a sensor that changes its resistance based on the amount of light hitting it. In the video, two photoresistors are placed on opposite sides of a cardboard to detect the intensity of sunlight. The Arduino uses the difference in readings from the two sensors to determine which direction to move the solar panel.

💡Servo Motor

A servo motor is a motor that precisely controls angular movement. In the video, the servo motor is used to rotate the solar panel to align it with the sun’s position based on the signals from the Arduino. The rotation allows the solar panel to track the sun's movement from east to west throughout the day.

💡Solar Panel

A solar panel is a device that converts sunlight into electricity. In this project, the solar panel is mounted on a support structure and moves with the help of a servo motor to track the sun, optimizing its energy output by maintaining a perpendicular angle to the sun’s rays. The panel’s voltage is also measured to compare performance between a fixed and movable setup.

💡Voltage Divider

A voltage divider is a circuit that reduces a high voltage to a lower voltage, making it safe to measure or process. In the video, a voltage divider is created using photoresistors and regular resistors so that the Arduino can measure changes in light intensity by reading voltage, since the Arduino cannot measure resistance directly.

💡Analog Input

Analog inputs on an Arduino are pins that read varying voltage levels, typically between 0 and 5 volts. In the video, the analog inputs are used to measure the voltage from the photoresistors, which changes based on light intensity, and from the solar panel, allowing the system to monitor how much sunlight is being captured.

💡Single-Axis Tracker

A single-axis tracker allows movement along one axis, in this case left to right, to follow the sun’s movement from east to west. The solar tracker in the video is a single-axis tracker, which adjusts the solar panel horizontally to maintain optimal exposure to sunlight throughout the day.

💡Servo Angle

The servo angle refers to the angular position of the servo motor, which can range from 0 to 180 degrees. In the video, the servo angle is adjusted based on the difference in light readings from the two photoresistors, allowing the solar panel to rotate and follow the sun. The code controls these angle changes, ensuring the panel stays aligned with the sunlight.

💡Light Sensors

Light sensors are devices that detect light intensity. In this video, photoresistors act as the light sensors, and their readings help determine the position of the solar panel. By comparing the readings from two light sensors mounted on opposite sides of a cardboard, the Arduino decides in which direction to move the solar panel for maximum sunlight exposure.

💡Tinkercad

Tinkercad is an online platform for creating and simulating electronic circuits. In the video, the presenter uses Tinkercad to simulate the circuit before physically building it. This allows for testing the servo motor, light sensors, and solar panel interactions in a virtual environment, which is helpful for debugging and designing the project before actual assembly.

Highlights

Introduction to making an automatic solar tracker using Arduino.

Demonstration of solar tracker setup with servo motor, solar panel, and light sensors (photo resistors).

Explanation of how photo resistors work by changing resistance based on light exposure.

Arduino uses analog input pins to measure voltage from photo resistors and track sunlight.

Servo motor rotates the solar panel based on the difference in light hitting two photo resistors.

Single-axis solar tracker adjusts solar panel left and right to follow the sun's movement.

Comparison of single-axis and dual-axis trackers, which follow both east-west and seasonal sun movements.

The purpose of a solar tracker is to maximize power output by keeping the panel perpendicular to the sun's rays.

Overview of the circuit assembly using an Arduino, breadboard, servo motor, and photo resistors.

Important safety note: solar panel voltage should not exceed 5V to avoid damaging the Arduino.

Code logic for reading photo resistor values and adjusting the servo angle based on the difference in light.

Servo movement is restricted between 0 and 180 degrees to prevent over-rotation.

Photo resistor readings are stabilized by setting a margin to prevent small fluctuations from causing servo jitter.

Code explanation for converting analog inputs into actual voltage values for measuring solar panel efficiency.

Simulating the solar tracker setup in Tinkercad and showing how the light sensor readings affect servo movement.

Transcripts

play00:00

hi this is Dr benino with science

play00:02

buddies and in this video I will show

play00:03

you how to make an automatic solar

play00:05

tracker using an Arduino now that

play00:08

previous clip was a time lapse of the

play00:10

setup working outside in direct sunlight

play00:13

here I have it set up indoors so I can

play00:15

demonstrate its use with a flashlight so

play00:18

first let's take a look at the physical

play00:20

setup I have a solar panel mounted on a

play00:25

Servo motor and a support structure

play00:27

built from popsicle sticks and hot GL

play00:30

blue here that holds the solar panel at

play00:32

an angle and most importantly up here

play00:36

above the solar panel I have two light

play00:39

sensors these are called photo resistors

play00:42

or light dependent resistors they are

play00:45

resistors that change their resistance

play00:48

value depending on the amount of light

play00:50

that hits them the resistance gets lower

play00:52

when there's a lot of light and higher

play00:54

when it's dark and we have a separate

play00:56

tutorial video all about using these

play00:58

sensors with an arduinos I'm not going

play01:00

to go over all those details again in

play01:01

this video but long story short you

play01:04

can't measure their resistance directly

play01:05

but you can measure the voltage from the

play01:09

arduino's analog input pins by

play01:10

connecting them to another resistor

play01:12

forming something called a voltage

play01:14

divider again go check out our other

play01:16

video Linked In the description of this

play01:17

one if you want to learn more about

play01:19

these light sensors and how they work

play01:21

what we are doing with them in this

play01:23

project is using two of them mounted on

play01:26

opposite sides of this vertical piece of

play01:29

cardboard so so what happens is

play01:31

depending on the location of the Sun in

play01:34

the sky if the Sun is slightly off to

play01:37

one side one of these will be shaded

play01:39

while the other one gets hit directly

play01:41

with light and the Arduino code looks at

play01:44

the difference between these two sensor

play01:46

readings and will rotate the solar panel

play01:49

until the readings are approximately

play01:51

equal meaning that this piece of

play01:53

cardboard is pointed directly at the Sun

play01:56

and both of the light sensors are

play01:58

getting hit by light so you can see that

play02:00

if I demonstrate with the flashlight

play02:02

here right now just based on the ambient

play02:04

internal Lighting in the room I'm in

play02:06

this has kind of found its equilibrium

play02:08

position but if I take the flashlight

play02:10

and add more light on one of the sensors

play02:14

it is going to rotate the solar panel

play02:17

towards that side and then if I switch

play02:18

to the other side it's going to rotate

play02:21

back in that direction so again I am

play02:23

just using a flashlight here to quickly

play02:25

demonstrate this if this was outside you

play02:27

would have the sun gradually moving

play02:30

through the sky throughout the day so

play02:32

moving much more slowly and as it moves

play02:35

it's slowly going to start shading One

play02:38

of Those sensors and rotate the solar

play02:40

panel to track the sun now the reason

play02:43

for doing this is that a solar panel

play02:44

produces maximum power when it is

play02:46

oriented perpendicular to the sun's Rays

play02:50

so for a fixed solar panel installation

play02:52

where the panel does not move the panel

play02:54

is going to produce less power early in

play02:57

the morning and later in the evening

play02:59

when when the rays are hitting the solar

play03:01

panel at a very steep angle so this is a

play03:04

single axis tracker that rotates the

play03:07

panel left and right to follow the sun's

play03:10

east to west movement throughout the day

play03:12

you can also make a dual Axis or two

play03:15

axis tracker with a second motor that

play03:18

has motion to adjust the panels up and

play03:21

down to account for seasonal variation

play03:24

in the sun's position as it moves up and

play03:27

down in the sky throughout the year what

play03:30

I will do in the rest of this video is

play03:31

show you how to assemble the circuit and

play03:34

code for a single AIS tracker with a

play03:37

single Servo motor and two photo

play03:40

resistors but you could duplicate this

play03:42

setup and add another motor and another

play03:44

pair of photo resistors to make a two

play03:46

AIS tracker let's switch over to the

play03:49

computer to take a closer look at the

play03:50

circuit diagram and the code so here we

play03:53

have the circuit built in a simulation

play03:55

program called Tinker cat we also have a

play03:58

tutorial about this software Linked In

play04:00

Our Arduino tutorial playlist in the

play04:02

description of this video so in the

play04:04

circuit we have the four main components

play04:07

spread out here since we can't do the

play04:09

physically physical assembly in the

play04:11

simulation we have the servo motor the

play04:14

two photo resistors and the solar panel

play04:17

which again are all connected together

play04:18

with hot glue and popsicle sticks you

play04:20

can check out the link to the project

play04:21

for more pictures of that setup they are

play04:24

all wired to a breadboard and connected

play04:27

to our Arduino one note the the solar

play04:30

panel itself is not actually powering

play04:33

the Arduino in this project we are

play04:35

measuring the voltage from the solar

play04:37

panel using one of the arduino's analog

play04:40

input pins this allows you to do an

play04:42

experiment for example to compare the

play04:45

voltage throughout the day with a fixed

play04:47

panel and a movable panel mounted on the

play04:50

servo but it is not powering the Arduino

play04:53

the Arduino still requires external

play04:56

power one very important note if you

play04:58

connect your solar panels output

play05:00

directly to an Arduino like this you

play05:02

must have a small solar panel that will

play05:05

output less than 5 volts trying to send

play05:08

a higher voltage into your Arduino can

play05:11

damage it it is only designed to operate

play05:13

at 5 volts and measure up to 5 volts on

play05:16

the analog input pin you can use

play05:18

something called a voltage divider to

play05:20

lower the voltage of your solar panel

play05:22

and measure the voltage from a bigger

play05:24

panel but I'm not going to cover that in

play05:25

this video for purposes of a science

play05:27

project we just recommend a smaller

play05:29

panel that outputs less than 5 Vols and

play05:31

then you don't need to worry about it

play05:34

looking at the connections on the

play05:36

breadboard here we have the ground or

play05:39

black wire from the solar panel going to

play05:41

the ground bus on the breadboard we have

play05:43

the positive wire from the solar panel

play05:45

going to one of the uo's analog input

play05:47

pins we have the servo motor which has

play05:50

three wires now depending on where you

play05:52

buy your Servo the colors of the wires

play05:54

may vary for this common type of Servo

play05:57

we have brown which is is ground and

play06:00

going to the ground bus on the

play06:02

breadboard red which is power going to

play06:05

the positive BR bus on the breadboard

play06:07

which is connected to 5 Vols from the

play06:08

Arduino and orange which is the control

play06:11

signal in this case going to Arduino pin

play06:14

9 we then have the two photo resistors

play06:18

each photo resistor has two pins one of

play06:21

those pins is connected to 5 volts and

play06:25

the other pin is connected to one end of

play06:27

a resistor and that resist

play06:30

then goes to ground the size of this

play06:32

resistor is going to depend on the

play06:35

resistance of your photo resistors you

play06:37

might have to tweak this and try

play06:39

different resistor values to get the

play06:41

best readings but 10 kiloohms is

play06:44

generally a good place to start I should

play06:46

have mentioned that you can also find

play06:48

this diagram and a link to the tinkercad

play06:50

Circuit simulation in the description of

play06:52

the

play06:53

video finally we have two more wires

play06:56

going over to other analog inputs we

play06:58

have a connection on the breadboard

play07:00

between this fixed resistor and the one

play07:03

leg of the photo resistor that goes over

play07:05

to an analog input and again that is

play07:08

taking the voltage from this circuit

play07:10

called a voltage divider where you have

play07:12

two resistors in series converting the

play07:14

resistance of this photo resistor to a

play07:17

voltage that can be measured directly by

play07:19

the Arduino because the Arduino cannot

play07:21

measure resistance directly and again we

play07:24

have another tutorial video All About

play07:26

these photo resistors so you can learn

play07:27

more about them in that video I'm not

play07:29

going to going to cover it here we have

play07:31

another wire that does the same thing

play07:32

connecting from between this photo

play07:34

resistor and this resistor over to one

play07:37

of the aro's analog inputs so that is it

play07:39

for the circuit let's take a look at the

play07:42

code looking at the code and if you want

play07:44

to copy paste this again you can find a

play07:46

link to it in the description the first

play07:48

thing we do is include the Arduino Servo

play07:50

Library we then declare a bunch of

play07:52

variables for the pins we are using so

play07:54

we have two analog pins for the light

play07:57

sensors we have one for measuring the

play07:58

solar panel

play08:00

and we have one for controlling the

play08:01

servo we declare a variable for the

play08:04

servo angle variables for the two light

play08:07

sensor readings and the difference

play08:09

between them and then we have a margin

play08:12

variable where we are going to take

play08:14

action to move the servo if the

play08:16

difference is greater than this margin

play08:19

but if it's less than that margin which

play08:20

you'll see later we won't do anything

play08:22

because we don't want the servo to

play08:24

constantly Jitter back and forth due to

play08:26

small

play08:27

variations we also have a variable to

play08:30

read the voltage from the solar panel

play08:32

but the arduino's analog inputs as we

play08:34

will see later do not directly give you

play08:37

the voltage so we have another variable

play08:39

to convert that to the actual voltage of

play08:41

the panel and then we create a Servo

play08:44

object that we are going to use to refer

play08:46

to our servo motor using the Arduino

play08:48

Servo library in our setup function we

play08:52

attach our Servo object to the servo pin

play08:55

we set the initial angle of the servo

play08:58

motor and and we initialize serial

play09:01

communication so we can print out some

play09:02

information to the serial monitor later

play09:05

in the loop function we use the analog

play09:08

read command to get the value for both

play09:12

of our light sensor pins we then

play09:14

calculate the difference between them

play09:17

and then again here is the key part of

play09:19

the code that's going to move the servo

play09:21

motor depending on this reading now if

play09:24

you were watching very closely you might

play09:25

have seen that I changed something there

play09:27

which I will explain in a minute but

play09:28

first if the difference is greater than

play09:31

the margin variable that we declared

play09:33

earlier so if the difference is greater

play09:35

than 50 then we want to increase the

play09:38

servo angle but the servo only has a

play09:41

range of 0 to 180 so we only want to in

play09:44

this case if I'm adding five to the

play09:46

angle increase it if the angle is

play09:48

already less than 176 so if the angle is

play09:51

equal to 175 I will add five and get 180

play09:56

but the angle can't go over 180 so I

play09:58

don't want to add it if for example the

play10:00

angle is 176 and I add five add five I

play10:03

would get 181 I don't want that what you

play10:05

may have noticed earlier in the video

play10:07

this said

play10:08

180 that would work if I was only

play10:10

changing the angle by one at a time so

play10:13

for example if the angle is

play10:14

179 that would be less than 180 then

play10:18

this would be true I would add one to

play10:20

the angle and get 180 but if you were

play10:22

changing it by larger increments you

play10:24

need to change this value accordingly so

play10:26

in this case 176

play10:29

and then same thing down here if the

play10:31

difference is less than negative margins

play10:35

so if the difference is less than -50

play10:38

then I want to decrease the angle but

play10:41

again I only want to do that if I'm not

play10:42

going to make the angle itself negative

play10:45

because the angle should not go below

play10:47

zero so again if the difference between

play10:49

the two light sensor values is greater

play10:52

than 50 I'm going to rotate the servvo

play10:53

one way if it's less than -50 I'm going

play10:56

to rotate the servo the other way but if

play10:58

it's in between between -50 and postive

play11:00

50 I'm just not going to do anything and

play11:03

that is because I don't want the servo

play11:05

to constantly Jitter back and forth just

play11:07

due to very small fluctuations in the

play11:09

light sensor reading I really only want

play11:11

it to start rotating with larger

play11:13

changes I'm then going to write the new

play11:17

angle to the servo motor and I could

play11:20

have done this earlier but I'm going to

play11:22

get the reading from the solar panel and

play11:26

the analog read command on the Arduino

play11:28

gives you a number between 0 and

play11:31

1,23 so you can convert that to a

play11:34

voltage between 0 and 5 using this

play11:36

formula here so again you can use this

play11:39

to record your actual solar panel

play11:41

voltage or you could also do this with a

play11:42

multimeter if you have one available and

play11:45

track that throughout the day comparing

play11:48

the results with a fixed panel to that

play11:50

with a movable panel finally I have a

play11:53

bunch of Serial print commands to print

play11:55

out the light sensor readings and the

play11:57

solar panel voltage printing out these

play11:59

readings is useful for calibration as

play12:02

you adjust things like the size and

play12:05

position of that piece of cardboard

play12:06

where the sensors are mounted and maybe

play12:09

changing the value of this fixed

play12:11

resistor to make sure that you are

play12:13

getting a difference in the two readings

play12:16

when one of the sensors is shaded and

play12:18

the other one is not so again that is

play12:19

mostly useful for the initial setup and

play12:23

debugging and design process and then

play12:25

once everything is working you're going

play12:26

to want to look at the solar panel

play12:29

voltage print out finally in the actual

play12:32

code running on the physical Arduino I

play12:34

have a delay here I have that commented

play12:36

out in Tinker CAD because the simulation

play12:38

was running kind of slow but you don't

play12:41

necessarily need to reposition the panel

play12:43

every second especially maybe if it's a

play12:45

partly cloudy day and you don't want to

play12:47

be moving back and forth all the time

play12:49

with clouds so you could add an even

play12:52

longer delay here if we run the

play12:54

simulation in tinkercad it will let us

play12:57

click on the light sensors to simulate

play13:00

the amount of light hitting them so it

play13:02

starts with a default of very dark but

play13:05

you can see if I

play13:06

increase the amount of light hitting

play13:08

this sensor it makes the servo rotate

play13:11

towards that one if I click on the other

play13:13

one and increase the amount of light

play13:15

here as I

play13:17

exceed that first sensor and then maybe

play13:19

drop this one down a little bit it

play13:21

rotates over towards this sensor and I

play13:23

can look at that in the serial monitor

play13:26

here you see it is printing out both

play13:28

sensor readings and in this case I'm

play13:31

getting 974 on One sensor 879 on the

play13:34

other sensor so that difference was

play13:36

greater than 50 so it was rotating but

play13:39

if I move these back

play13:42

down the servo is already at its maximum

play13:46

position so it's not going to rotate

play13:47

anyway but for example if I start

play13:50

increasing this one again you see it's

play13:52

not rotating yet because the difference

play13:54

here is not greater than 50 yet but if I

play13:58

increase this one all the way and drop

play14:00

this one down a little bit as the

play14:02

difference becomes greater than 50 the

play14:04

servo is going to rotate back in the

play14:06

opposite direction this is just a

play14:08

simulation so clearly you will need to

play14:10

try this with real sunlight on your

play14:12

physical Arduino because the readings

play14:14

you're going to get from your physical

play14:16

photo resistors are going to be

play14:17

different remember that for written

play14:19

instructions for this project you can

play14:21

check out the link in the video

play14:22

description and for over a thousand

play14:24

other projects in all areas of Science

play14:26

and Engineering not just Arduino and

play14:28

electronics check out the rest of our

play14:30

YouTube channel and our website

play14:32

www.sciencebuddies.org

Rate This

5.0 / 5 (0 votes)

相关标签
Arduino ProjectSolar TrackerDIY ElectronicsServo MotorPhotoresistorsSolar PowerSTEM EducationCircuit BuildingRenewable EnergyTech Tutorial
您是否需要英文摘要?