Arduino Solar Tracker

January 16, 2018 | Author: Kiran Zoro | Category: Pinterest, Ios, Technology, Computing, Software
Share Embed Donate


Short Description

Descripción: TRACKER IN ARDUINO...

Description

Arduino Solar Tracker

Explore

Create

Contests

Community

let's make

Login

Sign Up Log In

share what you make >

Arduino Solar Tracker by geo bruce  Download 5 Steps

+ Collection   Favorite

Step 5: The Code you can download the code down this page /* this code is written by geobruce for more info check my site http://xprobe.net */ #include // include Servo library  Servo horizontal; // horizontal servo int servoh = 90; // stand horizontal servo Servo vertical; // vertical servo  int servov = 90; // stand vertical servo // LDR pin connections // name = analogpin; int ldrlt = 0; //LDR top left int ldrrt = 1; //LDR top rigt int ldrld = 2; //LDR down left int ldrrd = 3; //ldr down rigt void setup() {   Serial.begin(9600); // servo connections // name.attacht(pin);   horizontal.attach(9);    vertical.attach(10); } 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 rigt

About This Instructable

66,855 views

Posted: Jul 3, 2011

170 favorites

License:

geo bruce   Follow

101

Bio: Hello, I'm Bruce. I'm a student at Don Bosco Hoboken in Belgium. I have a wide variety of interests: electronics, computers, technology, ... In my spare time I spend a lot of time on: projects, explor...read more »

More by geo bruce

  int dtime = analogRead(4)/20; // read potentiometers int tol = analogRead(5)/4; int avt = (lt + rt) / 2; // average value top int avd = (ld + rd) / 2; // average value down int avl = (lt + ld) / 2; // average value left

http://www.instructables.com/id/Arduino-Solar-Tracker/step5/The-Code/[25-Sep-2013 1:20:26 AM]

Tags: Arduino Solar light servo cool energy

Arduino Solar Tracker

sun tracking following sensor

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

Related if (-1*tol > dvert || dvert > tol) // check if the diffirence is in the tolerance else change vertical angle { if (avt > avd) { servov = ++servov; if (servov > 180) { servov = 180; } } else if (avt < avd) { servov= --servov; if (servov < 0) { servov = 0; } } 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 < 0) { servoh = 0; } } else if (avl < avr) { servoh = ++servoh; if (servoh > 180) { servoh = 180; } } else if (avl == avr) { // nothing } horizontal.write(servoh); } delay(dtime); } 

solar_tracker__english_.pde

1 KB

 

http://www.instructables.com/id/Arduino-Solar-Tracker/step5/The-Code/[25-Sep-2013 1:20:26 AM]

Boe Bot/Arduino line following robot by red_green

Arduino Solar Tracking Robot by Bot1398

Arduino 2-axis servo solar tracker by aplavins

light detection + data logging white arduino by DKN

DIY Arduino PIR Motion Sensor Lighting & Security by sspence

 See More

Arduino Solar Tracker

Remove these ads by Signing Up

View All Steps Next »

« Previous

Post Comment

Yasesu says:

Dec 14, 2012. 9:11 AM

Reply

Dec 14, 2012. 9:22 AM

Reply

Dec 14, 2012. 11:59 AM

Reply

Could you add a parts list to the instructions? Thanks

geo bruce (author) in reply to Yasesu done ;) 5

Yasesu in reply to geo bruce

Thank you. That is great. I have a 3 panel 45W solar panel from Harbor Freight. I've been looking at ideas to keep the panels facing the sun. Now I just need to take your idea, and make it bigger. I need to find some large servo motors.

geo bruce (author) in reply to Yasesu

Dec 14, 2012. 1:30 PM

Reply

Jan 24, 2013. 2:56 AM

Reply

if you want to go big you can better go for stepper motors and change the code a little bit 5

tolstoyan in reply to geo bruce

hello geo bruce im a beginner here at the arduino so im not really a code jockey, can you please tell me which part of the code do i have to modified and what exactly to replace if any, thanks because im planning to build this its just that i bought stepper motor instead of servo

http://www.instructables.com/id/Arduino-Solar-Tracker/step5/The-Code/[25-Sep-2013 1:20:26 AM]

Arduino Solar Tracker

Rene Artois in reply to tolstoyan

Jul 27, 2013. 2:01 AM

Reply

You can't drive stepper motors directly with arduino. It will burn. Use arduino stepper motor shield insted. It can handle bigger loads.

About Us

Find Us

Resources

Mobile

For Teachers Artists in Residence Forums Answers

Download our new apps for iOS and android!

Visit Our Store » Who We Are Advertise Contact Jobs Help

Facebook Youtube Twitter

Go Pro Today » Android

iOS

Pinterest

© Copyright 2013 Autodesk Inc. All rights reserved   Terms of service | Privacy | Legal Notices & Trademarks | Mobile Site

Join our newsletter: Join! Join!

http://www.instructables.com/id/Arduino-Solar-Tracker/step5/The-Code/[25-Sep-2013 1:20:26 AM]

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF