Solar solution for weather station

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Solar solution for weather station

Post by lschell »

My next project is a weather station around an ESP32 , capable of measuring / registering temperature, humidity, barometric pressure, wind direction, speed and gusts, rain amount and intensity, UV intensity, general light level, cloud cover % and thunderstorm lightning distance. All in all there will be some 14 sensors (amongst others: DS3231, DHT22, AS3935, BMP180, SI1145, TSL2591, MLX90614) that will provide the input. At regular intervals the data will be sent to an online database but if there’s no internet connection, data will be written to an SD card for later transfer.

The ESP32 could be put to sleep most of the time and be waken up with an interrupt (in case of rain, lightning), but measuring things like average cloud cover and wind speed would need the ESP32 to be awake very frequently, if not constantly.
The aim is to power all this solely by sunlight. The location is very sunny in general but a few times per year it can rain for a couple of days.
My next project is a weather station around an ESP32 , capable of measuring / registering temperature, humidity, barometric pressure, wind direction, speed and gusts, rain amount and intensity, UV, light level, cloud cover % and thunderstorm lightning distance. All in all it will be some 12 sensors that will provide the input. At regular intervals the data will be sent to an online database but if there’s no internet connection, data will be written to an SD card for later transfer.
The ESP32 could be put to sleep most of the time and be waken up with an interrupt (rain, lightning), but measuring things like average cloud cover and wind speed would need the ESP32 to be awake very frequently, if not constantly.
The aim is to power all this solely by sunlight. The location is very sunny in general but a few times per year it can rain for a couple of days.
The microcontroller will be an Adafruit HUZZAH32 – ESP32 Feather Board and for power I am thinking of purchasing:
• Huge 6V 6W Solar panel - 6.0 Watt
• USB / DC / Solar Lithium Ion/Polymer charger - v2
• Lithium Ion Battery Pack - 3.7V 6600mAh
• INA219 High Side DC Current Sensor Breakout - 26V ±3.2A Max

My questions are:
Is this a realistic set-up for my project or would a less powerful panel / battery pack also work?
What is better: 2 solar panels of half capacity facing SE and SW or one panel full capacity facing due south? Or does it not matter?
Can an extra battery be added in parallel later if the capacity would turn out not to be sufficient?
Do you ship those batteries to Europe?
Thanks in advance for your advice!

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Solar solution for weather station

Post by adafruit_support_bill »

Is this a realistic set-up for my project or would a less powerful panel / battery pack also work?
For a remote solar powered system with no mains backup, you really need to design for the worst-case scenario. Too big is better than too small.
What is better: 2 solar panels of half capacity facing SE and SW or one panel full capacity facing due south? Or does it not matter?
For a small, low voltage installation, you are probably better off with one panel. If you have multiple panels that will have different outputs, you will need to add blocking diodes to prevent reverse current flow through the shaded panel. The diode voltage drop will likely more than offset any possible efficiency gain.
Can an extra battery be added in parallel later if the capacity would turn out not to be sufficient?
We do not recommend that. Small variances in the battery characteristics can create larger imbalances during both charge and discharge parts of the cycle. Battery packs like the
6600mAh one in the store are composed of cells from the same production lot that have been precision matched for charge/discharge characteristics. If you find that you need more capacity, it is better to purchase a factory assembled pack with higher capacity.
Do you ship those batteries to Europe?
Shipping regulations for Lithium cells vary by carrier and destination - and are subject to change. If you put them in your cart, there will be a warning at checkout if shipping is not possible to your location. We do have a number of distributors in Europe. Most of them should stock Lithium cells as well.

https://www.adafruit.com/distributors/

User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Re: Solar solution for weather station

Post by lschell »

Hi Bill,

Thank you very much for the answers so far, very helpful indeed, and you remarks regarding the diodes make sense.

I've been looking around the site a little more and I saw this picture: Image. Does that mean I cannot directly feed the Huzzah ESP32 from the Solar Lithium v2 charger but would need e.g. the https://www.adafruit.com/product/2465 in between?

And then how would I use the INA219 to monitor battery level?

Sorry for so many questions!

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Solar solution for weather station

Post by adafruit_support_bill »

Boosting the voltage to 5v is inefficient and not necessary, since the Feather runs on 3.3v. There is a built-in 3.3v regulator on the Feather, so you can just feed the Load output of the charger to the JST battery connector on the Feather.

Monitoring battery level with the INA219 is possible, but probably not the best approach for your project. You would need to integrate the current flow over time to estimate the charge level of the battery. Since the processor would need to be active for that monitoring, your estimate would miss any charge or discharge flow while the processor is sleeping.

A simpler and better solution would be to use one of the dedicated battery 'fuel gauge' chips such as this one from SparkFun: https://www.sparkfun.com/products/10617

User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Re: Solar solution for weather station

Post by lschell »

OK, thanks a lot again. In that case I need to check all sensors because I think one or two are to be fed with 5 V. I'll see if that is the case and try and find an alternative. Or will the ESP32 still output 5 V on the USB pin, even if fed via the JST connector? I can't imagine. ;)

