Saturday, 6 January 2018

How to use a TTGO ESP32 module with OLED display and 18650 battery holder

TTGO ESP32 dev module

I got this very complete dev module from Banggood for review.


TTGO ESP32 Development Module

  Features:

  • ESP-WROOM-32 Module
    (=Wifi, Bluetooth, two cores)
  • USB to serial bridge with Silicon Labs CP210X Chip
    (supported by Windows and Linux)
  • Charge Circuit for an 18650 battery (backside of board)
  • OLED display (SSD1306 or compatible) I2C version
  • LED on GPIO16
  • power switch

Notes from my experiments:

IDE

It was no problem getting the module to work with both the Arduino IDE and a generic ESP-32 developmnent environment (as provided by Espressif).
I set up a dedicated virtual machine running Ununtu with VirtualBox under Windows 10.
For the setup I simply followed the instructions provided by Espressif.

OLED

Unlike on other ESP32 boards with OLEDs, the OLED's I2C SDA and SCL pins are connected as follows:

SCL - Pin 4
SDA - Pin 5

It does not require an "enable" signal on GPIO16 as suggested in some programs I found. So comment these out if you see them.


Power requirements

When I didn't have a battery inserted, my powered USB hub apparently could not provide enough power when I activated WiFi and the ESP32's brownout detection triggered.
I haven't investigated that further. Either my USB hub dies not provide enough power, or the board's regulator is too weak to handle the current.

Example Project: Web Radio

As my first project, I ran a very simple web radio firmware on the module. The code was easy to find here on Github. A six minute video of my 5-minute project is available on my Youtube channel here.



4 comments:

  1. Very nice project, good job!

    I wonder if you can redirect the audit to bluetooth, and turn a dumb bluetooth speaker to a full webradio?

    ReplyDelete
    Replies
    1. There is some very basic code for a BT audio source in Espressif's repostory:
      https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/a2dp_source
      I haven't looked at the options to pipe web audio to the a2dp source. (And on to a connected BT-Speaker)

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. hello,

    can the battery voltage be monitored by the esp32?

    ReplyDelete