HOME  |  NEWS  |  BLOGS  |  MESSAGES  |  FEATURES  |  VIDEOS  |  WEBINARS  |  INDUSTRIES  |  FOCUS ON FUNDAMENTALS
Blogs

# Gadget Freak Case #217: Finding the Sun With a Microcontroller

<<  <  Page 5/6  >  >>
User Rank
Iron
Re: Bob Pease must be rolling in his grave.
8/27/2012 11:04:50 AM
NO RATINGS
Yes!  I remember reading that article 30 years ago.  Would you be able to point me towards a copy of it?  Thanks.

User Rank
Platinum
Re: Bob Pease must be rolling in his grave.
8/7/2013 5:11:20 PM
NO RATINGS
@charly5139  Pointing a collector directly at the sun is more complicated than you assume. Your clock method would work if:

1. The earth were a cylinder.
2. Its axis of rotation is perpendicular (90°) to its orbit.
3. Its orbit is a circle.

None of these is true. Earth is approximately spherical;  It is tilted by ~23.5°;  Its orbit is elliptical.  You can find C programs online for calculating the sun position. It takes about 9 pages of C code.

If you have a parabolic channel and wish to focus the sun along a water pipe, your aim must be less than 3 degrees in error.  See http://www.analemma.com/ for a good explanation of the sun's path through the sky.

User Rank
Platinum
Re: Bob Pease must be rolling in his grave.
8/7/2013 5:18:14 PM
NO RATINGS
mrdon, I actually started my project by trying to use two pairs of photoresistors to find the sun -- one pair for vertical and a pair for horizontal.  I discovered that photoresistors are too imprecise and too non-linear.  They always ended up cockeyed.  If you wish to point a parabolic cylinder at a water pipe, your aim must be within 3 degrees of error.  I may publish a revision showing how to use Gray code converters to sense and control position.  I would probably take the easy way out on a second pass and just use an Arduino board.

User Rank
Platinum
Re: Bob Pease must be rolling in his grave.
8/20/2013 1:03:45 AM
NO RATINGS
78RPM

Iagree, photoresistors response time is quite slow when reacting to sunlight. IR LEDs maybe a better choice because of their fast respones time and wavelength associated with the sun. I know Forrest Mims have done a lot of work in sun tracking using IR LEDs as well as traditional red LEDs. You should be able to find his published worked on this subject at his websites listed below.

http://www.forrestmims.org/

www.sunandsky.org

User Rank
Gold
Re: Bob Pease must be rolling in his grave.
2/27/2014 7:43:18 AM
NO RATINGS
Hello Jerald. Nice project. It is neat and even though it is a slow responding system let's be realistic how long does it take the sun to move across the horizon. I think your system is orders of magnitude fast for its application. Here is a neat thought. Nrel.gov has solar tracking software that helps you calculate position of the sun, track it, and confirm it and it does all this with a time table based on your location. I believe they also use an array of 5-9 photoresistors and 2 stepper motors to pivot the photo resistors such that the center one is facing the sun with an accuracy of about 0.1degrees (I was jealous when I found out this can be done with a simple peak detect algorithm. the only difference you don't move down a list of numbers to find the peak but you step your motors to sweep the direction you think the sun is in. Swap direction when you get a negative slope on your intensity). Provided they use a DSP with 128 legs+ but neat projects all of them.

User Rank
Platinum
Re: Bob Pease must be rolling in his grave.
2/27/2014 9:07:35 AM
NO RATINGS
@ervin0072002. Thanks for the comments. I was aware of software that calculates solar position. The last I checked, it takes many pages of C++ code, especially if you include things like atmospheric diffraction and altitude. The floating point calculations would require 32-bit MCUs, not that that's a big problem. This would also require inputs to tell the device where it is (either keypad or GPS) and a real time clock. I like your suggestion about the peak detect algorithm -- except that the servos have to move just to do the sensing.  I prefer to sense first and then power the motors to the target, as that is more energy efficient.

I originally tried using an opamp and two photoresistors but photoresistors are too imprecise and non linear. If we are trying to focus the light of a parabolic channel along a pipe that's carrying water, we need accuracy of 4 degrees or so.  My proposed array that spans 110 degrees in 30 sensors comes to 3.6 degrees.

Having said that, my real purpose in sharing the project was to demonstrate how to multiplex 64 inputs into one MCU pin.  This circuit could be used for many purposes as suggested in the article's introduction.  Sampling the sun's position is just one illustration. I'm thinking of refreshing the project using an Arduino so that its general purpose of multiplexing becomes accessible to more people.

