My first project (mini solar panel sun tracker)
My first completed project was sort of a refresher course in electronics, a chance to learn how micro-controllers work, and·return to a hobby I have been away from for a long time. Not being one to enjoy doing something for something’s sake I needed a project with some purpose so I decided to build a solar power supply of sorts that may be scaled up or used to power some small sensor package I have in mind for my small greenhouse or a future backyard pond. The list of requirements was simple, get power from the sun, transmit some status information to my PC so I can monitor its’ worthiness, and have a little excess to power some other small sensor device. With this small list and a small budget I did some research and decided a ‘Basic Stamp I Project Board’ and a set of TWS/RWS-434 RF units would get me there, along with a few other components.
·
To keep costs low for this simple learning experiment I chose a 6 Volt solar panel and 6 Volt lead acid battery from allelectronics.com. After doing some simple voltage measurements with the panel I found that keeping the panel pointed at the sun resulted in an average power gain of around 10-20%. Some simple math indicated that having a servo handle this once every hour would net a significant·gain. Plenty of experiments and the great educational material from Parallax·proved invaluable.
·
The circuit design was taken from the various application notes, data sheets, and ideas from this forum. The most time consuming part was getting the sensor readings in the range I wanted them, and working out a simple communication protocol. The BS1 code is very simple and shows how the unit transmits a device ID, a start byte, sensor ID’s and values, then 2 stop bytes to ensure the data transmissions can be consistently read by my simple MAX232/RWS-434/C# PC based receiver. 2 weeks so far and not a single missed transmission. I found getting reliable tx/rx at 1200 baud to be the easiest, 2400 baud had me missing a few here and there.
·
The final product is sitting on my roof right now, cooking in the sun since I am too lazy to paint it white or put a thermal shield around the important electronics, but I’ll get to that before things really heat up this summer. The receiver is still not in a decent enclosure as well, I still need to perfect the transmitter part for later things. I ended up using every pin on the BS1 and having a few bytes of memory left available. Below are the overall parts/design:
·
Solar Panel
-Light sensor mounted on solar panel.
-Solar panel sweeps the full range (about 90 degrees W->E) every hour and positions to the brightest angle.
-Solar panel is not moved at night.
-Battery Voltage sensor using voltage divider, 4046, and PULSIN.
-Thermistor attached to the battery.
-Thermistor on the outside of the Tupperware enclosure.
-All four readings are transmitted every 15 minutes using SEROUT to TWS-434.
-Servo and TWS-434 power from a 2904 that is switched by the BS1.
-Servo power switched by the BS1 only when needed.
-Enclosed in a Tupperware with hot glue to seal and glue holes and boards.
·
Receiver
-MAX232/RWS-434 connected to a serial port.
-A C# .Net service to receive and store readings in a SQL Express database.
-ASP .Net page for displaying the latest and last 24 hour readings.
·
I try to write code that can be reused so I decided to build the whole thing with the idea that I should be able easily add sensor packages later and still utilize all the code I wrote. As it is, I can add another device with multiple sensors, program it to use the same simple protocol, give it a unique device ID, load it in the database and walla!
·
I really enjoyed this project and hope my little solar power supply sustains itself for a while. So far I am amazed at the quality and reliability of all the components.· The light sensor got a small sleeve of heat-shrink to make it more accurate when pointing the panel but other than that modification, everything else has been software changes.
·
What’s next?
I’ve been interested in building an autonomous sailboat and this year as the hobby portion of my time with stamps I plan on building one that works with my old eTrex GPS, various sensors, maybe a solar panel, and can be sailed in the salt farm ponds here in South San Diego Bay. I think I will need a shallow draft so am looking at RC catamarans for inspiration. I figure if I can get a RC car to follow a simple set of waypoints I might have a chance at a sailboat with all the other variables thrown in. Hopefully my propeller shows up today so I can get started··
·
Links:
http://www.parallax.com/detail.asp?product_id=27112
http://www.parallax.com/dl/appnt/stamps/bs1Appnotes.pdf
http://www.rentron.com/Stamp_RF.htm
http://www.parallax.com/html_pages/edu/downloads/downloads.asp
·
To keep costs low for this simple learning experiment I chose a 6 Volt solar panel and 6 Volt lead acid battery from allelectronics.com. After doing some simple voltage measurements with the panel I found that keeping the panel pointed at the sun resulted in an average power gain of around 10-20%. Some simple math indicated that having a servo handle this once every hour would net a significant·gain. Plenty of experiments and the great educational material from Parallax·proved invaluable.
·
The circuit design was taken from the various application notes, data sheets, and ideas from this forum. The most time consuming part was getting the sensor readings in the range I wanted them, and working out a simple communication protocol. The BS1 code is very simple and shows how the unit transmits a device ID, a start byte, sensor ID’s and values, then 2 stop bytes to ensure the data transmissions can be consistently read by my simple MAX232/RWS-434/C# PC based receiver. 2 weeks so far and not a single missed transmission. I found getting reliable tx/rx at 1200 baud to be the easiest, 2400 baud had me missing a few here and there.
·
The final product is sitting on my roof right now, cooking in the sun since I am too lazy to paint it white or put a thermal shield around the important electronics, but I’ll get to that before things really heat up this summer. The receiver is still not in a decent enclosure as well, I still need to perfect the transmitter part for later things. I ended up using every pin on the BS1 and having a few bytes of memory left available. Below are the overall parts/design:
·
Solar Panel
-Light sensor mounted on solar panel.
-Solar panel sweeps the full range (about 90 degrees W->E) every hour and positions to the brightest angle.
-Solar panel is not moved at night.
-Battery Voltage sensor using voltage divider, 4046, and PULSIN.
-Thermistor attached to the battery.
-Thermistor on the outside of the Tupperware enclosure.
-All four readings are transmitted every 15 minutes using SEROUT to TWS-434.
-Servo and TWS-434 power from a 2904 that is switched by the BS1.
-Servo power switched by the BS1 only when needed.
-Enclosed in a Tupperware with hot glue to seal and glue holes and boards.
·
Receiver
-MAX232/RWS-434 connected to a serial port.
-A C# .Net service to receive and store readings in a SQL Express database.
-ASP .Net page for displaying the latest and last 24 hour readings.
·
I try to write code that can be reused so I decided to build the whole thing with the idea that I should be able easily add sensor packages later and still utilize all the code I wrote. As it is, I can add another device with multiple sensors, program it to use the same simple protocol, give it a unique device ID, load it in the database and walla!
·
I really enjoyed this project and hope my little solar power supply sustains itself for a while. So far I am amazed at the quality and reliability of all the components.· The light sensor got a small sleeve of heat-shrink to make it more accurate when pointing the panel but other than that modification, everything else has been software changes.
·
What’s next?
I’ve been interested in building an autonomous sailboat and this year as the hobby portion of my time with stamps I plan on building one that works with my old eTrex GPS, various sensors, maybe a solar panel, and can be sailed in the salt farm ponds here in South San Diego Bay. I think I will need a shallow draft so am looking at RC catamarans for inspiration. I figure if I can get a RC car to follow a simple set of waypoints I might have a chance at a sailboat with all the other variables thrown in. Hopefully my propeller shows up today so I can get started··
·
Links:
http://www.parallax.com/detail.asp?product_id=27112
http://www.parallax.com/dl/appnt/stamps/bs1Appnotes.pdf
http://www.rentron.com/Stamp_RF.htm
http://www.parallax.com/html_pages/edu/downloads/downloads.asp
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
It is a mistake and thanks for catching it.
Marc
This allows maximum sun-light to hit the panel at all times.
I can see how that would be helpful for a solar-boat. Do you think it will react quickly enough to deal with wave motion? (Perhaps it wouldn't be necessary to be that critical about it?)
Very usefully project, I was thinking about how I might make a sun-tracker myself!
Thanks!
-J
I first attempted to use the thermistor on a wire using the POT/RCTIME measurement but when I emmersed the thermistor and its 5 foot wire in water the reading changed dramatically. I'm guessing the water acted as a dialectric changing the capacitance of the circuit. Emmersing only parts of the wire affected the reading proportionally as well.
Question:
Could a setup·like this be used to detect soil moisture? And would this be considered a crude TDR/capacitance measuring·tool?
I've read some specs on commercially available soil moisture detectors that use TDR but assumed there was 'alot more' going on.
I'm now using a LM34 and it works like a charm with no·special calibration/sensor·adjustments needed.
·
Are you wanting to measure soil temperature or moisture?
You can drop a probe in to the ground with some copper points along the rod at given distances and try to measure the resistance. You'd have to do some calculations to figure out how much moisture is there as opposed to there just being moisture.
Thanks for the info on the Koi though. The mrs wants a pond of her own and being up in Canada we get 15deg swings during daylight hours at this time of the year (nevermind the chilly nights).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
the project seems pretty cool, havent read the code yet but i like what you have done.
check this link out. (its the fourth item down)
http://store.qkits.com/category.cfm/DETECTOR
they have a little device that checks the soil moisture and lights LEDs depending on the moisture content, if nothing else it will get you some idea of what resistance to be checking to implement it into your BS1.
and at 2.95, you cant beat it!
good luck,
Jeremy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
HOLY *@Microsoft%@! (sorry for the cuss, I've been trying to clean up my language)
Live, Love, Learn!
My web: www.geocities.com/jet_aj
My Car Audio site: www.jdubaudio.com
My dad is really interested. He wants to take his robot lawn mower, and make it solar powered, a huge project.
Great job!
-Henry
Looked at the code. Do you move the panel all the way to the West each time you find the maximum brightness? What determines when you start searching for the brightest angle again?
Ultimately I was thinking about how the sun is in your eyes on your car windshield and perhaps a .bs2 with this kind of sensor could be a start to blocking out the sun, but only in a small area on the windshield....