Battery Powered ESP IoT

by 陳亮 in Circuits > Wireless

29671 Views, 63 Favorites, 0 Comments

Battery Powered ESP IoT

IMG_9648.jpg
IMG_9274.jpg
ESP decouple USB design prototype

This instructables show how to make a Battery Powered ESP IoT base on the design in my previous instructables.

Power Saving Design

serial_decouple_ESP32_LCD_bb.png

Power consumption is a big concern for a battery powered IoT device. In order to total eliminate the long term power consumption (few mA) from the unnecessary component while running, this design decouple all those parts and shift to a development dock.

Development Dock

It consists:

  1. USB to TTL chip
  2. RTS/DTR to EN/FLASH signal converting circuit
  3. Lipo charger module

The development dock only be required while development and always connecting to the computer, so size and portable is not a big concern. I would like to use a more fancy method to make it.

IoT Device

It consists:

  1. ESP32 module
  2. Lipo battery
  3. 3v3 LDO circuit
  4. Power switch (optional)
  5. LCD module (optional)
  6. LCD power control circuit (optional)
  7. button for wake up from deep sleep (optional)
  8. other sensors (optional)

The second concern for a battery powered IoT device is compact in size and sometimes also concern portability, so I will try to use smaller components (SMD) to make. At the same time, I will add a LCD to make it more fancy. The LCD also can demonstrate how to cut the power consumption while deep sleep.

Preparation

IMG_9254.jpg
IMG_9257.jpg
IMG_9329.jpg
IMG_9328.jpg
IMG_9332.jpg
IMG_9336.jpg
IMG_9408.jpg
IMG_9335.jpg

Development Dock

  • USB to TTL module (broken out RTS and DTR pins)
  • Small pieces of acrylic board
  • 6 pins male header
  • 7 pins round male header
  • 2 NPN transistors (I am using S8050 this time)
  • 2 resistors (~12-20k should be ok)
  • Lipo Charger module
  • Some breadboard wires

IoT Device

  • 7 pins round female header
  • ESP32 module
  • 3v3 LDO regulator (I am using HT7333A this time)
  • SMD capacitors for power stability (It depends on the device peak current, I am using 1 x 10 uF and 3 x 100 uF this time)
  • Power switch
  • ESP32_TFT_Library supported LCD (I am using JLX320-00202 this time)
  • SMD PNP transistor (I am using S8550 this time)
  • SMD resistors ( 2 x 10 K Ohm)
  • Lipo battery (I am using 303040 500 mAh this time)
  • Push button for trigger wake up
  • Some copper tapes
  • Some coated copper wires

RTS & DTR Break Out

IMG_8742.jpg
IMG_9651.jpg
IMG_9640.jpg
IMG_9641.jpg
IMG_9475.jpg

Most USB to TTL module that support Arduino have DTR pin. However, there are not too much modules broken out RTS pin.

There are 2 ways to make it:

  • Buy a USB to TTL modules with RTS and DTR break out pins
  • If you fulfill all the following criteria, you can break out RTS pin yourself, in most chips, RTS is pin 2 (you should double confirm with your datasheet).
    1. you already have a 6 pins USB to TTL module (for Arduino)
    2. the chip is in SOP but not QFN form factor
    3. you really trust you own soldering skill (I have blow away 2 modules before success)

Development Dock Assembly

serial_decouple_ESP32_LCD_dev_dock_bb.png
IMG_9255.jpg
IMG_9256.jpg
IMG_9262.jpg
IMG_9263.jpg
IMG_9265.jpg
IMG_9266.jpg
IMG_9267.jpg
IMG_9268.jpg
IMG_9273.jpg
IMG_9271.jpg

Building a visualizable circuit is a subjective art, you may find more detail in my previous instructables.

Here are the summary of the connection:

TTL pin 1 (5V)  -> Dock pin 1 (Vcc)
                -> Lipo Charger module Vcc pin
TTL pin 2 (GND) -> Dock pin 2 (GND)
                -> Lipo Charger module GND pin
