building dual axis solar tracker

ajit.nayak87

New Member
Dear all,

I am trying to build dual axis solar tracking application.

Need help on:
1) flow chart for building dual axis tracker
2)since dual axis tracker has 2 axis of rotation.How can set axis of rotation
3)which angle i need to consider for developing code

necessary document

http://www.leveldevelopments.com/products/inclinometers/inclinometer-sensors/dual-axis-inclinometer-sensors/das-series/das-90-a-inclinometer-sensor-dual-axis-90-0-5-4-5v-out-7-35v-in/

code to determine sun azimuth angle.

http://www.nrel.gov/midc/spa/
 

inglewoodpete

Senior Member
Hi Ajit, Welcome to the PICAXE forum.

This is quite an ambitious project. Is it to position an array of solar panels or a solar heating dish? If it's a dish, then you'll certainly need to track the path of the sun.

However, if the purpose is to position an array of photovoltaic panels, then you will be better off buying an extra panel or two and using them at the best angle you can set them up at. The reason for this is that you need to build all of your frames and pivot points stong enough to withstand at least a 80 or 100kmh wind, depending on where you will build it. Then you have to add the cost of motors, controllers, weather proofing etc which will make the project quite expensive. The there will be hundreds of hours or your time to develop and test the circuitary and software. Put simply, prohibitively expensive in time and money. I have seen a single axis controller nearly 20 years ago when solar panels cost 10 times what they do today.
 
Last edited:

matchbox

Senior Member
I was looking through the forum and noticed this thread. I wasn't sure if you have had any luck as yet. Here is a code i did for a single axis Solar Tracker. It could easyly be adapted for dual axis. I use it on my solar tracker. It has two phototransistors as the sensors. I used these as sensors because they are far more UV resistant then LDRs. The code has as many functions that are not needed to track the sun. But they are used over come many issue that trackers can have i.e. following lightning in a storm, actuator freezing up in a frost etc. the comments explain it.


Code:
   #picaxe 14m2                             ;*values to be set
    symbol east=w0                          ;sensor east
    symbol west=w1                          ;sensor west
    symbol offset=b5                        ;adjust this value according to sun intensity at location and sensor mounting
    symbol volts=b6                         ;12.6v lithium-ion actuator and picaxe battery level
    symbol light=b7                         ;lightning storm and morning
    symbol flash=b9                         ;flash LED when battery is under preset
    symbol watch=b12                        ;false alarm on night_parking 
    symbol diff=w10                         ;difference between east and west on sensors
           

Low_Battery:
    if b13=2 then goto overload
    do
    readadc c.4,volts
    if volts=<143 then low b.4 low c.2               ;battery under 11.1v static or 9.6v loaded, turn off actuator drive, east=b.4, west=c.2
    high c.1 inc flash endif                         ;turn OFF H bridge driver
    if flash=>250 then let flash=1 endif             ;prevent stack overflow
    if flash=>1 and volts<150 then high c.0 
    pause 200 low c.0 pause 1000 endif               ;flash warning LED                                           
    loop until volts=>150 let flash=0 b8=0           ;battery over 11.5v, start tracking                 
           
Light_level:
    for b11=1 to 20
    readadc10 b.1,east                                       ;read PhotoTransistor sensor east
    readadc10 b.5,west                                       ;read PhotoTransistor sensor west
    if east=>1000 or west=>1000 then let b10=1 
    low c.1 pause 50 goto sun_tracking endif                 ;minimum light level for tracking reached,turn ON H Bridge driver
    if time=>14500 and b10=0 then low c.1 pause 100 high b.4 ;cloudy weather, light below tracking limit
    low c.2 pause 40000 low b.4 high c.1 let b10=1 endif     ;drive tracker to the horizontal if low light from dawn after 4hrs*
    if east=<5 and west=<5 then inc watch endif                   
    if east=<5 and west=<5 and watch=>240 then let watch=0   ;minimum light level, wait 4mins,dusk has arrived*
    time=0 low c.1 goto night_parking                        ;turn ON H bridge driver for home parking
    elseif east>5 or west>5 then let watch=0 endif           ;dusk level false alarm, reset b12 before 4 mins has past
    pause 1000
    next b11
    goto low_battery                                         ;check battery voltage every 20seconds           

