Close
0%
0%

ESP32 3-Channel Power Logger

Power logger based on the INA3221 chip with TFT Display, SD card and battery (charging and monitoring) support

Public Chat
Similar projects worth following
Were you ever working on a battery or solar powered project and wanted to know exactly how much current your prototype was using?

The easiest way to measure is to use one of the INA219 or INA3221 modules which can be found for cheap. Unfortunately the modules are flawed and often require modifications in order to work as intended.

This is why i have decided to design and create my own power logger which has way more features than any commercial product. On top of that it is fun and easy to build.

Here are some of the hardware features:

- 3 channel monitoring, with one of the channels having a "USB C to USB A" power monitor (for monitoring a usb device charging for example)

- ESP32 C3 Mini powered, makes it easy to program and interface with

- USB C interface for programming and power

- Micro SD card support for saving logging data (useful for solar power monitoring projects for example)

- Battey support. Contains all necessary components for safe operation on 3.7V battery (overcurrent, over/under charge, LDO for 3.3V). 

- TFT Display and buttons for programable interface. This allows the device to be used without needing a serial connection to a laptop in order to read values.

I am writing the software myself in ArduinoIDE and although the final version is not ready yet. here are some of the software features i'd like it to have:

- Easy to use menu to enable/disable channels, set sampling rates, etc.

- The possibility to use 2 channels together to monitor efficiency of devices (for example monitor the input and output of a 5v boost converter)

- Record accurate date/time and values to a microSD card for later review

- Monitor battery level of the power logger itself and alert when low (maybe send an email or MQTT notification)

- Monitor voltage and current levels on any of the 3 channels and send notifications

- Display a bar graph instead of instant values for the past 1/5/15 min

plain - 9.42 kB - 12/20/2022 at 07:52

Download

ESP32_Power_Meter_SMD_V2.1.rar

Arduino IDE code V2.1 Known bugs: - If you hook the wires in reverse, negative values will be displayed of the screen (which are not aligned properly) - If you monitor a battery and charge it 100mAh and then discharge 100mAh, the calculated energy transfer will be 0

RAR Archive - 15.07 kB - 10/02/2022 at 13:56

Download

BOM_PCB_Power Logger SMD.csv

Power Logger EasyEDA BOM V1

Comma-Separated Values - 7.14 kB - 09/28/2022 at 18:58

Download

PCB_Power Logger SMD.json

Power Logger EasyEDA PCB File V1

JavaScript Object Notation (JSON) - 1.04 MB - 09/28/2022 at 18:18

Download

SCH_Power Logger SMD.json

Power Logger EasyEDA Schematic File V1

JavaScript Object Notation (JSON) - 191.07 kB - 09/28/2022 at 18:16

Download

View all 6 files

  • 31 × SMD Resistors Various values
  • 10 × SMD Capacitors Various values
  • 6 × SMD LEDs Various colors
  • 2 × USB-C Female Connector
  • 1 × USB-A Female Connector

View all 15 components

View all 4 project logs

  • 1
    Download and install EasyEDA software

    Use the provided schematic and PCB files and import them in EasyEDA

  • 2
    Make any changes if needed

    If you'd like to add your own features you could rewire the pins of the ESP32

  • 3
    Order PCB and components

    Now is the time to decide if you want to order the PCB with the components already soldered to it.

View all 10 instructions

Enjoy this project?

Share

Discussions

Ofir wrote 8 小時前 point

Hi,

I built the project and it works great! thank you for sharing the design.

I was able to find one issue, If I understand the design correctly you can connect a power source to channel 3 USB C connector and a load to the other channel 3 USB connector but this doesn't seem to work, I think you forgot to connect the - pins of the USB C connector to the ground plane, once I connected them it started working.

thanks again for the great design!

  Are you sure? yes | no

artdanion wrote 6 天前 point

Hi, Thank you for This project, I build one and i like it a lot.

btw.  ported your code to a platformio project and included a link to this hackaday article in the readme...

artdanion/PowerLogger: ESP32 INA3221 Powerlogger (github.com)

  Are you sure? yes | no

Andrea Milocco wrote 01/13/2023 at 15:15 point

Hi Ovidiu, I need your suggestion. I've found this ESP32-C3-MINI-1-N4 (85 °C version) instead of H4 (105 °C version) from LCSC. Temperature seems to be the only difference. Do you think the 85 °C version could work as well?

  Are you sure? yes | no

Ovidiu wrote 01/13/2023 at 15:27 point

Hello, as far as i remember the only reason i chose the first one was because of the small price difference. So i believe both will work just fine. 

If you want to be extra sure just compare the footprint size and pin locations for both versions.

  Are you sure? yes | no

Andrea Milocco wrote 01/13/2023 at 16:08 point

Thank you for your suggestion, I'm going to carefully compare both versions!

  Are you sure? yes | no

Andrea Milocco wrote 01/08/2023 at 13:12 point

Hi, I have a question about the PCB: I think it should be better to use spoke pads for GND for better solderability but you didn't, is there a reason for this?

  Are you sure? yes | no

Ovidiu wrote 01/08/2023 at 14:07 point

Hello. Yes there is a reason, i am a beginner and didn't know that 😁

  Are you sure? yes | no

Andrea Milocco wrote 01/08/2023 at 14:13 point

this is a good reason :) , but you did an impressive design for a beginner! well done.

  Are you sure? yes | no

Robin wrote 01/06/2023 at 11:36 point

I might be missing something but isn't this schematic lacking a power path switch for the battery? The TP4056 module output shall not be connected to the load because that will bypass CC charging detection according to this analysis: https://www.best-microcontroller-projects.com/tp4056.html

  Are you sure? yes | no

Ovidiu wrote 01/08/2023 at 14:08 point

Yes you are right, most of the time i use it without a battery anyway.

  Are you sure? yes | no

jbezza123 wrote 01/04/2023 at 03:41 point

think i fixed the bugs but will have to check it out as i don't have one, 
http://alphaomega.rf.gd/files/ESP32_Power_Meter_SMD_V2.1.ino

  Are you sure? yes | no

Miklos Vagosr wrote 12/22/2022 at 09:29 point

Would you attach the compiled .bin file?

  Are you sure? yes | no

Per Jensen wrote 12/20/2022 at 19:47 point

For the love of god, fix that typo in the silkscreen "LOGER" :)

  Are you sure? yes | no

Ovidiu wrote 09/28/2022 at 18:22 point

Hello!

Please feel free to download, modify and reproduce this project. 

If you don't mind please send some love when you are using my files

  Are you sure? yes | no

Miklos Vagosr wrote 12/19/2022 at 22:29 point

Would you attach the INA3221.h file?

  Are you sure? yes | no

Ovidiu wrote 12/20/2022 at 07:53 point

I just did. You can just download the library from the library manager and that would be a lot easier

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates