This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
proiecte:environment-monitoring [2018/06/07 16:23] cristian.cocioaba [Optimizing power consumption] |
proiecte:environment-monitoring [2018/06/07 16:37] (current) cristian.cocioaba headers |
||
---|---|---|---|
Line 60: | Line 60: | ||
===== Gathering data ===== | ===== Gathering data ===== | ||
- | === Temperature and humidity === | + | ==== Temperature and humidity |
<code cpp> | <code cpp> | ||
Line 79: | Line 79: | ||
</ | </ | ||
- | === Battery === | + | ==== Battery |
<code cpp> | <code cpp> | ||
typedef float sensor_battery_t; | typedef float sensor_battery_t; | ||
Line 85: | Line 85: | ||
===== Usage === | ===== Usage === | ||
- | === Software serial example on Sparrow === | + | ==== Software serial example on Sparrow |
<code cpp> | <code cpp> | ||
#include < | #include < | ||
Line 134: | Line 134: | ||
Although both protocols operate at 2.4 GHz frequency, 802.15.4 is low-speed and low-rate and ATmega128RFA1 has Ultra Low Power consumption as we can see below. | Although both protocols operate at 2.4 GHz frequency, 802.15.4 is low-speed and low-rate and ATmega128RFA1 has Ultra Low Power consumption as we can see below. | ||
- | == ATmega128RFA1 power consumption == | + | === ATmega128RFA1 power consumption === |
{{: | {{: | ||
- | == ESP8266 power consumption when radio is on == | + | === ESP8266 power consumption when radio is on === |
In contrast, ESP8266 has more processing power and together with the power required by the bandwidth and data rate of Wi-Fi, it utilizes almost 10 times more energy, as we can see below. | In contrast, ESP8266 has more processing power and together with the power required by the bandwidth and data rate of Wi-Fi, it utilizes almost 10 times more energy, as we can see below. | ||
Line 184: | Line 185: | ||
This a good improvement over the previous consumption when running continuously, | This a good improvement over the previous consumption when running continuously, | ||
+ | |||
===== Optimizing power consumption ===== | ===== Optimizing power consumption ===== | ||
Line 311: | Line 313: | ||
===== Solar energy harvesting ===== | ===== Solar energy harvesting ===== | ||
- | {{: | + | We used a solar panel with the dimensions of 160x116x2.5(±0.2) mm. This, in theory, should provide a 2.5W power at 5V voltage when the Solar radiation is the most powerful. |
+ | When testing it, we observed that the solar panel was not giving a steady current and voltage, but instead both varied based on how much Solar radiation strikes the panel and the orientation of the panel. This means that it cannot safely charge the LiPo battery. To overcome this problem, we used the TP4056 | ||
+ | |||
+ | We then measured the battery charger output with both the battery and ESP chip connected and got a maximum of 420 mA at 4.12 V, meaning 1.73 W, and an average of around 300 mA at 4.12 V, meaning 1.236 W between 1pm and 6 pm (see below). | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | This will total to **950mAh**, representing **3.9Wh for 14 hours per day**. This represents an approximation of the power gained and stored in the battery, and at the same time running the ESP. | ||
+ | |||
+ | Considering the previous results of ESP power consumption of 2.167mAh at 3.3 V, representing around 0.0072Wh. This means that it will consume around 0.1Wh in the 14 hours of sunlight and 0.072Wh in the remaining 10 hours of night. | ||
+ | |||
+ | Regarding this, the solar panel can store in the battery approximately 3.8Wh in the time of the sunlight. The remaining 3.8Wh should allow the ESP chip to run for about **22 days without recharging**. | ||
===== Results ===== | ===== Results ===== | ||
- | {{: | + | For testing the theoretical results, we measured the voltage of the VCC voltage from the ESP. It was connected to a 3800mAh LiPo battery, which was charged from the solar panel. |
+ | |||
+ | We present in the figure below tree days of measurement, | ||
+ | |||
+ | {{ : | ||
+ | The voltage increases at the first day sunrise, followed by a discharge at night. After that, we encountered a cloudy weather, followed by another sunny day, which kept the battery fully charged. Our test suggests that the theoretical results are correct and that the ESP can run on battery and harvest solar energy. | ||
===== Resources ===== | ===== Resources ===== | ||
- [[https:// | - [[https:// |