DEV Community

jeikabu
jeikabu

Posted on • Originally published at rendered-obsolete.github.io on

Solar Powered USB

Some areas of my apartment lack convenient outlets to power smart home devices. Running cables everywhere will decimate the fengshui of my abode, but living in a sunny climate makes solar power a palatable option. I ended up trying the “adafruit build” (see projects 1, 2, 3)- so named because all components are available from Adafruit:

Given that the Raspberry Pi Zero consumes around 0.5W, a 6W solar panel and 6600mAh battery is overkill for many devices. Over-speccing now means:

  1. Don’t need to optimize software for power consumption during development (e.g. putting CPU or wifi to sleep)
  2. Can repurpose with more demanding devices

Some Assembly Required

The small number of components really only fit together one way and some basic soldering is required. Adafruit has a tutorial or you can follow one of the related projects mentioned above, but the instructions boil down to:

  1. Solder:
    • Capacitor to solar charger (stripe is negative lead)
    • USB-A connector to PowerBoost
  2. Connect:

And voila:

I didn’t have any shrink wrap on-hand so I used a snip of electrical tape for exposed wire bits.

Assuming everything is done correctly, expose the solar panel to sunlight and the orange CHRG LED on the solar charger flashes and the green PWR LED on the converter is lit. If you’re foolish like me and do this at night in a home with “energy efficient” LED lighting, a 1000 lumen torch does the trick.

A Long Straw

Should you need to reach further away to drink up the solar rays:

  1. Switch the solar panel to 5.5/2.1mm via either:
    • Shortest, cheapest 3.2/1.3mm to 5.5/2.1mm adapter you can find (example)
    • Remove the existing jack and replace with another, e.g. this:
  2. Use appropriate length of amply available, inexpensive 5.5/2.1mm DC extension cables (example)

In my case, the solar panel’s 0.26m of cable was enough to place it outside the bathroom window, and an additional 1m allowed me to place the remaining electronics on the nearest shelf.

Winning

At this point I connected a Pi Zero I've been using and it booted without issue.

This was a fun and incredibly rewarding project.

On occasion I share these side projects with my family, but this was the first that garnered a reaction and aroused interest. Few people can appreciate the subtle nuances of software development, but in this foul Year of our Lord, 2019, everyone can grok the covetousness of portable USB power!

The modular nature of it also deserves attention. You should be able to disconnect the JST from the PowerBoost converter and hook the 3.7V from the charger/battery directly up to 3.3V devices. Plan to use an ultra-low-power Arduino? Swap out the 6W solar panel and 6600mAh battery for something more modest. Device needs 1-2A? Swap the PowerBoost 500 for a PowerBoost 1000.

It’s tempting to revisit my air-quality monitor, but no longer living in Shanghai I have little use for it.

Alternatives

There’s numerous other potential solutions if you’ve got different requirements (or hold a grudge against Adafruit). A by no means exhaustive list in no particular order:

Top comments (0)