Sun_tracking:
    do
    readadc10 b.1,east                                       ;read PhotoTransistor sensor east
    readadc10 b.5,west                                       ;read PhotoTransistor sensor west
    if east=<1023 or west=<1023 then let offset=4            ;*differential offset gain level change, according to light intensity
    elseif east<1016 or west<1016 then let offset=7          ;*                   
    elseif east<1004 or west<1004 then let offset=10 endif   ;*                   
    if east<1000 and west<1000 then low c.2                  ;below minimum light level for solar collection,stop tracking**
    low b.4 high c.1 goto light_level endif                  ;turn OFF H bridge driver
    if east>west then let diff=east-west
    gosub drive_east                                         ;store east/west difference into DIFF when tracking east
    elseif west>east then let diff=west-east 
    gosub drive_west endif                                   ;store west/east difference into DIFF when tracking west
    if volts=<125 and b8=0 then let b8=1 endif               ;battery drops to 9.6volts under load
    if pinc.2=0 and pinb.4=0 and b8=1 then readadc c.4,volts ;when actuator turns OFF, 60secs has passed,readvolts to see if the voltage has recovered 
    endif
    if pinc.2=0 and pinb.4=0 and b8=1 and volts=<140 then    ;still <10.8v
    inc b13 goto low_battery                                 ;voltage has not recovered suspend operation until battery is charged
    elseif pinc.2=0 and pinb.4=0 and b8=1 and volts>140 then ;voltage has recovered >10.8v continue operation
    let b8=0 endif                                           
    loop         
   
Drive_east:           
    if diff>offset then high c.2 pause 30           ;brighter in the east,turn ON east,turn OFF west drive       
    low b.4 readadc c.4,volts                       ;track east, check voltage under load
    elseif diff<offset then low c.2                 ;hysterisis value. when east/west sensors gets within a set distance of tracking sun hold position*
    low b.4 pause 60000 endif                       ;hold position for 60sec once locked to sun, prevents false motion(clouds,tree branches)
    return            
            
Drive_west:           
    if diff>offset then high b.4 pause 30           ;brighter to the west,turn ON west,turn OFF east drive
    low c.2 readadc c.4,volts                       ;track west, check voltage under load
    elseif diff<offset then low c.2                 ;hysterisis value. when east/west sensors gets within a set distance of tracking sun hold position*
    low b.4 pause 60000 endif                       ;hold position for 60sec once locked to sun, prevents false motion(clouds,tree branches)
    return            
                       
Night_parking:
    high c.2 pause 30                     
    low b.4                                         ;drive actuator back to east home position
    do
    if pinb.2=1 then exit                           ;tilt switch stops motion, so actuator is sheltered from frost by the panels
    loop until time=>180                            ;turn off picaxe output after 3mins
    low c.2 high c.1                                ;turn OFF H bridge driver and picaxe output to save power over night         
    do
    readadc10 b.1,east
    if east=>180 then inc light                     ;east sensor indicates dawn or lightning storm then inc light variable
    elseif east=<80 then light=0 endif              ;if light level drops below set, then reset light variable, lighting storm activity
    if east>180 and light=>13 then let light=0      ;light level over set point for over 5mins consistantly
    time=0 b10=0 b8=0 b13=0 goto light_level endif  ;morning has arrived
    sleep 10                                        ;23sec low power state
    loop 
                       
Overload:
    low c.2 low b.4 high c.1                        ;turn OFF actuator and H bridge driver in case of overload 
    do
    high c.0 pause 1000 low c.0 pause 200           ;flash LED to warn of NO tracking operation
    loop 
    
    
      
 
       ;Single axis solar tracker with Li-ion 12.6v 700mHr for actuator and control circuit battery
       ;Uses PhotoTransistors for sensors
            
       ;Functions
       ;1)low voltage, Lo-ion battery monitor (short flash LED)
       ;2)minimum light level detection and auto light intensity(once OFFSET value is set for sensor angle and location)
       ;3)return home to east after sun down
       ;4)overload detection in case of frosted or seized actuator (long flash LED) 
       ;5)false tracking in lightning storms and to save drive battery power at night
 
Last edited:
Top