#142 Solar Power for the ESP8266, Arduino, etc.

Grüezi YouTubers. Here's the guy with the Swiss accent. With a new episode about sensors and microcontrollers. We all have our gadgets and all of them need Electricity. We usually use batteries or a power supply. Today I am going to start a small project to provide our devices with solar energy throughout the year. If we want to do that We need to answer the following questions: 1. What size does the solar panel have to be to supply our device. 2. What size battery do we need to use to survive times without sun? These questions lead to the next set of questions: How much energy can we harvest in a year? How much energy does our device bring during this year? How is the energy distributed throughout the day and through the year? How long do we want with reduced or survive without the sun? Many questions.

So let's get started! But wait: I have to warn you! It won't be easy. But save the planet with green energy will never be easy! We use a simple design: a solar panel, a "charging unit", a battery and our ESP8266. How much energy can we harvest in a year? This mainly depends on three factors: The location where your solar panel is placed (and its direction towards the sun).

The size of the panel and the efficiency of your circuit transfer Solar energy to your ESP. The "location question" can be answered by looking at this map. If you want to know more, you can go to "solargis.com" I live near Basel and we get around 1200 kWh / m2. Solar energy per year. What does this mean in relation to an ESP8266 without "deep sleep" that uses around 100 mA at 3.3 volts, which is 0.33W? The year has 8760 hours. If we share that annual energy at these hours we get the watts: 1200 kWh / 8760 h corresponds to 137 watts / m2. This is the total radiation from the sun. Unfortunately, solar cells only have an efficiency of about 15%. So we get around 20 W / m2 from the solar cell. This is further reduced by the efficiency of our charger and the loss of the battery charging process. let us suppose we lose another 33%. Then we get usable energy of only 14W / m2 or 1.4 mW / cm2, since 1m2 = 10,000cm2. With these two numbers we can do that Size of the required panel: 0.33 / 14 = 236cm2, which corresponds to about 15 x 15 cm.

So this panel should be enough to power my ESP8266 all year round. Nice! But, let's quickly do the math the other way around: The supplier of this panel writes, That it delivers 4.5 watts. And our ESP only needs 0.33 watts. That's a big difference. So, do you know where I made the mistake in my calculation? Can't find a mistake? You're right: there's no mistake (at least that's what I hope), just one additional problem: the sun doesn't shine all the time. It fluctuates during each day and even over the months.

And the specifications of the panel only show us the peak energy and not in Switzerland, but in a country with a lot of sun! And maybe it's even a bit of an exaggeration, as usual with the information on Aliexpress … We have to continue our calculations. But because that's boring and the sun is shining outside, let's do some tests first: I bought a couple of small solar panels and a bigger one and now I want to do some tests. The test setup is simple: I put the solar panel in the sun and connect it to my new electronic load. An electronic load is a simple device: it acts like a variable resistor plus a volt meter and an ammeter. The only difference is that an electronic load automatically adjusts the resistance to a constant current, constant voltage or constant power.

And it automatically calculates the wattage and displays it, which is very handy for these experiments. Filming is not easy today, but I hope you can see the numbers. I start with no load and measure an "open voltage" of the solar cell of 6.5 volts. When I start drawing electricity we see that the power increases while the voltage drops a little. Suddenly, the voltage drops suddenly and we lose most of the power.

If I try again with smaller steps We see that we draw a maximum current of approx. 550 mA and that we get 2.8 watts of power. As soon as I draw more current, the voltage drops drastically. Why this? This is a typical feature of solar panels. Here is the result of my measurements of the 16x16cm module, and here is the theoretical curve. The shapes are very similar. And here you see the phrase MPP or "Maximum Power Point". In order to get maximum performance from the panel, we always have to work at this point. Unfortunately this point is moving when the lighting on the panel changes and we have to find it again. There are special devices that do just that. They are called MPPT or "Maximum Power Point Tracker". I'll cover this topic in a future video. You can buy monocrystalline or polycrystalline cells or panels. Monocrystalline silicon is used for most of our electronic chips and panels, made from this material are theoretically more efficient, which means that they should generate more electricity from a defined light intensity.

