Monday, 21 March 2016

The Solar Experiments

After my first HAB launch, due to all the excitement, ideas what to do next were coming to me all at once. One very interesting to me was doing a pico flight. Light weight payload, custom or Qualatex balloon and having it all float around the world for several days, hopefully weeks. That meant a different approach to supplying power to the tracker and thus about a year ago, while still working on TT7-40, I ordered a bunch of solar cells from Ebay and started experimenting.
The cells I got are polycrystalline and come in a variety of sizes. Mine are 52x26mm and are advertised as to output 0.5V open circuit voltage and 0.43A short current in direct sunlight. I usually measured about 0.6V per cell and thus 1.2V for two cells and about 2.4V for four cells. These were the panel sizes I generally worked with.
I started with simple setups just measuring loaded current and voltage. Here it is a 1.2V Eneloop rechargeable battery with a diode in series to cut off the current going back to the solar panel when it wasn't lit.
The same setup in full sunlight measuring 230mA charging current.
As the next step, I tried connecting a MCP1640 step-up converter, as used on TT7-40, to the cells to boost the voltage to a stable level. The problem with this solution is that a simple converter like this requires a sufficient level of power on the input or the voltage collapses which limits its usability to cloudless skies with direct sunlight.
The current output after boosting the panel's voltage from 2.4V to 3.15V.
That issue led me to search for a dedicated solar harvesting converter. LTC3105 (on the left) is capable of working off of voltages as low as 225mV and implements MPPC (maximum power point control) to accommodate the output current to the changing solar irradiance while maintaining the same output voltage.
Initially, I set the circuit up on a breadboard.
However, it constantly had trouble performing up to the degree the datasheet stated is achievable. Even with 4 solar cells and direct sunlight the unit kept outputting very little current.
Eventually, I concluded that the circuit is too sensitive to precise values and quality of external components to be set up on a breadboard with all it's additional resistances, inductances and capacitances. I then decided to design a dedicated PCB. Since all of this was a preparation for my future tracker, I added TPS63031 boost converter to create a complete power supply solution that would output 3.3V.
These are the boards I ordered from DirtyPCBs as usual. There is a possibility to change between 90k and 180k resistance on the MPPC pin of the LTC3105 using a jumper to adjust the voltage reference for operating off of 2 or 4 solar cells (or simply solder on a different resistor). I also equipped the boards with jumpers to disconnect both LTC3105 or TPS63031 from the battery so I can test or use them separately. One issue I did not notice while designing the boards was that I didn't enable the TPS63031's power save mode. This meant that the boost converter consumed about 3mA without load. That is a little unfortunate, because it limits its usability as a stand-alone system. The tracker version has the power save mode enabled.
The LTC's output is set to 4.2V to be able to charge a LiPo battery. Here it is connected to an ATmega328P powered data logger that I put together to get some longer-term data of its performance.
This was an initial version that besides the ATmega used an 8MB SPI flash memory (W25Q64BV) and a logic converter to communicate with an Arduino Mega that then transmitted the data to a PC.
I wanted the logger to measure the charging current as well, but I ran into trouble achieving that. The circuit ran 3.3V logic that resulted in 3.2mV resolution of the ATmega's ADC which wasn't sufficient for small currents. I then tried to amplify the voltage drop across a shunt resistor with a variety of amplifiers, but probably because of my inexperience in this area the results weren't satisfactory.
INA219 current sensor came to me as an ideal solution, however, none of the three modules I received from Ebay worked. I suspect that I might have damaged the first one with my clumsy soldering, but that made me extra careful the next time and for the third attempt I didn't even solder the pins to eliminate the possibility of an error on my side. I simply connected 5V (which was within specs) to VCC and ground to GND and the chip immediately burned out both times. That quite baffled me and I still don't know whether to suspect the seller from selling a damaged series or whether despite all the precautions I screwed something up. In any case, I gave up on INA219 and tried to get a better resolution by using ATmega's internal 1.1V reference instead. That immediately brought me to another problem. A virtually identical script that utilized the internal reference ran nicely on an Arduino Nano, however, refused to work on my breadboard ATmega (both being ATmega328P). The ADC worked fine when referenced to the supply voltage, but the internal reference output only zeroes.
After declaring the particular internal reference dead, I finally received an Arduino Pro Mini and a 3.3V compatible USB to TTL converter. That allowed me to simplify the logger and make pulling the data out much easier.
The final Data Logger version runs at 3.3V off of the Arduino's regulator. It is programmed and communicated with using the 3.3V compatible USB to TTL converter. At startup it waits for 5 seconds for a command to enter a communication mode or else it continues to normal data logging. In the communication mode it allows the user to choose between logging every 0.25s or 8s. I wanted to have a high frequency mode and one for long-term operation. The settings are saved in ATmega's EEPROM just like the address of the last data logged to the flash memory so the logger can resume logging after power down without erasing the flash.
The logger implements a power down mode in between individual logs to minimize consumption. To push the current consumption even lower I removed the power LED on the Arduino (about 1.5mA reduction in consumption). To reduce the consumption even further, there is the possibility of removing the Arduino's regulator. I didn't do this because I needed stable 3.3V for the flash memory and even with the regulator the consumption goes down to about 50uA in power down mode (as far as my lousy multimeter can tell).
This particular implementation logs voltage of the solar cells and voltage of the LTC3105's output (which connects to a battery when charging). The third ADC measures the voltage drop across a 1 ohm shunt resistor on the low side of the battery thus allowing to compute the current flowing into the battery. All ADC conversions are referenced to the internal 1.1V which means it is capable of measuring the current with 1mA resolution. The voltages from the solar panel and LTC are divided by two pairs of resistors. The logger saves the values in raw format leaving the conversion to after the data being downloaded to a PC. I set up the flash to expect 4 channels of data so having one spare, I connected a DS18B20 temperature sensor to the whole thing as well. The flash memory is 8MB, the ADC readings are 16bit each and having 4 channels results in 1.000.000 samples capacity. I'd like to provide more information about actual power consumption but I am not in possession of any proper multimeter. The power down consumption was measured to be 56uA, however, I can only estimate the active consumption to about 3-4mA, because the power on time is too short for my multimeter to give any sensible readings. I also estimated the active time to about 18ms with 8s logging interval and 14.4ms with 0.25s interval on average, but when I took the overall time I let the logger run and divided it with the number of samples on the flash, I arrived at 358.8ms and 30.6ms respectively. It's hard to analyze it any better without probing it properly.
This is a two day log of charging a 330mAh LiPo battery in sunny weather by 4 solar cells. The left axis is in millivolts and belongs to the BLUE line (solar panel voltage), RED line (LTC3105 output with a connected LiPo battery) and GREEN line (charge current - voltage drop across a 1 ohm resistor thus the axis shows milliamps in this case as well). The right axis is in °C * 1000 (because of Excel taking forever to display that many floating point values) while the PURPLE line shows temperature. I didn't shield the temperature sensor from direct sunlight so the readings get affected by that, but the night time data should be accurate. Also, I didn't do any calibration so the conversion of ADC readings to actual voltage uses voltage divider coefficients as calculated not as measured.
This is the charge current (mA) alone for better distinctness. As can be seen the LTC3105 on a PCB finally performs as it should.
This is about an hour and a half of data sampled every 250ms with the LTC's output connected directly to the shunt resistor (no battery to charge). It was taken in sunny weather during morning so the voltage on the solar cells stabilizes a little later.
In this case, I set the MPPC resistance to 90k ohms which according to the datasheet is adequate for two solar cells (I was using four). The current without load (other than the 1 ohm shunt) eventually stabilized around 180mA.
The same conditions on the same day. Only this time I set the MPPC resistance to 180k. This should be the proper setting for four solar cells, however, the resultant current fluctuates around 150mA only. I guess the MPPC setting is aimed at worse weather conditions.
This time with added discharged battery and a 90k setting. Charging current of about 100mA is what I was looking for and should be more than enough for a HAB application.
All the four previous data sets were taken in succession during one day with stable sunshine. This last one suffers a little from the late hours and the fact that I didn't discharge the LiPo as I had done in the previous case. That meant that the battery was already in the lower current part of the charging cycle. This was again the 180k MPPC setting.
This is an example of charging the same 330mAh LiPo in cloudy conditions with occasional sunshine (mainly on the third day). All three days contributed somewhat as can be seen from the voltage curve.
I am a little confused by the low levels of current in comparison to the high voltage rise on the first day. I understand that the LiPo battery initially builds up the voltage during the charging cycle, but I would expect that happening with more current than recorded.

