solar tracker controller


Closed Thread
Results 1 to 40 of 42

Hybrid View

  1. #1
    ultimatekiller's Avatar
    ultimatekiller Guest


    Did you find this post helpful? Yes | No

    Default

    Hi all,
    I m a new member... and i m now doing a same project too... named "PIC microcontroller solar tracker"... Does anyone has the circuit or schemetic of the solar tracker?? and some explanation of the circuit?? i need that badly... Thx...


    Regards,
    Ultimate Killing Machine

  2. #2
    Join Date
    Mar 2011
    Posts
    6


    Did you find this post helpful? Yes | No

    Smile Re: solar tracker controller

    hello
    can anyone check my proramming
    i am doing the same project.....

    solar tracker
    pic 16f877
    2cds with dc motor


    Code:
    v1 var byte                       'variable v1
    v2 var byte                       'variable v2
    v3 var byte                    'variable v3
    
    
    TRISA = 1                       'Set all PORTA pins as inputs
    TRISc = 0                     'Set all PORTc pins as outputs
    
    start:
    
    pot porta.0,255,v1             'Read 1st CdS Sensor (east)
    pot porta.1,255,v2            'Read 2nd CdS Sensor (west)
    
    if v1 <= 230 then skp        'start program
    if v2 > 230 then slp        'is it dark enough to sleep? (sleep mode)
    
    skp:
    if v1 = v2 then start        'If equal, do nothing
    if v1 > v2 then greater        'If greater, check how much greater
    if v1 < v2 then lesser        'If lesser, check how much lesser
    
    greater:                    'Greater routine
    v3 = v1 - v2                  'Find the difference
    if v3 > 10 then cw             'Is it within range? If not, go to cw
    goto start                    'In range do again
    
    lesser:                        'Lesser routine
    v3 = v2 - v1                'Find the difference
    if v3 > 10 then ccw            'Is it within range? If not, go to ccw
    goto start                    'Do again
    
    slp:
    low portc.0                       'stopping the solar tracker for moving 
    low portc.1                    'stopping the solar tracker for moving
    goto start 
    
    cw:                            'Turn the sensor array clockwise
    high portc.o                  'Turn on h-bridge
    pause 100                     'Let it turn for a moment
    goto start                    'Check again
    
    ccw:                         'Turn the sensor array counter clockwise
    high portc.1                   'Turn on h-bridge
    pause 100                     'Let it turn a moment
    goto start                    'Check again
    
    end
    Last edited by ScaleRobotics; - 1st March 2011 at 16:19. Reason: added code tags

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: solar tracker controller

    Muzakyo, I don't see where the motor is commanded to stop.. Must operate like a windshield wiper unless it's asleep?

    Dave Purola,
    N8NTA

  4. #4
    Join Date
    Mar 2011
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: solar tracker controller

    i am a newbie in pic......

    but from the proramming the motor will run for a certain time (100 miliseconds) and then it will get back in the start loop....

    for the motor i am not sure.... but when i compile it there are no problems.

    did i need to do like the slp: programming..?

    for this program i refer to the pic microcontroller project book by John Iovine and pic robotic : a beginner's guide to robotic by john iovine... (first post)

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: solar tracker controller

    muzakyo, I don't see anywhere in your code that you are stopping the motor if your system is "on target". You need to place some kind of DEAD BAND limits that are within the ON TARGET criteria. I mean +- so many counts... You should have at least 4 states, 1 for sleep (waiting for next morning), 1 for going east, 1 for going west and 1 for stop during the day when system is on target.

    Dave Purola,
    N8NTA

  6. #6
    Join Date
    Mar 2011
    Posts
    6


    Did you find this post helpful? Yes | No

    Smile Re: solar tracker controller

    sorry my lack of knowledge....

    for the system when the system are on the target is

    skp:
    if v1 = v2 then start 'If equal, do nothing

    it will go back to the start..... then it will never give output to the motor (so motor will not rotate anywhere) until one of the cds value higher than other.

    so to stop the motor when it run

    cw: 'Turn the sensor array clockwise
    high portc.0 'Turn on h-bridge
    pause 100 'Let it turn for a moment
    low portc.0 'turn off the h-bridge
    goto start 'Check again

    what do u think....

    can u give idea how to improve this proramming

  7. #7
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: solar tracker controller

    muzakyo, Yes that is more resonable.... Just don't forget to do the same for the other direction as well...

    Dave Purola,
    N8NTA

Similar Threads

  1. Microstepper controller
    By aratti in forum Schematics
    Replies: 14
    Last Post: - 3rd January 2015, 16:52
  2. Replies: 14
    Last Post: - 6th March 2011, 05:08
  3. Replies: 2
    Last Post: - 14th July 2008, 22:11
  4. Fridge controller
    By nomad in forum General
    Replies: 4
    Last Post: - 23rd February 2008, 07:13
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts