Steve Pavey | 06/11/2015 10:11:29 |
369 forum posts 41 photos | A long time ago I wrote a BBC basic program to control a solar panel with stepper motors. It worked by moving the panel every hour the required number of degrees in altitude and azimuth, using the computers internal clock and referencing off a small data table of the sun's position. One of my long term projects is to do the same thing using a Raspberry Pi and Python, along with a gps receiver (to give me the current date and time). So far I've managed to get the Pi to read the data string from the gps, but I have a couple of problems: First I'm really struggling with Python as it seems very unintuitive compared with BBC BASIC, for example I have no idea how to extract the time data and use it as a set of variables eg Let H = (the hours bit of the time string) and Let M = (the minutes bit of the time string). Second, where can I get a table of date/time vs sun's position? I remember seeing a post not so long ago which referred to a program called something like Planetarium, but I think it was a Windows thing, so not much use for what I need. I know this is a long shot, and not model engineering, but maybe some of you astronomist guys can give me a pointer or two. Thanks. Edited By Steve Pavey on 06/11/2015 10:18:07 |
Neil Wyatt | 06/11/2015 10:23:12 |
![]() 19226 forum posts 749 photos 86 articles | Hi Steve, I'm a big fan of BBC BASIC, and I found the online Python tutorial HERE useful. I've linked to the page on string operations. Neil |
Circlip | 06/11/2015 10:40:54 |
1723 forum posts | Sorry to be pendantic Steve but didn't Galylilo prove the Sun doesn't move??
Regards Ian. |
pgk pgk | 06/11/2015 11:25:12 |
2661 forum posts 294 photos | I'm too stupid to have thought of doing it that way. My first thought seeing the title was a simple array of photocells centre and slightly offset from centre and move into the direction of best response... |
duncan webster | 06/11/2015 12:54:28 |
5307 forum posts 83 photos | Ok pgk, here's your challenge for today! Use your array of photocells to find the sun, measure the angle from north, input the equaton of time and drive an LCD display to give a digital sundial! |
pgk pgk | 06/11/2015 12:58:11 |
2661 forum posts 294 photos | ..and I thought the idea was just to point the panels at the best light source; not plan the next druid festival |
Steve Pavey | 06/11/2015 13:13:36 |
369 forum posts 41 photos | Almost the first discussion I had when I wrote the BASIC program was whether to locate the sun with some sort of light sensing, but I quickly discounted it - partly because of the problem of where do you actually start searching, and what happens on a dull grey day, but also because, since the position of the sun at a particular time is already known and predictable why go to the trouble of using any other method to find it. Thanks for the link Neil, I hadn't found that site before. Duncan, thanks for reminding me about the equation of time, I'd forgotten about that completely for some reason and it means I obviously don't need any sort of table - I should (Python skills permitting) be able to get the program to calculate the position from the time data in the gps string and convert it to stepper motor pulses. Circlip, my brother in law and my cousin tell me that it's the sun that moves, and relatively speaking they have a point. |
Michael Gilligan | 06/11/2015 14:41:44 |
![]() 23121 forum posts 1360 photos | Posted by Circlip on 06/11/2015 10:40:54:
... Galylilo ... . Who he ? |
pgk pgk | 06/11/2015 14:48:38 |
2661 forum posts 294 photos | I'm not knocking the efficiency or ability to use a program for that purpose, But to be clear my immediate thought re light sensing was an array of 4 tubes with photocells radiating out from a point and if (say) left tube reads more than right then motor left until they match .. the same for up and down tubes. The failing in such a system is when the sun sneaks round the back at night and no tubes face it... so it'd have to be set to travel back at the end of it's arc and wait. Many blooms manage that without lookup tables |
Gordon W | 06/11/2015 14:49:41 |
2011 forum posts | He's that bloke laid on a mattress out the back. I have two motion sensor LED lights ,solar panel charged, round my hen run. Looked info. on best angle etc. and mounted the panels. Have not seen sun for 3 days now and the batteries are flat. What I think I am saying is I don't think the exact angles matter all that much . |
John Baguley | 06/11/2015 15:19:12 |
![]() 517 forum posts 57 photos | Back in the days when I was playing about with solar panels and wind turbines I built a solar tracker for two panels. I forget where I got the circuit from but it used 4 LEDs as photo sensors that drove a geared motor. The panels were mounted on an equatorilal mount that I bodged up from an old telescope mount I made years ago. Very simple circuit and it tracked the sun perfectly. When it got dark it automatically drove the panels back to facing east ready for the next day. The mount was fitted with limit switches to prevent the panels moving too far. The angle of elevation was adjusted manually every week or so by a threaded rod. Used the panels to charge a 12 volt battery. I ran the house lights off it via an inverter until the battery was knackered. Was fine in the summer but the panels couldn't keep up with the winter demand. Not enough sun! John |
jason udall | 06/11/2015 15:39:22 |
2032 forum posts 41 photos | Just a thought...this has been done with clockwork...the sun "follows" a repeatable cycle of fixed period. True... not the assumed 24 hrs . As to rise and fall...well that depends on lattitude and day number. . .. A more intresting challenge would be to track the brightest point in the sky and maybe even layoff if too bright... |
jason udall | 06/11/2015 15:41:33 |
2032 forum posts 41 photos | That said... Solar panels asside..the project looks like a "goto" mount... |
Martin W | 06/11/2015 16:20:57 |
940 forum posts 30 photos | Hi Just a quick trawl on the Internet has listed several sites that can calculate the sun angle for anywhere on the globe. Typical examples can be found here and here. Both let you enter latt and long co-ordinates plus any local time offsets. The first one will generate a table for any day and this could easily be used to generate a yearly table to whatever accuracy you require. Martin |
Michael Gilligan | 06/11/2015 16:28:11 |
![]() 23121 forum posts 1360 photos | If trying to find decent designs for a 'Solar Tracker' ... search on the word Heliostat MichaelG. Edited By Michael Gilligan on 06/11/2015 16:29:00 |
Michael Gilligan | 06/11/2015 16:32:03 |
![]() 23121 forum posts 1360 photos | Posted by Gordon W on 06/11/2015 14:49:41:
He's that bloke laid on a mattress out the back.
Thanks, Gordon ... That's brightened my day. |
frank brown | 06/11/2015 18:24:51 |
436 forum posts 5 photos | Tracking the sun hourly for a year = 12/day (av?) X 183 (shape of curve symetrical Jan- June, Jul -Dec?), quite a big data table then. You don't need minutes, but you need to tally hours through out the year. And the support for this, batteries, print out table for dates to hours to start the thing of. Can be done, but looks boring. I think a tracking system is more sophisticated, only complication is the midnight reset to east. Frank |
Neil Wyatt | 06/11/2015 18:47:41 |
![]() 19226 forum posts 749 photos 86 articles | For perfect accuracy google 'analemma' (make sure you spell it as all one word...) and make sure you allow for your longitude. Alternatively, the simplest arrangement is four photodetectors at the base of an X-shaped shield set to move the array towards the most illuminated sensor. Naturally some sort of overnight reset will help too.
Posted by Michael Gilligan on 06/11/2015 14:41:44:
Posted by Circlip on 06/11/2015 10:40:54:
... Galylilo ... Who he ? According to Bob Calvert he had a name that made his reputation higher than his hopes*. Neil
*I though a Night at the Opera reference would be a bit obvious |
Steve Pavey | 06/11/2015 19:04:38 |
369 forum posts 41 photos | I didn't make it all that clear in the above post - I think that using a bit of maths to calculate position is probably easier than interogating a position data table (though I did use a data table in my original BASIC program). The gps dongle gives me all the data I need to do this, ie lat, long, date and time, and it should be easy enough to sort out the move back to East at the end of the day. Initially I'd want to use it for a flat-plate collector, hence only needing it to move every hour or so, but for a focussing collector or parabolic dish, and maybe for a pv panel, it might be better to track at more frequent intervals. |
Vic | 06/11/2015 19:09:41 |
3453 forum posts 23 photos | Posted by Circlip on 06/11/2015 10:40:54:
Sorry to be pendantic Steve but didn't Galylilo prove the Sun doesn't move??
Regards Ian. Actually it does! |
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
Sign up to our newsletter and get a free digital issue.
You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy
You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.
Click THIS LINK for full contact details.
For subscription issues please see THIS LINK.