Solar Tracking Using Arduino and Modified DisEqC Rotor




Introduction: Solar Tracking Using Arduino and Modified DisEqC Rotor

About: I have always been a frustrated astronaut, but a hearing loss kept me grounded. Now after over 30 years in a highly technical public service position, I have more time to devote to my passions; electronics, ...

Searching for a reliable method to keep my solar Garage Heater pointed at the sun, ;

After receiving some great advice from fellow Instructableites, and some good leads on tracking projects, (Thanks German_MX) ,I was able to modify my DisEqC rotor for control and tracking.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Modify the DisEqC Rotor

I tried various ways to connect to the existing logic board in the rotor without success. I then removed all the electronic components, except the potentiometer. I then soldered power leads on the motor and connected a couple wires to the Pot outputs.

Step 2: Adding a Pair of Photo-resistors

Next I soldered a couple Photo-Resistors to some perf board, added a 10K resistor to ground and the Vcc to the +5 volt terminal on the Arduino. A signal wire runs from the photo-cell side of the 10K resistor on each cell to an analog input. The two photo-cell/resistors were then mounted in holes drilled in a water-prof aluminum project box, looking out through the holes. I used silicone adhesive to mount the small boards to the inside of the box, and also to mount a piece of plexiglass covering both holes on the outside. A 1/4 inch grommet surrounds the 3.5 ft section of Cat5 cable I used to connect to the rotor box.

Step 3: Testing...Testing...1,2,3....

I connected the motor control board to the motor and the Arduino. Connected the Pot from the rotor to an analog input on the Arduino and the +5 output on the motor control board. Then I temporarily taped the box lid with the photo-cells to the output shaft on the rotor. And made sure everything worked electronically, and mechanically. Then I moved on to the code.

Step 4: Writing Code to Make It All Work.

I then set about looking at examples of solar tracking code for the Arduino. I found several, but none that worked exactly the way I needed. So I decided I would have to take what I had learned and write it myself. So I then found myself enthusiastically staring at the flashing cursor in a blank sketch. I tried many of the thing I had learned, and many more... time passes...the seasons change...Okay, really after a few days I had a functional program to control the rotor based on the amount of light each sensor was "seeing".

Step 5: This Is a Bit Sketch-y

I plan to mount the whole business this weekend, but by all indications it should work fine. Here is what I came up with for the Arduino code :

This code is written to use a L298 bridge IC based motor control board connected to and Arduino and a modified DisEqC rotor to trac the sun for a solar heater. Code snippets were pulled from several sorces in the public domaine, and some original written by myself. Please feel free to use modify and disrubute freely. By David Jackson 10/27/2016 *

/ connect motor controller pins to Arduino digital pins // motor one const int pwm = 10 ; //initializing pin 10 as pwm const int in1 = 9 ; const int in2 = 8 ;

int potpin = 3; // analog pin used to connect the potentiometer int pos; // variable to read the value from the analog pin

void setup() { // set all the motor control pins to outputs pinMode(pwm, OUTPUT); pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); pos = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023) pos= map(pos, 0, 1023, 0, 180); } //int pos = 0; // Variable to store the motor position. int inputPhotoLeft = 1; // Photo resistor left to analog pin 1 on arduino int inputPhotoRight = 0;// Photo resistor right to analog pin 0 on arduino

int Left = 0; // Store readings from the photoresistors. int Right = 1; // Store readings from the photoresistors.

void loop() { Serial.begin(9600);

// Reads the values from the photoresistors to the Left and Right variables. Left = analogRead(inputPhotoLeft); Right = analogRead(inputPhotoRight); Serial.println(Left); Serial.println(Right);

// Checks if left is greater than right, if so move to left. if (Left > (Right +20)) // +20 is the deadzone, so it wont hunt back and forth. { if (pos < 179) pos++; digitalWrite(in1, HIGH); digitalWrite(in2, LOW); analogWrite(pwm,255) ; //sets speed of motor at max (0-255) }

// Checks if right is greater than left, if so move to right. if (Right > (Left +20)) // +20 is the deadzone, so it wont hunt back and forth. { if (pos > 1) pos -= 1; digitalWrite(in1, LOW); digitalWrite(in2, HIGH); analogWrite(pwm,255) ; //sets speed of motor at max (0-255) }

// Added some delay, Change for your needs delay(10); digitalWrite(in1, LOW); digitalWrite(in2, LOW); // Turns the motor off when all is = }

Be the First to Share


    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Rope & String Speed Challenge

      Rope & String Speed Challenge
    • Wearables Contest

      Wearables Contest

    5 Discussions


    8 months ago on Step 5

    To do this in a solar panel setup a voltage reader can be used.
    here's how it can work.
    when ever voltage drops it will make small movements in opposite directions in plane of movement of sun and change dish's direction in which voltage increased ensuring it's in best position every time.


    Question 1 year ago on Introduction

    Hi, I am trying to adapt the same old Disqc motor for sun tracking also but I found no info about how much power need the motor. Coould you please share your experience? Which PS is the correct one for SG-2100A without any electronics?
    I found your instructable really interesting. I am adapting the system to heat my pool. Today my pool is heating over sun directly from sun within long black pipes. I t works but no so much efficient.


    2 years ago


    is there a viring diagram?


    3 years ago

    Thanks! I got it all installed and calibrated yesterday

    16, 10:03 AM.jpg
    DIY Hacks and How Tos

    Nice. Tracking makes your solar collector way more efficient.