Limpkin's blog - Tag - solar energy<div>An electronics geek blog, dedicated to sharing and open source. Check out my stores: <a href="https://lectronz.com/stores/stephanelec" hreflang="en" title="Lectronz store">EU</a> / <a href="https://www.tindie.com/stores/stephanelec" hreflang="en" title="tindie store">EU & US</a>.</div>2024-03-19T09:35:26+00:00Mathieuurn:md5:51de6a3d917257edeff5a252fe925b02DotclearIndoor solar energy harvesting: a platform to (finally) get some numbersurn:md5:9343b052ff436b17d22d907d430e55cf2011-12-07T10:00:00+00:002024-03-09T11:11:09+00:00limpkinMy Projectsavreepromlogsolar energysolar panel<p>Means to extract solar energy are <strong>not new</strong>, but I'm still not seing anything solar-powered in my everyday life... <strong>Why is that so ?</strong><br>
Moreover, when you're trying to get some numbers on how much solar energy you could expect to harvest in an indoor environment, well... you basically <strong>don't find anything either</strong>...<br>
So, let's build a platform that can finally give <strong>some info</strong> about the possibility to use solar energy to power your projects :) !<br></p>
<p><img src="https://www.limpkin.fr/public/Solar_platform/.PLATFORM_m.jpg" alt="Finished platform" class="media-center" title="Finished platform, déc. 2011"></p> <p>Before talking about the platform I made, I'm going to write a <strong>basic introduction</strong> on solar energy harvesting.<br>
A solar energy harvesting system can be decomposed as shown below:<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/charging_chain.png" title="Solar energy harvesting system"><img src="https://www.limpkin.fr/public/Solar_platform/.charging_chain_m.jpg" alt="Solar energy harvesting system" class="media-center" title="Solar energy harvesting system, déc. 2011"></a><br>
As you can see, every element of this chain has quite important disavantadges. What I mean by "battery charge efficiency" is that typical Li-Ion batteries are not optimized to be charged at low currents (as far as the battery life is concerned). <br>
So let's analyse in details each element shown above to get a <strong>better understanding of the solar energy harvesting concept</strong>.<br><br></p>
<h2>Indoor lighting and solar panel orientation<br><br></h2>
<p><a href="https://www.limpkin.fr/public/Solar_platform/solar_panel_orientation.png" title="Influence of solar panel orientation"><img src="https://www.limpkin.fr/public/Solar_platform/.solar_panel_orientation_m.jpg" alt="Influence of solar panel orientation" class="media-center" title="Influence of solar panel orientation, déc. 2011"></a><br>
Did you know that a 45 degrees misalignment of your solar panel reduces your solar panel energy extraction efficiency by <strong>20%</strong> ? Actually , my tests showed that it is <strong>much more</strong>...<br>
Looking at the graph above, you can already see that extracting solar energy in an indoor environment can be quite tricky, as you will mainly get the <strong>reflections</strong> of the sun rays in the room where your solar panel is located (and of course your indoor lighting). <br>
For information, for an outdoor environment, if your solar panel is not tracking the sun position, you could expect this energy production:<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/solar_energy_production.png" title="Solar energy production through the year from http://www.macslab.com"><img src="https://www.limpkin.fr/public/Solar_platform/.solar_energy_production_m.jpg" alt="Solar energy production through the year" class="media-center" title="Solar energy production through the year, déc. 2011"></a><br>
From macslab.com: The graph above shows the effect of adjusting the tilt of your solar panel. The violet line is the amount of solar energy you would get each day if the panel is fixed at the winter angle. The turquoise line shows the energy per day if the panel is fixed at the full year angle. The red line shows how much you would get by adjusting the tilt four times a year as described above. For comparison, the green line shows the energy<strong> you would get from two-axis tracking, which always points the panel directly at the sun.</strong> These figures are calculated for 40° latitude. <br>
You can clearly see a big difference in energy production if your solar panel is able to track the sun... quite impressive right?<br><br></p>
<h2>The solar panel itself<br><br></h2>
<p>Photovoltaic solar panels (the ones you will find everywhere) have <strong>very low efficiency</strong>. The ones I bought from <a href="http://www.seeedstudio.com/depot/05w-solar-panel-55x70-p-632.html?cPath=155" hreflang="en" title="seedstudio">seedstudio</a> only have a <strong>17%</strong> efficiency.<br>
That is indeed quite annoying! Lots of research is currently being done to increase this efficiency, and some amazing discoveries have just been done. But you'll still have to wait <strong>quite a long time</strong> before these new panels are available for you to purchase.<br>
And not only do they have low efficiency, but you <strong>can't use the produced energy as you would like to</strong>.<br>
<a href="https://www.limpkin.fr/public/Solar_platform/solar_iv_curve.png" title="Solar panel I/V curve"><img src="https://www.limpkin.fr/public/Solar_platform/.solar_iv_curve_m.jpg" alt="Solar panel I/V curve" class="media-center" title="Solar panel I/V curve, déc. 2011"></a>
Shown above is the current / voltage curve of a typical solar panel for different lighting conditions. It shows the <strong>non-linear efficiency</strong> of the solar panel when it comes to electric energy extraction.<br>
To get the maximum energy from the solar panel, you'd have to <strong>adjust your load</strong> so it is exactly at the right position in this I/V curve (black line in the graph). This is called <strong>Maximum Power Point Tracking (MPPT)</strong>, and can be done using several algorithms.<br><br></p>
<h2>The battery charger<br><br></h2>
<p>This element takes the energy from the solar panel to charge your battery.<br>
It is mainly composed of a<strong> step-up voltage converter</strong> and usually includes a basic <strong>Maximum Power Point control circuit</strong>.<br>
However, its efficiency will <strong>vary with its output current</strong>.<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/efficency_ltc3105.png" title="Efficiency of the LTC3105"><img src="https://www.limpkin.fr/public/Solar_platform/.efficency_ltc3105_m.jpg" alt="Efficiency of the LTC3105" class="media-center" title="Efficiency of the LTC3105, déc. 2011"></a><br>
The graph above is taken from the Linear Technology's <strong>LTC3105</strong> solar energy harvesting chip datasheet that I had previously chosen for my solar energy harvesting logging board.<br>
What can we say? Well, it's great if you have plenty of light in your house, but otherwise... <strong>not good</strong>.<br>
And you know what? When there's no light in your home, this chip consumes <strong>40uA</strong>!!! Quite a bad surprise when I assembled my first board....<br><br></p>
<h2>All in all<br><br></h2>
<p>Here is a simple drawing that summarizes what I wrote until now:<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/overall_efficiency.png" title="Overall system efficiency"><img src="https://www.limpkin.fr/public/Solar_platform/.overall_efficiency_m.jpg" alt="Overall system efficiency" class="media-center" title="Overall system efficiency, déc. 2011"></a><br>
I will let you do the maths :) ...<br>
Anyway, this is a first answer to the question "why am I still not seing anything solar-powered in my everyday life?".<br>
But let's <strong>not give up that easily</strong>. Why? Firstly because we still would like some numbers on the energy you could expect to <strong>harvest / lose</strong> in an indoor environment but also because 2 months ago (at the time I am writting this article), Texas Instruments launched an interesting chip on the market: the <a href="http://www.ti.com/product/bq25504" hreflang="en" title="bq25504">BQ25504</a>.<br><br></p>
<h2>The logging platform<br><br></h2>
<p>So here is a picture of what I want to log :<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/logging_board_picture.png" title="What the platform will log"><img src="https://www.limpkin.fr/public/Solar_platform/.logging_board_picture_m.jpg" alt="What the platform will log" class="media-center" title="What the platform will log, déc. 2011"></a><br>
In plain text, I want to know at any moment in time what is the <strong>energy that is given to / lost by my battery</strong>.<br>
And while I'm at it, I want to compare it with the energy that is <strong>dissipated in a fixed load</strong> when the same solar panel is not connected to a battery charger (ie another solar panel is <strong>directly connected to one resistor</strong>).<br>
The goal of these two energy measurements is therefore to check the performance of my battery charger (MPPT + efficiency).<br>
So here are the schematics:<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/schematics_logging_board.png" title="Logging board schematics"><img src="https://www.limpkin.fr/public/Solar_platform/.schematics_logging_board_m.jpg" alt="Logging board schematics" class="media-center" title="Logging board schematics, déc. 2011"></a><br>
So what you should firstly see here is that <strong>two batteries are used, one dedicated to receive the harvested solar energy and the other to power the logging circuit</strong>.<br>
The battery charger is therefore the <strong>BQ25504</strong> from Texas Instruments, and all the resistors you see around it are used to set the correct <strong>charging voltage and MPPT parameters</strong>. This new component is <strong>very promising</strong> and is already encountering quite some success on the blogs accross the web, even though it is <strong>still not available for sale</strong> (you can ask for some samples though ;) )! Unfortunately the BQ25504 is in a<strong> QFN package</strong>... lots of fun to solder!<br>
You may also notice that I'm not using the MAX9934 bi-directional current sensing capability. The reason for this is that the BQ25504 quiescent current is only <strong>1uA</strong>, which is <strong>nothing</strong> compared to the current provided by the battery charger when there is little light (all these data have been measured by me, as it is not the first board revision ;) ).<br>
When there is no light, the quiescent current of the harvesting part of the platform is actually <strong>3uA</strong> (1uA from the BQ25504 + 2uA from R6&R7). Please note that increasing R6&R7 value to reduce the quiescent current will make your Vcharg voltage reading not accurate as the ADC input resistance of the ATtiny is not infinite. Anyway, I only want a worst case scenario (ie what is the <strong>minimum harvested energy I can expect</strong> for a given month).<br>
So basically the chosen ATTiny87 is able to measure at any moment the <strong>voltage of (the battery + sensing resistor), and the current going through them</strong>.<br>
R4 and R5 have been set to measure up to <strong>4.4mA</strong> in the BT1 + R4 branch, thus I will only be able to measure up to 18.5mW charging energy. My first measurements showed that you will <strong>not be likely to attain this energy level in an indoor environment</strong>.<br>
Expected sensing resolution is.... well it varies with the voltage across R5. Why? Because I can use the differential input of my ATtiny87, which can have a gain of <strong>1x, 8x or 20x</strong>. Its ADC has also three voltage references: <strong>1.1V, 2.56V</strong> and the system's <strong>3.3V</strong>, so I'm not going to list all the cases here.<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/BQ25504.JPG" title="BQ25504"><img src="https://www.limpkin.fr/public/Solar_platform/.BQ25504_m.jpg" alt="BQ25504" class="media-center" title="BQ25504, déc. 2011"></a><br>
Concerning the solar panel which is directly connected to a fixed load, R8 & R9 have been chosen in such a way that the maximum energy that you can measure is the same as the one above (18.5mW). <strong>R = U²/P</strong>, with U = 5V and P = 18.5mW.<br>
Resolution for this part is (when chosing the 2.56V ADC reference) <strong>10mV</strong> which corresponds to a <strong>0.29uW</strong> resolution.<br>
For the logging part, the ATtiny87 has a 256kbits SPI EEPROM connected to it, allowing a <strong>one-month logging capability</strong> for 4 bytes of data taken every 6 minutes (3 voltages + one parameter bytes). Once again, I don't need the maximum resolution that the ADC can provide (<strong>10bits</strong>) but just a <strong>worst case energy harvesting scenario</strong>, so 8 bits are enough (and I'm not even mentioning the internal reference & amplifier gain precisions). One could argue that I could also have chosen a Flash storage chip or an external SD card. Well, I mainly chose this solution because I wanted to collect the data every month and because it was simpler this way :) .<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/in_action.JPG" title="System in action"><img src="https://www.limpkin.fr/public/Solar_platform/.in_action_m.jpg" alt="System in action" class="media-center" title="System in action, déc. 2011"></a><br>
The microcontroller has a 32k crystal connected to one of its timers to have a (quite) accurate <strong>time base</strong>. The U7 connector is present on the board to allow data export through the ATtiny serial interface (ie you just have to connect these lines to a <strong>FTDI232 serial to USB converter</strong>).<br>
The MAX1551 li-ion battery charger is here to allow <strong>logging battery charge at any point in time</strong>, and the brand new <strong>ADP162</strong> LDO 3.3V regulator from Analog Devices has been chosen, as it has a <strong>very low quiescent current</strong> (7uA for 1mA load) and a <strong>very low dropout voltage</strong> (7mV for 10mA load).
Current consumption of the whole circuit is <strong>635uA</strong> in sleep mode, which gives me a nice theoritical 38 days autonomy for the 580mAh Li-Ion batteries I just bought. Here is the picture of the assembled board:<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/PLATFORM.JPG" title="Finished platform"><img src="https://www.limpkin.fr/public/Solar_platform/.PLATFORM_m.jpg" alt="Finished platform" class="media-center" title="Finished platform, déc. 2011"></a><br>
Please note that on this board, you'll have to monitor (well, maybe once a month) the voltage of the BT1 battery <strong>in case it is full</strong>. But nothing to worry if you choose a high capacity Li-ion battery :) . Therefore, one improvement could be to allow the ATtiny to discharge the solar energy harvesting battery, but I'm not sure that it is crucial.<br>
Do I have beautiful graphs to show you? <strong>Not yet!</strong> I wanted to publish this article on my blog as soon as I had a fully tested board so <strong>you may want to do the measurements at the same time as me</strong>. But I can already tell you that this BQ25504 chip is <strong>quite impressive</strong>! The few tests I already made showed that it has a <strong>better efficiency</strong> than a solar panel directly connected to fixed load.<br>
So here are the files in case you want to join the initiative ;), let's build a <strong>database of energy measurements</strong>!:<br></p>
<pre><a href="https://www.limpkin.fr/public/Solar_platform/Datasheets.rar">Datasheets</a> <a href="https://www.limpkin.fr/public/Solar_platform/Solar_Platform.rar">Solar platform production files</a> <a href="https://www.limpkin.fr/public/Solar_platform/avr_solar_tester.rar">Source files</a><br><br></pre>
<p>By the way, the computations performed in the main.c file with floats is<strong> just for your information and debug</strong>. You will want to <strong>remove all this part</strong> as I found that computations with floats in an ATtiny takes a lot of space (DUH...) but also <strong>corrupted data stored in the ram space on my platform</strong> (my guess is because of a stack/heap collision)... If you still want to use this functionality, you may want to find a way to do this computation with only multiplication and bit shfiting :) . Be aware that if you're not familiar with the structure of an AVR microcontroller memory space, these bugs are practically impossible to find.<br></p>
<p>Still reading? Ok, just because it is you, here are the energy measurements I had today at home :<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/releves.png" title="First energy measurements"><img src="https://www.limpkin.fr/public/Solar_platform/.releves_m.jpg" alt="First energy measurements" class="media-center" title="First energy measurements, déc. 2011"></a><br>
Not bad right? Average harvested energy for this 24h period is <strong>244uW for the BQ25504</strong> and <strong>141uW for the fixed load</strong>.<br>
This was during a semi-cloudy / sunny day in mid-december in Switzerland. The board was approximately 3 meters from the window, solar panels facing up, with the axis platform > window > south west :<br></p>
<p><a href="https://www.limpkin.fr/public/Solar_platform/home.JPG" title="Home"><img src="https://www.limpkin.fr/public/Solar_platform/.home_m.jpg" alt="Home" class="media-center" title="Home, déc. 2011"></a><br>
What's next? <strong>Energy measurements through the year</strong>, with a lot of platforms in a lot of different rooms!<strong> Let's see what we can harvest....</strong></p>