Let's start from the beginning. I live in an apartment that faces south and west so I can get reliable temperature measurements from a standard thermometer (you know, such thing on your window with a little bit of colored ethanol inside) only till 1-2 PM. That's why I decided to start this project.
The initial idea was to keep it simple and cheap. Components:
- ATmega328P microcontroller
- RFM69 transceiver
- HTU21 temperature and humidity sensor
- 1F 5.5V supercapacitor
- Some solar panel
The ATmega328P microcontroller in a deep sleep consumes tiny amount of energy ~4uA, but to operate at the lowest voltage (1.8V) 4MHz oscillator should be used.
The next thing to check is the voltage range of the used components:
- Supercapacitor: 0 - 5.5V
- MCU: 1.8 - 5.5V
- Sensor1: 2.1 - 3.6V
- Sensor2: 1.5 - 3.6V
- Sensor3: 1.5 - 5V
- RF transmitter: 1.8 - 3.6V
- Solar panel 0 - 5.5V
The easiest way was to use a low-drop voltage regulator and get a stable supply voltage (3.3V) for all components. But after a bit of testing I found out, that when the voltage drops below ~3.3V LDO becomes inefficient and consumes an additional 20uA (or even more) that's drain supercap too quickly.
An alternative solution will be charging supercapacitor to 3.6V max and do not use any voltage regulators. It's much more efficient and in such a configuration I achieved 42 hours of work from a 1F supercap.
Saying this I should highlight, that the node sends data every minute when the voltage above 2.7V, and every 3 minutes in other case.
At this stage, two additional problems should be solved:
- Overvoltage protection
- Undervoltage protection
I have a bunch of different solar panels, the smallest one, which I plan to use in this project, at the direct sunlight produces 5.5V without the load and can produce more than required 3.6V with the load, so it should be limited somehow.
I always try to use the easiest solution, but usually, it doesn't work =D. In this case, the easiest option was to use a zener diode, but to work properly zener diode requires some amount of current through it (this can be around 5 to 10 mA), and if this requirement is violated it works non-linearly. For my project, 5mA (continuously) is a huge amount of energy. In most cases, the solar panel won't produce more than 0.5 - 1mA, as I don't expect to see the direct sunlight on the node (for obvious reason, it is a thermometer).
By now, I've already had a circuit for the undervoltage protection based on a voltage comparator, so decided to use a similar approach here. The image below shows the base schematic and LTspice simulation results.
The circuit isn't perfect. When the supercapacitor is discharged and the solar panel produces 5V, it'll continuously switch on/off charging at the point near 0.9V. I'm not sure that this is a significant disadvantage, it almost like MPPT (except that it won't be the max point). I'll test it in real-life to see how it works or does it work at all.
At some stage of the supercapacitor discharge, we will face the situation when the voltage is too low (<1.8V) and the node should be shut down. ATmega328P includes built-in brown-out detection (BOD) that keeps MCU in the reset state when the voltage is less than some threshold, but it has a price.
Let's imagine a situation: a supercapacitor is fully discharged, a solar panel produces 5V 1mA. Everything is okay at first glance, the solar panel should slowly charge the supercap, and when it reaches 1.8V BOD turns the MCU on. Spoiler alert: it won't work! In the reset state, the MCU consumes an unstated amount of current (3-5mA according to my experiments) and it'll eat all available energy preventing the supercapacitor from charging. That's why external low-power undervoltage protection is required.
The green line is a supply voltage, read one is a voltage on the load.
In both circuits, I'm going to use a different voltage comparator with better parameters and lower power consumption, but it isn't available in LTspice.
I've ordered PCBs and required components, but they haven't arrived yet. All those things should work in theory, but will they? A separate question is: what will be the final power consumption with all those additional components? Will see :)
If you see grammatical or structural mistakes, please PM me.