TTL pin 3 (Rx)  -> Dock pin 3 (Tx)
TTL pin 4 (Tx)  -> Dock pin 4 (Rx)
TTL pin 5 (RTS) -> NPN transistor 1 Emitter
                -> 15 K Ohm resistor -> NPN transistor 2 Base
TTL pin 6 (DTR) -> NPN transistor 2 Emitter
                -> 15 K Ohm resistor -> NPN transistor 1 Base

NPN transistor 1 Collector -> Dock pin 5 (Program)
NPN transistor 2 Collector -> Dock pin 6 (RST)

Lipo Charger module BAT pin -> Dock pin 7 (Battery +ve)

Optional: Breadboard Prototyping

serial_decouple_ESP32_LCD_IoT_Device_bb.png
IMG_8743.jpg
IMG_8744.jpg
IMG_8879.jpg

The soldering work in IoT device part is a little bit difficult, but it is not essential. Base on the same circuit design, you can simply use a breadboard and some wire to do your prototype.

Attached photo is my prototype test with Arduino Blink test.

IoT Device Assembly

IMG_9327.jpg
IMG_9330.jpg
IMG_9331.jpg
IMG_9333.jpg
IMG_9334.jpg
IMG_9337.jpg
IMG_9339.jpg
IMG_9409.jpg
IMG_9410.jpg
IMG_9494.jpg

For compact size, I choose many SMD components. You can simply switch them to breadboard friendly components for easy prototyping.

Here are the summary of the connection:

Dock pin 1 (Vcc)         -> Power switch -> Lipo +ve
                         -> 3v3 LDO Regulator Vin
Dock pin 2 (GND)         -> Lipo -ve
                         -> 3v3 LDO Regulator GND
                         -> capacitor(s) -ve
                         -> ESP32 GND
Dock pin 3 (Tx)          -> ESP32 GPIO 1 (Tx)
Dock pin 4 (Rx)          -> ESP32 GPIO 3 (Rx)
Dock pin 5 (Program)     -> ESP32 GPIO 0
Dock pin 6 (RST)         -> ESP32 ChipPU (EN)
Dock pin 7 (Battery +ve) -> Lipo +ve

3v3 LDO Regulator Vout -> ESP32 Vcc
                       -> 10 K Ohm resistor -> ESP32 ChipPU (EN)
                       -> PNP transistor Emittor

ESP32 GPIO 14 -> 10 K Ohm resistor -> PNP transistor Base
ESP32 GPIO 12 -> Wake button -> GND
ESP32 GPIO 23 -> LCD MOSI
ESP32 GPIO 19 -> LCD MISO
ESP32 GPIO 18 -> LCD CLK
ESP32 GPIO 5  -> LCD CS
ESP32 GPIO 17 -> LCD RST
ESP32 GPIO 16 -> LCD D/C

PNP transistor Collector -> LCD Vcc
                         -> LED

Power Usage

Battery powered ESP32 power usage
IMG_9632.jpg
IMG_9634.jpg
IMG_9636.jpg
IMG_9637.jpg

What is the actual power usage of this IoT device? Let's measure with my power meter.

  • All components on (CPU, WiFi, LCD), it can use around 140 - 180 mA
  • Turned off WiFi, continue display photo in LCD, it use around 70 - 80 mA
  • Turned off LCD, ESP32 goes deep sleep, it use around 0.00 - 0.10 mA

Happy Developing!

IMG_9338.jpg

It's time to develop your own Battery Powered IoT device!

If you can't wait coding, you may try compile and flash my previous project source:

https://github.com/moononournation/ESP32_BiJin_ToK...

Or if you want to taste the power down feature, try my next project source:

https://github.com/moononournation/ESP32_Photo_Alb...

What's Next?

Screenshot (43).png

As mentioned at previous step, my next project is an ESP32 Photo Album. It can download new photos if connected WiFi and save to the flash, so that I can always view the new photo on the road.

Optional: 3D Printed Case

IMG_9467.jpg
Battery powered IoT Device 3D printed case assembly
IMG_9685.jpg

If you have a 3D printer, you may print the case for your IoT device. Or you may put it in a transparent sweet box just like my previous project.