We have previously looked at how to make a wireless device live for years on one tiny coin cell battery. This time we up the game and make it live forever, using solar power and off-the-shelf hardware.
We build a prototype of our device and go through the technical details involved in designing for solar power. We use off-the-shelf hardware running the latest version of the Thingsquare ultra low-power software. Light does not provide a lot of power, so we need software that can make the most of it.
What We Want to Achieve
Light gives us the possibility to have unlimited power. This means that we will not have to worry about battery depletion and will not have to change batteries, which opens up new possibilities, such as large-scale monitoring of places that are otherwise hard to reach.
Our wireless network is connected to the Internet via a gateway. The wireless nodes are powered by light. The distance between devices can easily reach kilometers.
There are many situations in which we would like a wireless network that lasts forever:
- Large-scale vineyard monitoring: keeping track of the vines that make up fine wines
- Checking up on those organic crops: believe it or not, agriculture is all about data
- Big city life: cities have parking spaces, trash cans, bus stops, trains and other urban necessities that need to be kept track of
- The great outdoors: knowing where cattle and livestock live their lives means farmers can save money
Any many more.
Feasibility: Can We Do it?
To get a first peek at the feasibility of our system, we look at the power needed to run the system. A wireless end-device with a 2-hour sensor update rate needs about 0.1 mW. Wireless mesh routers need about 20 times more since they need to use the radio more.
By comparison, a Raspberry Pi Zero W, which is a relatively low-power general purpose computer, needs about 0.5-1 W. This leads to a much larger solar cell area, as seen in the comparison below.
Relative solar cell panel sizes. Absolute sizes are determined by the geographical location at which the device is intended to be used. The leaf device panel size vary between 0.5 x 0.5 cm (0.2 x 0.2 inches) for deployment near the equator, to 2 x 2 cm (0.8 x 0.8 inches) for deployment in Stockholm, Sweden.
A solar-powered system needs a solar cell and a small rechargeable battery to store power when direct light is not available. We compute a reasonable solar cell area needed by looking at existing solar cell technologies and their power efficiency.
For outdoor applications, the actual solar cell area depends on where in the world the system is to be deployed. In Stockholm, Sweden, the Raspberry Pi Zero W needs a solar cell about the size of an iPad and the leaf node a solar cell about the size of a thumb nail. At the equator, the Raspberry Pi Zero W needs a solar cell about the size of an iPhone.
Is Indoor Light Enough?
The sun radiates an immense amount of energy. Indoor lighting is very energy-poor in comparison. For our nodes in life-time mode though, we don’t need much, just a few milliwatt. But not only is the intensity of the light much less, the spectrum of the light is much smaller too. Solar panels for outdoor applications work badly indoors.
Ok, Let’s do it!
Now that we know that our goal is feasible, we can build our first prototype.
The components of a solar-powered wireless device: a set of solar cells, an energy store, a wireless microprocessor, and sensors.
We will build a prototype of an air quality monitoring system. We all breath air, so air quality affects us all. Being able to always monitor it means that we can improve it.
Air quality can be measured both indoors and outdoors. We start with making an outdoor version of our system, as we are likely to have more light in an outdoor environment, so it should be easier to design for.
We use an existing reference design for our hardware, but we replace its battery with a solar power mechanism (solar panel, rechargeable battery, and battery charger). The reference design uses the CC2650 wireless SoC but we can use its sub-GHz counterparts CC1350 or CC1310 to get a better range.
The air quality sensor reference design.
The Hardware Prototype
We build a hardware prototype with a Texas Instruments CC1350 Launchpad, which contains the low-power wireless chip that runs the software of the system. It is powered with a solar panel, one rechargeable battery, a few electronic circuits for controlling the recharging of the battery, all of it consumer-grade off-the-shelf hardware.
Putting it together, we end up with the hardware that we see in the picture below.
The prototype hardware consists of a solar cell, one rechargeable battery, and one wireless TI Launchpad device. Clearly, this prototype won’t win any contests based on its looks.
At this stage, the hardware is not pretty. But this is ok, as we will be able to make a more polished version later, once we have have seen that we can build and run the prototype.
Solar Power in Action
We set up our hardware prototype and connect it to one of the wireless networks in our office.
We configure the software to read the voltage from the solar panel and from the battery. The battery should provide a stable 3.3 V voltage, whereas we expect the solar panel’s voltage to vary over the course of the day. We see the results in the graph below.
The voltage from the solar panel, which we use to charge the battery, varies over the day. September 24 was a sunny day, hence we saw more power from the solar panel.
We now have made a wireless device that lasts forever. Or at least for as long as we have enough light to sustain it.
Let’s now dive deep into the technical details behind designing a wireless product to live off rays of light.
Background: Power and Energy Harvesting
Solar power is an instance of a more general form of power for our devices called energy harvesting. Energy harvesting is scavenging power from what we have around us, be it light, sound, mechanical energy or differences in temperature. Of these, solar power energy harvesting is the most common in use, part because it is a mature technology with a high energy density. This means that the components we need are readily available, cheap, and well understood. It is robust and efficient.
The factors that set the solar power solution are the load, the panel, where and how it will be used, and how much backup will be included in the design.
Components of a Solar Powered Product
Solar power makes use of the energy that is radiated by the sun from fusion, which travels about 8 minutes of space, and ends up hitting the solar panel. Direct Normal Irradiance, or DNI, is a measure of sunlight availability at a location. It varies with location, weather, season, etc. The equator has a fairly stable DNI across the year, while the north and south poles vary to the extreme with never-ending nights and days.
To convert the light into electrical energy, we make use of a light sensitive device called a photovoltaic cell. Several such cells can be connected to form a solar panel.
Solar cells are commonly made of monocrystalline or polycrystalline silicon. They typically convert between 15% and 25% of incoming light to electrical energy. Monocrystalline cells are better, but more expensive. Newer generation cells are made out of thin film but the cost/efficiency still makes it more suitable for specialist equipment.
Solar panels output electrical energy and is connected to a battery charger that accumulates the energy so that the product can be powered even when there is no available sunlight. The battery output is then regulated to a safe and stable voltage for the load.
A battery charger may vary the load to find a sweet spot that maximizes the output from the solar panel. This is called the Maximum Power Point, or MPP. Chargers that do this are called MPP trackers (MPPT), and are slightly more complex and expensive. For low-power devices, MPPT chargers may not be worth the cost and effort, and instead a simple charger can be used.
Design for the Worst Case
Since our product is likely to be left out in the wild in the hopes of not needing to touch it ever again, we need to design for the worst case. And then more. This is a trade-off of course - a larger panel and larger battery costs more and takes more space.
This means that we need to know a few things to be able to size the solar panel and battery.
Hours of sunshine in different places in the world. Souce: Landsberg, H. E. in Pinna, M. L’atmosfera e il clima, Torino, UTET, 1978, p. 63., Public Domain, Link
Assertions, Assumptions, Guesses
We need to know how much sunlight will be available for harvest by the product. This varies with location, the geography, how the panel is positioned, and with season. This can be found through weather data and websites offering such information. Note that we must use the worst case in every aspect or we might find that the product won’t work during the winter. For the worst place, find the worst month, worst angle, worst direction, and use that number.
We also need to know the average load our product will use. This must be a long-term average, and include things that happen rarely. For example, if the product samples a sensor regularly and conditionally runs a motor a short while, we must take this into account in the average. This is measured in a lab. Ideally, you need to use an oscilloscope or load analyzer since fast power spikes might be missed if the sample rate of the equipment is too low.
When there is no sun, the product runs on the battery only. To size it, we need to decide on a maximum number of days without any sunlight the product should handle. This will cover bad weather and nights. The average sunlight per day we used earlier includes this, but it does not convey the notion that there may be close to zero sunlight for a period of time.
Every system has losses. We need to account for losses through battery self-discharge, voltage conversion losses, and so on. Related to weather, we also need to know the temperature the product will be used in. Cold weather will generally severely impact the battery performance, by as much as a factor 4. Further, depending on the battery used, we might not want to discharge it too much since that can permanently damage the capacity. For example, lithium polymer batteries should not be discharged more than 30-50%.
A solar-powered product must be designed specifically for the geographical place in which it is sold.
Designing for a worst case scenario often pays off.
If we assume that our product will be used in Stockholm, Sweden, it is as a pretty good worst case. Of course, this would be sold in other locations too, but Stockholm is a relatively dark place.
Stockholm is at approximately 60° North and sees long period with very poor sunlight. Stockholm is also particularly gifted with sporadic periods of poor weather, blocking sunlight.
- Location: Stockholm, Sweden
- Month: design for worst case
- Panel orientation: design for worst case, here flat horizontal
- Panel compass orientation: design for worst case, for horizontal flat surface the compass orientation it doesn’t matter
The result is a worst DNI of 250Wh per m2 panel and day in December. If we can handle December, we can also handle July, but not vice versa. This is the theoretical average maximum we can get in the worst case, with a 100% efficient panel. This is an average over several years. For comparison, a panel in Washington DC, USA, would during the worst month get 3220 Wh/m2/day if mounted at the optimum angle, facing south.
Taking this into account,
- DNI: 250Wh per m2 panel and day
- Panel efficiency: typical consumer-grade panel, 16%
- Losses: assume ca 20% losses
we find the maximum power we will get, as a worst case averaged over all time: 0.1333 mW per cm2 panel. With a 0.5 mW load, we need 3.75 cm2 panel, or a 2 by 2 cm square. This is the power we can get from such a panel, worst case.
Since it’s not always sunny, we use a battery to store the energy for dark hours. It’s also necessary as a power reserve for large power spikes, such as when using a motor.
One of the most common battery types used in this kind of application is Lithium polymer batteries. They have a couple of drawbacks though.
- Must not draw too much current
- Must not discharge too much or it will permanently be damaged
- Has a cell voltage of 4.2 when fully charged and around 2.7 to 3.0 at discharge cut-off
- Performs worse when cold
This is handled by:
- Using a charger with protection circuit
- Compensating with a larger battery, and let the charger cut off
- Using a regulator and letting the charger handle cut-off appropriately
- Compensating with a temperature compensation factor, if the product is used in the cold
Battery capacity versus temperature. When it is -20° C, the capacity is just a fourth the room temperature capacity (source Sanyo li-poly upf454261 datasheet).
We use the following assumptions,
- Days without sunlight: 10 days
- Average load: as above, 0.5 mW
- Battery type: li-poly, affects temperature compensation and max discharge
- Temperature compensation: we will use it in -20° C, so factor 4 (found in the battery datasheet)
- Max discharge: discharge no more than 50%
The resulting battery size is a minimum 3.7V 260mAh capacity. That is about the size of a coin cell battery, meaning this would be a very small product.
What About Indoor?
Indoor has a lot less available light energy, which is harder to harvest due to a more limited spectrum. For indoor use, we need a special panel that is suitable for this kind of condition. One manufacturer of such is Ixys and we use the values from their datasheet and marketing material.
Ixys retails solar cells and panels adjusted for indoor lighting. They are typically monocrystalline silicon cells with a 22% efficiency and can harvest a wide light spectrum.
The available light power indoors is much lower than outdoors, ca 5 to 15 W per m2 panel and day (source).
Let’s assume the following changes compared with before,
- Indoor condition: indoor office setting, 10 W per m2 panel
- Panel efficiency: per datasheet, 20%
- Lit conditions: 10 hours lit per weekday, off during weekend: factor 0.30
- Temperature compensation: we will use it in room temperature, so factor 1.1
- Days without sunlight: 14 days (vacation times)
The resulting figures are, we need a panel that is 16 by 16 cm, and a 3.7V 100mAh battery.
With a little help from the sun, we can have a network live forever, even indoors. There are a number of factors to take into account, but when you know about how to design for them, it’s not rocket science.