Solar Shell

by rabbitcreek in Circuits > Microcontrollers

993 Views, 3 Favorites, 0 Comments

Solar Shell

lastSunset - 1 (3).jpg

This is an upgrade to one of my projects from two years ago--the conch screamer: https://www.instructables.com/id/Solar-Powered-Conch-Screamer/. The traditional blowing of the conch shell at sunset here in Maui only by a microcontroller. The elegance of the project was the solar powering but its independence was undermined by the utility of having to program the location of the conch and its time zone. This made building one for a friend would necessitate preprogramming and senescence when the person moved or time zones shifted. Also the design of the original consisted of rat wired components stuffed into the shell that eventually resulted in water damage and lengthy rebuilds. Microcontrollers have been improved with power friendly sleeping arrangements and changing out relays for transistors.

Gather Your Materials

lastSunset - 4.jpg

I had to change out a few parts that made the project better:

1. Adafruit HUZZAH32 – ESP32 Feather Board about $20 A great board that works for everything.

2. DFPlayer - A Mini MP3 Player For Arduino--A super little sound board, tiny with card reader and amp in a very small package $8 DFRobot

3. Adafruit DS3231 Precision RTC Breakout-- Perfect RTC module works with a ton of software for years...$13

4. GPS Module with Enclosure from DFRobot again--super little machine very fast and accurate

5. NPN Bipolar Transistor (PN2222)

6.TIP120 Power Darlington Transistor

7. 3 resistors 1k

8. Speaker

9. lipo Battery--round or flat your choice

10. TP 4056 --generic for charging battery from solar cell--cheap

11. ALLPOWERS 1PC 2.5W 5V 500mAh Mini Solar Panel Module Solar System Epoxy Cell Charger DIY 130x150mm $9

12. Rugged Metal On/Off Switch with Green LED Ring - 16mm Green On/Off Adafruit $5

Order You PCBs

Screen Shot 2019-03-22 at 5.33.42 PM.png

The best part of learning from older projects is developing new way of dealing with problems--the worst is that rats nest of wires that plague amateur builds and the unalloyed joy of getting your design back from PCBway (I have no affiliation with anyone and get no money for orders...) plugging all the parts in and bam it works (or doesn't...) For 20 bucks and an hour work on Eagle the results are amazing.

Wire It

lastSunset - 5.jpg
lastSunset - 6.jpg
lastSunset - 7.jpg
lastSunset - 9.jpg
lastSunset - 1.jpg

I enclosed the Eagle board drawing so you can get all the connections off of that rather than a bad fritzing diagram. All the components fit easily on the board except the transistor -- the larger one I mounted on the back to save space and get it to stay flat. I got some screw connectors (see photos) to attach speaker, solar cell, battery, GPS and switch to the board.

Build It

lastSunset - 12.jpg
lastSunset - 11.jpg
lastSunset - 10.jpg
lastSunset - 8.jpg
lastSunset - 3.jpg

The structure is fairly easy to assemble. Get a conch shell of legitimate size--not impressive if you put a small cowery shell on the board--if all else fails you can 3D print one....For the main beam I used one of those bentwood wine bottle holders that are popular and thus cheap. The components and board were protected from a deluge with a cheap modified iPhone case for the beach. The GPS ships in its own waterproof housing which is nice. All pieces are Shoe Gooed to the bottom of the solar panel and a painted aluminum edge was placed to round out the appearance. I don't have a 3D printer here so a bottom case for the solar cell would also work well. The speaker is the only component that is slipped into the shell itself. The switch with the led light is either put into the edge of the aluminum surround or through the wood below the shell. So far the build has survived several severe rainstorms.

Program It

There are a lot of fidgety parts to the code. The program uses a library called Dusk2Dawn that calculates the sundown when a particular location and timezone are passed. It is out of the question to have a lookup table for all the timezones available so to get around this I set a medium time zone of -12 and then use the activation time for the clock button on the initial set-up to set the RTC and subsequent alarms for the life of the clock. Minutes and seconds in addition to the base time are passed to the RTC for its next wake up. It uses a library: RTClibExtended.h to do the alarms and it works well. The Adafruit ESP 32 enables very low sleep current use (about 50 microAmps) and setting the locations lat and long in permanent memory after reboot was easy with the

RTC_DATA_ATTR variables. You have to use Serial2 with this device as the SerialOne is involved with something else when you are getting the data from GPS. The system works by turning on the device when you are just at sunset in good GPS location. The power on this first boot up is given by the transistor to the GPS unit which powers on along with the LED in the power switch. The GPS finds your location in about a minute, records it into permanent memory, sets the RTC clock for date and time, power is disconnected from GPS and LED, next wake up time is sent to RTC and the ESP goes to sleep leaving only the RTC to power. On awaking with a signal from the RTC to a pin 33 which is normally held high the power is sent to the sound module to play its sunset musical and then power down and reset the alarm. This uses minimal power and is easily charged back up with the TP 4056 and solar cell.

Using It

finaliconred.png

This is a really fun machine. The conch blow for sundown is popular in a lot of beach communities around the world---sitting in your Tommy Bahama chair, sun ball going down behind a cloud being recursively uploaded with sunset pictures.