User Rank
Gold
Re: Bob Pease must be rolling in his grave.
2/28/2014 8:21:09 AM
NO RATINGS
Yea I have had the fortune of using MUXes a lot. Some pitfalls if you mux an analog line but they can be predictable. Side not one the stepper. You don't move the whole array in solar with that. You actually move a smaller tracking unit. Once you pinpoint the location of the sun on the horizon you then send a command to the solar array to orient itself to desired location. By tracking the sun this way you can keep the solar array systems on standby, assuming you have some sort of hold mechanism. It is true your system can do the same and for parabolic arrays that works. For towers with a reflector field because the distance between receiver and reflector is much greater it is harder to hit that same target. You can solve this one of two ways. Either track the sun with a tracker to get the location and few photoresistors and a couple of servos or you can increase the number of photoresistors in your project. Yours would most definitely be the most energy efficient option and potentially the least likely to require maintenance. However servos would win on accuracy.

PS: if you refresh your project for the MUXes I would try something new... Maybe do it with an Arduino but say make it to monitor security magnetic switches like the ones used for home security :D

User Rank
Platinum
Re: Bob Pease must be rolling in his grave.
2/28/2014 10:50:51 PM
NO RATINGS
Good suggestions.  Picking up on your last paragraph about home security:  Why keep polling the sensors and switches constantly?  Let's use the energy harvested from a shattered glass or a door being rammed to trigger an interrupt to wake up the entire system that has been asleep.  There are devices now that can harvest energy from extremely tiny voltages.  They use magnetics and transforming voltages to attain logic level.  And we know that logic level voltages are coming down.  Therefore, I would not use MUXen (is that plural for MUX?  Ox/Oxen -- MUX/MUXen) to monitor windows and doors.  To save battery power, I would use energy harvesters to trigger MCU interrupts.

User Rank
Gold
Re: Bob Pease must be rolling in his grave.
3/2/2014 1:27:33 PM
NO RATINGS
I suppose. U can get mag switches that are normally open when engaged by a magnet. Probably some that gives you the option between normally open or closed. If you switch is open and it closes at a break in then you get interrupt. Maybe some low current gate can then give you interrupt on an open on window strips. Aluminum wire or foil glued to your window to look like decoration is a really good monitor for broken window 1-3 inches from the frame and you are almost guaranteed at least one break. (The circular cut in moves does also get a break more often than not. that only works in movies.) How would you detect which unit is open though? Maybe you can MUX after the interrupt? No idea how to write MUX in plural don't think there is a convention considering it's an abbreviation. Wiki claims its MUXes since multiplex and multiplexes... it's the internet answer who knows lol.

User Rank
Platinum
Re: Bob Pease must be rolling in his grave.
3/2/2014 1:45:15 PM
NO RATINGS
@ervin0072002 In reply to your question of how to identify which unit is open:  I envision using Zigbee radios, or probably XBee radios.  Each radio has a unique identifier on the Zigbee network. One unit could wake up all the others (of course the Zigbee router unit has to be awake constantly) and identify itself.  It can even send a message.

<<  <  Page 5/6  >  >>
 Partner Zone
This collection of practical Gadget Freak projects includes a walking stick for the blind as well as an indicator that calls for help for stroke victims.
Your cat demands to be fed on time. With some technical know-how and a 3D printer you can build your own automated cat food dispenser.
Design News has a long Gadget Freak history and today we revisit some of the more memorable projects that actually help solve problems.
Halloween will be here before you know it. And the zombie apocalypse may come even sooner. Best to prepare yourself by building your own security system to safeguard against the walking dead.
Need some security in your DIY workshop? Gadget Freak Ben Pawlowski and his team show you how to build a security camera/alarm modeled after the turret guns from the popular video game, Portal.
Quick Poll
The Continuing Education Center offers engineers an entirely new way to get the education they need to formulate next-generation solutions.
Oct 10 - 14, Embedded System Design Techniques™: Getting Started Developing Professional Embedded Software
SEMESTERS: 1  |  2  |  3  |  4  |  5  |  6 |  7 | 8 | 9 | 10

Focus on Fundamentals consists of 45-minute on-line classes that cover a host of technologies. You learn without leaving the comfort of your desk. All classes are taught by subject-matter experts and all are archived. So if you can't attend live, attend at your convenience.
Next Course September 27-29: