Solar Panels That Track The Sun Generate More Electricity That Fixed Solar Panels. Solar Panels That Move Collect 40% More Solar Energy and So Generate More Watts.
A Dual-Axis Solar Tracker Using Arduino, LDRs Resistors, and Servo Motors.
Wiring Diagram:
Parts List:
Breadboard: https://amzn.to/2NP2UKL
1 x Arduino UNO: https://amzn.to/2L0iZf2
2 x Micro Servo - SG90: https://amzn.to/2NRXXAy
4 x LDR ( Photoresistor) Sensor: https://amzn.to/3kiHz8r
4 x 10k-ohm resistors: https://amzn.to/2NTPtsF
2 x 10k Potentiometer: https://amzn.to/2MgRMWz
3D Body Parts: Design Files to Print.
Arduino Code:
(Scroll Down Below For The Full Code.)
3D Printing Online Services. And, LaserCut/CNC Online Services.
To Print Yours And Others 3D Design Models And Have Them Shipped To You.
Just Send Them The 3D Design File(s) In .STL Formats.
JLC3dp.com Gives Cheaper Prints And Okay Quality.
Shapeways.com Costs More But Better Quality.
Protolabs.com Is Expensive And Much Higher Quality.
SendCutSend.com Provides Laser-Cutting And CNC Services For Metals, Composites, Plastics, and Wood.
SelfCAD Is Good To Do Slight Corrections, Removals, And Edits On 3D Design Files .STLs Before Sending To A 3D Printing Online Service.
Now The Places To Get Mostly Free and Some Paid 3D Design Files .STLs.
GrabCAD. Thingiverse. Printables. Cults3D. 3DExport.
Example STL Files:
For The Hand Fan -
For The Arm Brace (Wearables) -
Arduino Code For The Dual-Axis Solar Tracker:
#include <Servo.h>
Servo horizontal; // horizontal servo
int servoh = 180;
int servohLimitHigh = 175;
int servohLimitLow = 5;
// 65 degrees MAX
Servo vertical; // vertical servo
int servov = 45;
int servovLimitHigh = 60;
int servovLimitLow = 1;
// LDR pin connections
// name = analogpin;
int ldrlt = A0; //LDR top left - BOTTOM LEFT <--- BDG
int ldrrt = A2; //LDR top rigt - BOTTOM RIGHT
int ldrld = A1; //LDR down left - TOP LEFT
int ldrrd = A3; //ldr down rigt - TOP RIGHT
void setup(){
horizontal.attach(9);
vertical.attach(10);
horizontal.write(180);
vertical.write(45);
delay(2500);
}
void loop() {
int lt = analogRead(ldrlt); // top left
int rt = analogRead(ldrrt); // top right
int ld = analogRead(ldrld); // down left
int rd = analogRead(ldrrd); // down right
int dtime = 10; int tol = 90; // dtime=diffirence time, tol=toleransi
int avt = (lt + rt) / 2; // average value top
int avd = (ld + rd) / 2; // average value down
int avl = (lt + ld) / 2; // average value left
int avr = (rt + rd) / 2; // average value right
int dvert = avt - avd; // check the diffirence of up and down
int dhoriz = avl - avr;// check the diffirence og left and rigt
if (-1*tol > dvert || dvert > tol)
{
if (avt > avd)
{
servov = ++servov;
if (servov > servovLimitHigh)
{servov = servovLimitHigh;}
}
else if (avt < avd)
{servov= --servov;
if (servov < servovLimitLow)
{ servov = servovLimitLow;}
}
vertical.write(servov);
}
if (-1*tol > dhoriz || dhoriz > tol) // check if the diffirence is in the tolerance else change horizontal angle
{
if (avl > avr)
{
servoh = --servoh;
if (servoh < servohLimitLow)
{
servoh = servohLimitLow;
}
}
else if (avl < avr)
{
servoh = ++servoh;
if (servoh > servohLimitHigh)
{
servoh = servohLimitHigh;
}
}
else if (avl = avr)
{
delay(5000);
}
horizontal.write(servoh);
}
delay(dtime);
}
References:
Comentarios