Prototyping a Solar Solution for your Outdoor Embedded Device

Ari Mahpour
|  Created: August 1, 2022  |  Updated: July 1, 2024
Prototyping a Solar Solution for your Outdoor Embedded Device

From wireless cameras to fountain pumps outdoor electronic devices have become more and more popular as the cost of alternative energy, such as solar panels, have come down. Gone are the days where we have to wire up a whole backyard just to install a series of garden spotlights. We find solar panels embedded in many outdoor electronic devices not only for garden lights but for myriads of different electronic devices as well. In this article we will look at a home brewed solution for powering up your devices using the sun and the trials and tribulations that come with doing so.

Starting from scratch using development boards

For the last decade I have been playing around with solar charging IC development boards such as the Adafruit Solar LiPo Charger and Sparkfun Sunny Buddy. A major limitation to these boards is that they provide no DC-DC boost converter that gives you a solid 5V output (for USB enabled devices). You are left with the straight battery voltage that generally sits between 3.7V and 4.2V. To me, this wasn’t the optimal solution as we will discover in this article.

One of the major challenges with batteries, chargers, and loads is the constant race for energy once a battery dies. Consider the following analogy: you’re training for a marathon or trying to push that last rep in the gym. After an exhausting workout I come up to you and ask you to drop and give me another hundred push ups. Chances are you might be able to eke out a few more but that’s it. Let’s say I gave you a moment to catch your breath and then tell you that you need to start all over with another 100 push ups. Chances are that you’ll never be able to hit that 100 push up mark unless you’ve fully recuperated. Just like this endless cycle where your energy becomes depleted, storage devices need the same thing: time to recharge.

Now consider a battery that is almost dead. Our embedded device is hooked up to it and, as the battery charges to a certain point, the DC-DC kicks in and, whoosh, in rushes the current to the embedded device. The problem is that we’ve just depleted the battery of energy which, in turn, turns off the downstream device. As soon as the battery gets charged up a little bit the same thing will occur. This can go on forever as we saw above with the push up analogy. To combat this we bring in a voltage supervisor. A voltage supervisor ensures that the battery voltage (which corresponds to the energy stored in a battery) is high enough so that turning on the downstream device won’t kill the battery. This is one of the cheapest and simplest ways of ensuring your battery is protected from that infinite loop of constantly depleting the battery before it charges up enough. What exact voltage level you deem acceptable depends on the device that’s consuming the energy. The less power your end device consumes, the lower the threshold you can set for your supervisor circuit. A very simple combo circuit that I had hanging around my lab was a TC54 voltage detector in conjunction with a MOSFET as demonstrated in the TC54 datasheet and like so:

Using the voltage detector in conjunction with a MOSFET to act as a switch

Figure 1: Using the voltage detector in conjunction with a MOSFET to act as a switch

You can find DC-DC converters that have built in undervoltage lockouts to achieve the same thing but sometimes we have to work with what we’ve got and at the time of writing this article all I had were cheap, dumb DC-DC converters with no features built in. Once I had the voltage supervisor set up correctly I was ready to hook everything up. The following diagram illustrates my full setup:

Original concept design

Figure 2: Original concept design

As you can tell in the image below, prototyping the circuit proved to be quite messy. Using a Sparkfun Sunny Buddy with a LiPo battery and dirt cheap 6 pack of DC-DC converters I kludged together a diagram above. It goes without saying that spinning a new PCB would be needed if I wanted to fit everything in a nice little package.

Prototyping the circuit from figure 2

Figure 3: Prototyping the circuit from figure 2

At the top of the board you’ll see the DC-DC converter with a huge capacitor at the output which was used to smooth out some of the spikes. Ideally we’d want to tweak our power supply such that a huge capacitor is not needed at the output but, again, sometimes we have to make do with what we have on hand for our prototypes. Below the DC-DC converter you’ll see some resistors, the TC54 device, and an N-Channel MOSFET. I am actually monitoring the output of the DC-DC converter instead of the battery output in this case (versus the reverse as depicted above) but either will work. I also limited the current coming out of the DC-DC converter to ensure that the in-rush to my downstream device was controlled. Finally, you will see the NodeMCU device at the bottom of the board. The minimum input voltage it requires is 6V so I set the TC54 to monitor a proper ~7.2V output (using a resistor divider at the input to the TC54) for some extra margin.

Conclusion

This particular design worked quite well. It was a total mess of wires but it was functional. While it was a fun project to work on, it was time consuming. Had I designed the DC-DC converter and solar charging circuit myself, I probably would not have been able to stuff the boards at home as well. I would have to rely on a board assembly house to put it together and that would have cost me a fortune. In the next article I am going to propose a series of different solar charging solutions for embedded devices (including this one) where the reader can then decide which is the best option for them. We’ll look at fully custom solutions all the way to out-of-the-box ones. At this point you should have enough information to design your own solution with voltage detection and power your downstream device using the sun.
 

About Author

About Author

Ari is an engineer with broad experience in designing, manufacturing, testing, and integrating electrical, mechanical, and software systems. He is passionate about bringing design, verification, and test engineers together to work as a cohesive unit.

Related Resources

Back to Home
Thank you, you are now subscribed to updates.