It is a current/voltage sensor based on the texas instruments INA219 current+voltage sensor and the ST7789 TFT display combined with powerful ESP32. It can measure voltage, current and power at the same time.
When the ESP32 boots up it acts as a wifi access point and serves a captive portal webpage on address meter.local
or 192.168.43.1
The live readings are fetched automatically without refreshing the webpage with customizable polling rate!
Displays live data on ST7789 TFT display asynchronously.
The data is logged on the SD card in .CSV
format with timestamps so plotting is easy later. The file is saved as latest.csv
and the previous session files are automaically renamed so they dont get overridden.
Here is a quick look at the pin connection mapping:
INA219 Pin | ESP32 Pin |
---|---|
VCC | 3V3 |
GND | GND |
SCL | GPIO22 |
SDA | GPIO21 |
VIN- | N/C |
VIN+ | N/C |
ST7789 Pin | ESP32 Pin |
---|---|
GND | 3V3 |
VCC | GND |
SCL (SPI) | GPIO22 |
SDA (SPI) | GPIO21 |
RES (Reset) | GPIO4 |
D/C | GPIO2 |
CS | GPIO15 |
BLK | 3V3 |
If your display does not have a CS (Chip Select) pin then you have two options:
-
You have to remove the SD Card circuitary and optionally comment out the SD card code from program. This is because the SPI bus is shared between two devices, SD card and the display. For both of them to work, each must have a seperate CS pin.
OR
-
Modify your display and break out the CS pin. For that, follow my guide.
SD Pin | ESP32 Pin |
---|---|
GND | VIN(5V) |
VCC | GND |
MISO | GPIO19 |
MOSI | GPIO21 |
SCK | GPIO22 |
CS | GPIO13 |