As an alternative to the INA219, your learning manual on the ESP32 mentions that you made available A13 as a battery monitoring pin, measuring half the voltage. Would that still work (even if only at night) or does the USB / DC / Solar Lithium Ion/Polymer charger - v2 ruin this possibility?

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Solar solution for weather station

Post by adafruit_support_bill »

The Feather will not have 5v on the USB pin when it is being powered by battery. Be careful if you are connecting 5v sensors to the Feather. You may need to use a level shifter to prevent damage.

You can monitor the battery voltage directly from the Feather. But be aware that the charge level will not be proportional to the voltage. The discharge curve for a LiPo cell is quite flat for most of the discharge phase - especially at low discharge rates. Below about 3.5v, the cell is nearly drained.

Image

User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Re: Solar solution for weather station

Post by lschell »

OK, clear, yes, I have a level shifter lying around here.

In the testing phase I will need to monitor how long the ESP would run on a charged battery, in the 4 modes: always awake and always Wifi / always awake and Wifi only when sending / using light sleep / using deep sleep, but I suspect the first two options will not be realistic.

I won't be there to check things myself so I need the data to be sent over the internet. I assume it's sufficient to see when the voltage hits below 3.5. First I need to connect everything together and then see how much amperage is used in the different modes, and then see if I can work out theoretically what kind of panel I would need , although depending on the weather and with winter coming, there surely can still be surprises...

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Solar solution for weather station

Post by adafruit_support_bill »

Winter does create additional challenges. In addition to the shorter hours and less intense sunlight, there is the issue of battery performance at low temperatures.
https://batteryuniversity.com/learn/art ... mperatures

User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Re: Solar solution for weather station

Post by lschell »

Yeah, well, the temperature seldom goes below 8C and is usually 15+ even in winter but still, after all this I am now considering moving everything closer to the house so I can use an adapter most of the time...

Oh well, to be continued, and some more thinking to do but thanks a lot so far.

User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Re: Solar solution for weather station

Post by lschell »

In the mean time I remember why I needed the 5 V - I would like to use a couple of neopixel LEDs from a strip as status lights.

So, if mains power would be no option (I am afraid there is no unobstructed place for wind and rain measurements), could this work?
The battery plugs into the ESP32 Feather JST connection and is charged by it. The solar panel goes into the JST plug of https://www.adafruit.com/product/2465 and then the Feather gets its power via the micro USB cable from the Powerboost 1000.

I realize that this is probably not the most efficient and power saving option but at least it would give the 5 V I need for the LEDs.

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Solar solution for weather station

Post by adafruit_support_bill »

The good news is, you don't need 5v for Neopixels. They run perfectly well powered directly from a LiPo. We have dozens of Neopixel projects in the Learning System that are powered directly from LiPo cells: https://learn.adafruit.com/search?q=nepixel%20lipo

One word of caution regarding power though: A Neopixel will still draw about 1mA when idle. If you want to minimize current draw, you will do better with discrete LEDs - assuming you have enough pins to drive them.

User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Re: Solar solution for weather station

Post by lschell »

That's an excellent idea! 1mA when idle, do you mean even when no pixels are on? What if I would use a transistor switched by a GPIO pin and only power the LEDs when needed? Or would in that case the power consumed by resistor and transistor defy its purpose?

One other thing, if I may: what does '•SD-card interface support' (https://www.adafruit.com/product/3405) mean? Do not all Arduino-like microcontrollers support SD cards? In what way is this different?

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Solar solution for weather station

Post by adafruit_support_bill »

Idle means with all LEDs off. It is possible to switch power to the pixels with a transistor. But you would have to be sure to put the Neopixel signal pin into high impedance mode while the pixels are un-powered to avoid damage to the pixel. That would reduce - but not eliminate the idle current draw.

Most microcontrollers can talk to an SD card via the SPI interface. The SDIO protocol for Bluetooth allows a Bluetooth device like the Huzzah to emulate an SD card for wireless data transfer.

User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Re: Solar solution for weather station

Post by lschell »

Ok, thanks again. A lot of studying before I even get started! :)

User avatar
lschell
 
Posts: 40
Joined: Thu Jan 28, 2016 7:47 pm

Re: Solar solution for weather station

Post by lschell »

Today I received the 6W panel, the 6600 mAh battery, the .USB / DC / Solar Lithium Ion/Polymer charger - v2 and some other goodies.
Time to start playing :)

The panel has been charging the battery for some hours and now I would like to measure its voltage. According to http://cuddletech.com/?p=1030 it is done like this:
"The ADC value is a 12-bit number, so the maximum value is 4095 (counting from 0). To convert the ADC integer value to a real voltage you’ll need to divide it by the maximum value of 4095, then double it (note above that Adafruit halves the voltage), then multiply that by the reference voltage of the ESP32 which is 3.3V and then vinally [sic], multiply that again by the ADC Reference Voltage of 1100mV".
The last part, multiplying with 1.1 V, I've never seen before so I am not sure about it. Could you please confirm or deny?

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”