Web Server Powered 100% By #SolarPower

This project has a web server running on Raspberry Pi powered 100% by solar power. via pi.qcontinuum

Before I purchased my solar panels, I had to calculate the power requirements. I bought solar panels rated at 45 Watts based on these calculations.

45 Watts at 12 volts would be 3.72 Amps. But this would be only the best case scenario, so for this math I used 3.5 amps. To charge an 80AH battery using a 3.5 Amp charger, it would take 22.86 hours. Of course there are losses, so my thoughts were that it would take 24 hours to charge the battery from dead to full. That would be 24 hours of sun light.

The Raspberry Pi Model “B” requires a 700ma 5 Volt (3.5 Watts) power supply. At 12 volts it would use 292ma. Of course, no voltage converter is perfect, so for calculations I used 350ma. An 80AH 12 Volt battery should run the Raspberry Pi 228.5 hours before its dead. Of course, the battery’s voltage would drop off before it was totally dead, so it is hard to say just how long it would run it. In a 24 hour period the Raspberry Pi would use 8.4AH of the 80AH battery. So, the solar charger at 3.5 amps would need to change the battery at least 2.4 hours each day to stay even with the power usage of the Raspberry Pi.

I ended up picking the 45 Watt Solar Panel Kit from Harbor Freight. The reason I chose it is because of the price. I did my homework, and knew the kit wasn’t the best quality. Since I am only using it for this project, I did not want to spend a ton of money on a real solar kit. The kit is also complete with everything I needed except the battery. Lucky for me, I had a battery laying around that I could use for the project. If I had to, I could replace any part of this system without any downtime, as long as I have good monitoring in place. If the battery starts to die off and not hold a charge, I can hook one in parallel and then remove the bad battery. If the panels or charging unit dies then I will have a day or so to come up with something while the server runs on battery power. There are single points of failures, but the same is true of the Raspberry and its one SD card.

The panels needed to be outside in the sun. I have a nice house and a wife I love, so I did not want to start drilling holes in the roof or do something to cause her (or the neighbors) to freak out. Also, this was a cheap “for the fun of it” project and I did not want scope creep to take over. The back of my house faces west, and we have a big deck. I decided set up the panels on the deck facing west. I cable tied it in place so I did not have to drill any holes in the deck or railings. I then cable tied the wiring along the bottom of the rails, down a gutter down spout, and along the bottom of the stucco siding. I lucked out because the stucco siding had a tin rail running under it with stamped holes in it. Every so many feet I put in a screw and cable tied the cord to it. The twelve volt cord that came with the panels (between panels and regulator) was only so long so I put a regular female extension cord plug on it and for the rest of the length. I used a standard extension cord I already owned. I wanted all the electronics in my datacenter in the house (I also have a LAN center in my house but that is another story). I used an old, but good quality extension cord that had already been cut for another reason years ago. Extensions cords work great as dirt cheap durable wiring. Once inside the house, I terminated the connection on the regulator.

I decided to buy an Arduino Uno to go along with the Raspberry so I could use it’s inputs and serial output to monitor the voltages. I used RRD tools to graph the voltages and Xymon to monitor and send alerts, if something goes wrong. The Arduino is connected directly to the Raspberry so it can collect the data. There is just so much you squeeze out of the limited resources of the Raspberry Pi, so I’m running RRD tools on a different server. In addition, I did not want to run an external HD connected to the Raspberry. I wanted the Raspberry run 100% off solar power and I thought the HD would use too much. I wasn’t sure if the Raspberry’s SD card would handle the constant rewrites of RRD tools. Both the Raspberry Pi and the Arduino run off the solar power.

Read more


Halloween season is here!
Halloween season is here! Check out all the posts, gift guides, and more!

Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New nEw NEWS From Adafruit Round-Up: July, August & September, 2024

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: New Python Releases, an ESP32+MicroPython IDE and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — Garden Lights, Bluetooth 6.0, and more!

Maker Business – Adafruit Daily — First Solar’s $1.1 billion development of vertically integrated factory in the U.S.

Electronics – Adafruit Daily — My signal isn’t THAT noisy, is it?

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



2 Comments

  1. Hi

    Which kind of circuit are you using to switch between solar power and battery power?

    Thank you.

  2. While it is convenient, please do NOT use regular AC connectors for anything other than their rated voltage. The risk is too great of someone plugging your 12V stuff into 120V, causing a fire or shock hazard. It is also against the NEC.

Sorry, the comment form is closed at this time.