They should also be more expensive as polycrystalline modules. In reality, the differences are small and we shouldn't delve into them too much. You can tell the difference between Mono or poly modules, as they are usually called, can be seen well: The mono modules are darker, almost black and the polys are gray / blue. You can find the results of a sunny Sunday afternoon of work in this graph. Be aware that the results are not completely reliable as the smallest clouds can have an impact and I had to take my measurements in series, not in parallel. And in the middle I had to stop for a beer because the weather was really hot … We see that I have a performance per cm2 between 5 and 10 mW. We also have to keep in mind that not the entire surface of the panel is used to convert light. There are also areas for the different cells to connect because a cell only produces about 0.5 volts. So far we know how much energy we can harvest all year round, including on a sunny day.

Now let's find out further how big the panel and the battery have to be to safely supply our ESP throughout the year. Here in Basel we get 2.6 times less solar Irradiation in December than in July. And the sun goes away for a couple of hours every evening. And especially in winter we experience bad weather and sometimes we don't see the sun during days. This creates three additional problems for Our project: We have to make sure that our device survives the long winter nights. Make sure that our device can survive a period of bad weather and no sun make sure our device survives the whole month of December. Of course, these problems depend on the location. This is why I am showing the formulas and sources of my data.

With this you should be able to do your own calculations. The first problem can be solved with a battery that is charged during the day and discharged during the night. Let's quickly calculate the size of this battery for the shortest days of December. The day is about 8.5 hours and the night 15.5h So our battery has to be: 15.5hx 0.1A = 1.6 Ah. That is less than the capacity of an 18650 cell. Now the second problem: when we have bad weather assuming no sun for 2 weeks, we need a larger battery: 14 days x 24h x 0.1A = 34 Ah.

Here we need about 14 18650 cells in parallel. If that's the worst case scenario, now we know that Battery size. The next is to calculate the size of the solar panel. We can assume that the poor weather conditions are included in our averages for a given location. This is how we can design our solar panel for the worst month of the year. We take ours 1.62 kWh / m2 per day average solar energy for December, divide it by 24h and multiply it by the 10% to get the electrical energy. It's 6.7W / m2 Because we need 0.33W, we need a 448 cm2 solar panel to harvest enough energy to run our device in December. These numbers are for an average year. But these days we have never average years.

So we have to add a little more, and we end up with a panel size of 25x25cm, which corresponds to 625 cm2. Quite large! So, as a summary, we calculate the values ​​for Dubai, where it gets pretty hot in the summer. First we look for the radiation per m2 for the worst month of the year. It's 3.68 kWh / m2 / day. Then we divide this value by 242 and divide the energy requirements of our device by this number, and we get the size of our panel: 197 cm2.

The battery size can be smaller because we don't need to anticipate 14 consecutive days of bad weather. Let's say 5 days. The day Is 10.5 hours long and therefore 13.5h in the night. Then the size of the battery is only 12 Ah, which corresponds to about 5 18650 cells. Some of you may remember my videos Sleep modes. If we can reduce the power consumption of our device by a factor of 10, our battery size will be reduced to an 18650 for Switzerland and our solar panel to the size of 10×10 cm. And if we could reduce electricity consumption even more, for example, by using LoRa instead of WiFi, the battery and panel size would be reduced even more.

Excellent! Today we calculated the size of a solar panel and the battery is calculated for year-round use. In one of the next videos we have to focus on the charger between the solar panel and the ESP. This device has to meet some needs: Find and hold the MPP under all lighting conditions to get maximum power from the solar panel. Make sure that we have a constant voltage of 3.3 volts have for the ESP. Stop charging when the battery reaches 4.2 volts. This is especially important because we had to design the solar panel for the worst month of the year. All other months we will have way too much energy Protecting the battery from too low voltage Generating a low voltage signal so that the ESP can react accordingly. (e.g. send a message) I hope this video has been useful, or at least interesting to you. If this condition is "true", please click the "Like" button. bye.

Leave a Reply

Your email address will not be published. Required fields are marked *