Cactus

V1.0

🌵 Indoor WiFi-connected temperature and humidity sensor 🍶

power LiPO
wireless WiFi
sensor Humidity
mcu ESP8266
ota? No
battery life 1 month
bom items 36
bom cost USD $26.92
vendors 5
status completed in May 2019

Mechanical sizes

Item Height Width Depth Weight
Name card holder box enclosure 90 mm 55 mm 25 mm
PCB 76 mm 38 mm 2 mm
WeMos D1 Mini V3.0.0 pcb fit 34.2 mm 25.6 mm 2 mm 3 g
WeMos Battery shield pcb fit 34.2 mm 25.6 mm 2 mm
Adafruit Si7021 Breakout Board pcb fit 17.8 mm 15.3 mm 3 mm 1 g
500mAh LiPo pcb fit 36 mm 29 mm 4.75 mm 10.5 g
500mAh LiPo pcb fit 43 mm 25 mm 8 mm
2000mAh LiPo pcb fit 60 mm 36 mm 7 mm 34 g
2000mAh LiPo 80 mm 70 mm 4 mm
2500mAh LiPo 65 mm 51 mm 8 mm 52 g

State Machine

Edit state_machine.md at mermaid js live editor.

State Machine

Power overview

Power source

2000mAh LiPo battery

Battery life

1 month

Charging duration

12 hours
Remove the WeMos Battery shield from the board. Plug in the USB cable to the WeMos battery shield to charge. Red LED will be on while it is charging.Green LED will be on when charging is complete.

Power tree schematic

Edit power_tree_drawio.xml at draw.io.

Power Tree schematic

Power consumption of main components

Chip # Chip Operating Voltage Active mode Modem-sleep mode Deep-sleep mode Total
ESP8266 WiFi based MCU 3.3V 170mA 15mA 10uA
Si7021 Temperature / Humidity sensor 1.9V - 3.6V 150uA 60nA
SN4HC595 Shift register 2V - 6V 60uA 1uA
Total consumption 170.23mA 15mA 11.06uA
Total duration 30s. 10s x 12 = 120s. 4h. 4h.
Total charge 30/14400 * 170.21m
= 0.354 mAs
120/14400 *15m
= 0.125mAs
14250/14400 * 11.06u
= 0.011mAs
0.589mAs

Power calculation

3 power modes:

  1. Wakes up in Active mode for 30 seconds every 4 hours to read the sensor value and ping to cloud
  2. Wakes up in Mode-sleep mode for 10 seconds every 20 minutes to check whether the counter has reached the threshold
  3. Deep-sleep mode for the rest of the time, unless user button pressed

1200mAh battery will last for (1200/24/30) = 2.89 months

Measuring power

Mode Pins Voltage
Deep sleep 5V - GND on WeMos D1 mini 4.94V
Deep sleep Vin - GND on Si7021 breakout board 5V
Deep sleep Vcc - GND on 74HC595 chip 5V
Deep sleep EN - GND on 74HC595 chip

Actual vs. calculated power

Periodic wakeup Calculated Actual Error %
6 hours 2.89 months 30 days ~300% ⁉️