To conclude, I consider this power supply solution adequate for my upcoming tracker. Hopefully, the TPS63031's power save mode will reduce the standby current to reasonable levels. I intend to do more tests with only two solar cells (or different sizes) so the tracker doesn't have to carry all four.

For anyone interested, here are the EAGLE files of the LTC3105 and TPS63031 PCB:
LTC3105 v1.0.brd
LTC3105 v1.0.sch
and here is the Solar Logger script:


  1. It's cool! Finally I found your project using LTC3105. It helped me a lot. Thank you!
    I had to study the work of 3105 more to customize the MPPC. It turned out that when the lighting poor, 3015 works cyclically, adding in the battery charge current pulses.
    You can found the 3105 work waveforms here

  2. Interesting. If I understand your findings correctly, at low solar irradiation LTC3105 produces only short pulses. That would explain why I measured increasing voltage at the battery with very little current in my last example. The way I measured it simply couldn't detect such short pulses. Good job!

  3. regaring the MCP1640, I have had the same experiance with those inductor based boost regulators, that they require high, about 300-400mA startup curent, one easy way to get around this problem is to tie the enable pin to gnd via a ca 100k resitor and then put 2 or 3 diodes in series from vin (to be subistituded with suitable zener) enabling the regulator when there is enought voltage/current from the panels, my regulator just smothly rices in current when the volatge rising getting over the voltage threshold set by the diodes/zener. I´m using the tlv61225, its just the same as the mcp1640 just pre set to 3,3v so no resistor needed for the v out setting.

  4. That's a useful tip, Mike. Thanks.