Sun Battery




I have a real time clock module that I had never used, so I thought it would be interesting to do a project on the module to see what it can do. My concept for the project is based on a futuristic idea that one day Earth will become super polluted, the sky will always be covered with pollutants and dust, and people will have to look at some kind of gadgets to tell the position of the sun because the sun is completely covered by the dust. I imagine the device looking like the portable chargers that we have today. The charger usually have an indicator that shows how much battery it is containing(more battery, more light or brighter light,etc). “The Sun Battery” will have six green LEDs. One LED lights up at sunrise and more lights up as the sun keeps rising higher. All six LEDs will light up at noon as the sun is at its highest position, and the number of lights will gradually decrease  towards sunset. There won’t be any light after sunset.

After having the concept of the device thought out, I started to put together a circuit and began writing the code.

sun battery schematic


I included a potentiometer in the circuit for me to switch to the demo code that I had written for in class demonstration purpose because the main function of the device is based on 24 hours time and it will take 2 hours to see the changes.



references for the module’s libraries and usage:


demo video of the


Turing the potentiometer to the left will activate the demo code and turning to the right will switch it back to the main sun battery function. Serial port will print the current date and time only when the potentiometer is turned to the right.  I filmed the video at 8pm, so the sun battery function did not have any LED light up.


Device at 2PM



Device at 11 AM the next day



After the circuit was done, I then began to work on the case. My concept was to create a portable charger looking device, but it also has to fit all my circuit in it, so I casted a drinking glass, which the casting turned out to look like a giant AAA battery.

Finished cast



The interior is smooth.






The plaster was hard to cut and I was unable to achieve my conceptual design.




I switched to Rhinos and made a new container to 3d print.


Unfortunately, I miscalculated the dimension, making it very hard and time consuming to put my circuit into the 3D print object and so I ended this project here.

3D files:

After playing around with the real time clock module, I have come up with many future project concepts. The rtc module can be used to make an interactive world globe that presents times zones around the world via LED lights, the module can also be used to create a simple daily trigger that can be used in many other projects, such as interactive reminder, pet feeder, and robots.



Leave a reply

Skip to toolbar