How to Make an Arduino Solar Tracker : The Light Sensor
One of the most important parts of the solar tracker is the Light Sensor whose job is to accurately detect the position of the sun.
What is a light dependent resistor or photo-resistor?
The resistance of a light dependent resistor or photo-resistor changes according to the intensity of the light. In other words, the resistance of the LDR is inversely proportional to the light intensity. We shall use this property to track the sun
Design of the light sensor
Circuit diagram
Circuit Diagram: Light Sensor for an Arduino Solar tracker |
The light sensor works by creating a voltage divider by using a fixed resistance, in this case a 15 kilo-ohm resistor and an LDR. The value of the resistor was chosen as the illuminated resistance of my LDR was approximately 12 kilo-ohm. The corresponding voltage created is fed to the ADC of the arduino. Since the one end of the LDR was tied to ground, an increase in illumination would correspond to a higher ADC output
Physical Design
Mechanical aspect of light sensor design |
The light sensor was constructed on a piece of perfboard with some ribbon cable for easy connectivity to the Arduino.
The light sensor is in a T shaped design with a piece of perfboard/veroboard perpendicular between the two LDRs. The reason for the "divider" is that if the position of the son is on either side of the light sensor, a shadow will fall on one sensor and only the LDR facing the sun will be illuminated
Connecting it to the Arduino and the Software
Connection of light sensor to arduino |
The outputs form both the LDR are connected to ADC pins AnalogPin0 and AnalogPin1 of the arduino.
Here is a simple arduino sketch that reports the value of both the LDRs and reports it on the serial monitor
/*
LDR Calibration test for solar tracker
Sketch by Sarang Gupta
For more info visit www.mysolaradventures.com
*/
int ldr1 = 0; //LDR1 is connected to analog pin0
int ldr2 = 1; //LDR2 is connected to analog pin1
int ldr1_value = 0; //variable to store LDR1 values
int ldr2_value = 0; //variable to store LDR2 values
void setup()
{
Serial.begin(9600); //start outputting data to serial monitor
}
void loop()
{
ldr1_value = analogRead(ldr1); //reads the light hitting LDR1
ldr2_value = analogRead(ldr2); //reads the light hitting LDR2
Serial.print("LDR1 reading= ");
Serial.println(ldr1_value); //prints the LDR values to serial monitor
Serial.print("LDR2 reading= ");
Serial.println(ldr2_value); //prints the LDR values to serial monitor
delay(50); //wait for 50 ms
}
In the next post i will outline the actuator for the solar panel and a video of the final working tracker!
Well explained. But if one cannot make it and wants to use, buy it from MyDeals247.com from where I got for best deals
ReplyDeleteHello Sarang. Good work. It is simple to understand.
ReplyDeleteHave you finished the final design? I'd be happy to see the completion this project.
Thanks for sharing your works.
According to Stanford Medical, It is indeed the one and ONLY reason women in this country get to live 10 years longer and weigh on average 42 pounds lighter than we do.
ReplyDelete(By the way, it has totally NOTHING to do with genetics or some secret-exercise and really, EVERYTHING around "how" they eat.)
BTW, I said "HOW", and not "what"...
TAP this link to find out if this short questionnaire can help you decipher your real weight loss possibilities
What is a solar panel suitcase?
ReplyDeleteOur award-winning We Care Solar Suitcase® is a robust, easy-to-use solar electric system that provides last-mile health facilities with highly efficient medical lighting and power for mobile communication and small medical devices.