All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > The Projects Forum

Notices

The Projects Forum Working on an electronics project and would like some suggestions, help or critiques? If you would like to comment or assist others with their projects, this is the place to do it.

Reply   Post New Thread
 
Thread Tools Display Modes
  #11  
Old 05-27-2011, 04:05 PM
taiyos taiyos is offline
New Member
 
Join Date: May 2011
Posts: 5
Default

thank you all of you ,for your advices

at this time i cannot change the design i mean the stepper or the sensors ....,cause i have to submit the final report soon.so if u can concentrate your advices on what i have to do on the existing design it would be much better.and can i make the micro sleep and wake up any time i want for a definite period?any body who know the hi tech c compiler syntax,would you give me the code....and i have some problems on the delay routine.

thank you;
Reply With Quote
  #12  
Old 05-27-2011, 07:07 PM
THE_RB's Avatar
THE_RB THE_RB is offline
Senior Member
 
Join Date: Feb 2008
Posts: 4,357
Default

Quote:
Originally Posted by strantor View Post
...
I was looking into making a solar panel sun tracking system with an arduino last year and found that the light sensor type approach is prone to all kinds of problems, like clouds moving, light reflections from other things, sensors becoming dirty, etc.
...
That's where the PIC can cover the flaws of a sensor system. It knows roughly how many degrees per hour the sun moves through, and can move to a "close enough" position after each 5 minute sleep cycle. Then feedback from the 2 sensors allows a small extra movement. It will phase lock to the sun with no problems, but in case of a bad sensor reading it will still be within a degree or so of the perfect location.

The big benefit is that it does not need to know what time of day it is or what day of the year it is.

Quote:
Originally Posted by strantor View Post
...
with a little math your PIC can calclute exactly where the sun is, even if there's an eclipse. You just have to tell it where its (GPS coordinates, elevation), and what time it is. You can get snazzy and put a GPS unit on it...
...
Thta is a big drawback needing a real time clock that is always correct. Sure a GPS clock will solve that nicely, but at quite a cost and might be delicate in an external environment.

Quote:
Originally Posted by taiyos
...
at this time i cannot change the design i mean the stepper or the sensors ....,cause i have to submit the final report soon.so if u can concentrate your advices on what i have to do on the existing design it would be much better.and can i make the micro sleep and wake up any time i want for a definite period?any body who know the hi tech c compiler syntax,would you give me the code....and i have some problems on the delay routine.
You can probably leave the PIC running as it only uses a couple of mA. Then generate the timed period using a timer interrupt. That will make a very accurate 1 second period;

Code:
  // C code for a 1 second period with a 1MHz timer (4MHz xtal); 
  // uses 1 variable; unsigned long bres
  // gets here every TMR0 int (every 256 ticks)

  bres += 256;// add 256 ticks to bresenham total

  if(bres >= 1000000)// if reached 1 second!
  {
    bres -= 1000000;// subtract 1 second, retain error
    do_1sec_event();// update clock, etc
  }
Select All
You can use that code in your TMR0 interrupt that occurs every 256uS.

Suggestion on solar tracking algorithm;
(sun moves 360' per day or 15' per hour, that is about 1.25' every 5 minutes)
1. every 5 minutes move 1.1 degrees (leaves 0.15 degrees error).
2. check sensors, if west>east move another 0.3 degrees.

The result is that every 5 minutes it will move either 1.1 degrees or 1.4 degrees, and the input from the sensors will keep it phase locked to the sun.

Anyway, that is a starting point.
__________________
Roman Black - PICs and electronics. Author of BTc PIC-sound encoder, Shift1-LCD project, the TalkBotBrain talking PIC controller, LiniStepper open-source microstepping motor driver, the Black Regulator 2-transistor SMPS, and probably some other stuff; www.RomanBlack.com
Reply With Quote
  #13  
Old 06-08-2011, 05:53 PM
taiyos taiyos is offline
New Member
 
Join Date: May 2011
Posts: 5
Default

how can i wake up a pic micro from sleep?
i mean when the sun rises in the morning.
Reply With Quote
  #14  
Old 06-08-2011, 08:16 PM
russpatterson's Avatar
russpatterson russpatterson is offline
Senior Member
 
Join Date: Feb 2010
Location: Carlsbad, California
Posts: 351
Default

Only put the PIC to sleep for five minutes at a time (or something like that). On wake-up, check if the Sun's shining. If not, go back to sleep for five minutes. Your PIC will only be running for a total of a few seconds per night and use very little power.
Reply With Quote
  #15  
Old 06-08-2011, 10:15 PM
GetDeviceInfo's Avatar
GetDeviceInfo GetDeviceInfo is offline
Senior Member
 
Join Date: Jun 2009
Location: Canada
Posts: 1,491
Default

or, run your sensors through a window comparator which interrupts the micro when west angled sensor excedes east angled sensor, then step until comparator flips back.
__________________
I get all the news I need on the weather report
Reply With Quote
  #16  
Old 06-26-2011, 06:17 PM
taiyos taiyos is offline
New Member
 
Join Date: May 2011
Posts: 5
Default

i have tried the comparator method but i coudnt wake the micro up....,i don know may be the error is on the code.so do u have any suggestion. i was writing the code in ccs c language.
Reply With Quote
Reply   Post New Thread

Tags
, , , ,


Related Site Pages
Section Title
Worksheet Design Project: audio media-based signal generator
Worksheet Open-loop opamp circuits
Textbook The common-emitter amplifier : Bipolar Junction Transistors
Textbook The transistor as a switch : Bipolar Junction Transistors
Textbook Special-purpose diodes : Diodes And Rectifiers


Similar Threads
Thread Thread Starter Forum Replies Last Post
DC/DC Voltage boost from solar panel russpatterson The Projects Forum 3 02-15-2010 04:25 AM
Solar Panel to Charge Lithium Polymer Batteries zenite The Projects Forum 11 01-29-2010 10:44 PM
NEED HELP-Question About LED and Solar Panel ajoi24 General Electronics Chat 8 12-09-2009 03:26 PM
help on Tracking system ! extremeads1 The Projects Forum 2 06-01-2007 02:07 PM
Microprocessor/ Microcontroller based system saleemsm Embedded Systems and Microcontrollers 5 06-07-2006 04:07 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:46 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.