石榴姐

USB voltage and current meter ESP32+INA226

 
Overview

Introduction

A portable mini USB voltage and current meter based on ESP32-Pico-D4 and INA226, which can be connected to other interfaces through USB Type-C.

Working voltage 5~28V, current 0~5A.

The program is developed based on Arduino using PlatformIO, and the programming level is very low.

 

The actual measured 12V 5A 10min is no problem (the small load in my dormitory cannot support it QAQ)

The theoretical limit supports 32V 6A. In actual use, it is recommended not to exceed 28V 5A.

 

 

Hardware features

  • Based on the ESP32-Pico-D4 chip, SiP package, internally integrated crystal oscillator, flash, etc., requiring only minimal external circuit support.
  • 0.96-inch LCD, no need to worry about screen burn-in for long-term monitoring.
  • INA226 monitors bus voltage and current.
  • The two USB2.0 16Pin Type-C interfaces are all connected. It has been tested that the USB2.0 communication is normal and the PD is normal.
  • FUSB302BMPX is provided, which can perform PD2.0 deception and PD gear detection.
  • Provides 2.4GHz Wi-Fi and BLE support.

 

Software function implementation and planning  (as of 2021/8/30)

Implemented functionality

  • Voltage and current detection
  • Power statistics
  • There is a problem with the current firmware of D+ and D- voltage detection   , which needs to be solved.

 

Planning function  gugugu

  • Load current calibration based on current direction
  • No-load current zero point calibration
  • Fast charging protocol detection and fast charging deception
  • PD detection and PD deception
  • BLE host computer communication
  • PC wirelessly collects voltage and current information through LAN

For more ideas, please leave a message for discussion~

 

Current version of firmware: https://gitee.com/inknoid/Power-Meter-Ver_ESP32

    Known issues with the current version:

         It will affect the protocol identification of some devices. What is currently found is mainly the protocol identification of some power banks.

    Temporary fix:

        Comment the GPIO definition code and voltage detection code of D+ and D-.

 

Sorry, due to personal academic reasons, I don’t have time to perfect the program. Currently, only basic functional programs are available.

Known issues will be fixed in the fully functional version.

 

Iteration information

2021/08/29 Engineering open source

2021/08/30 PCB updated to version 2.1.2: Except for the LDO input filter capacitor which is still 0603, all capacitors and resistors are packaged in 0402.

2021/09/03 Provide a current channel windowed version of PCB, which provides better temperature rise performance under high current and fine-tunes high current routing.

2021/11/16 I used my spare time to modify a version of one male and one female interface based on the original version. I don’t have time to verify it yet, so I will release the PCB and schematic diagram first.

                     Change as follows: LDO SE8550 -> MP2451 (It was noticed that the LDO heated seriously under higher voltage, so it was replaced)

                                       0.96 inch TFT-LCD ST7735s -> 1.14 inch TFT-LCD ST7789

                                       LDO ME6211C33R5G -> LDO ME6211C33M5G

 

Development records and a few random thoughts (updated by chance)

        This small project has been around for a while now. I am quite busy with my studies. The project was built in May and has only completed the basic functions now. The rest is mainly software. If there are no major bugs , the hardware will not do anything. edited.

 

  • Hardware design brief thoughts

       At present, the PCB of this project has been iterated to 2.1.2 . The engineering verification board in the picture is 2.1.1 . 2.1.2 is a slightly optimized version of 2.1.1 . It mainly replaces the main resistors and capacitors with 0402 packages and optimizes a small amount of wiring. , the rest is completely consistent with 2.1.1 , there is no separate board verification.

        I was greedy when designing this, and wanted to make a very compact board with many functions. Because I was lazy, I prepared a single board to implement it, and the screen was not on another PCB. Considering that it supports both 2.4G Wi-Fi and BLE and requires very few external components, the ESP32-Pico-D4 is packaged in SiP. The ESP32 itself is also a chip that I like to use (it’s cheap and has many functions), so I made the initial selection. I considered ESP32-Pico-V3, but considering it was relatively expensive and the supply was not that abundant, I finally chose Pico-D4.

        At the beginning, I made many versions of PCB, but I was not very satisfied with them. In the early stage, I mainly used 2-layer boards. Considering the complexity of wiring, I also prepared a separate PCB for the screen (similar to the solution of Sakura Boss), but I was not satisfied with it. In the end, I made a 4-layer version.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-20 03:58:51
  • Many 485 chips are broken, please help
  • TLC0831C-I, TLC0832C-I.
  • How to measure the noise floor of an oscilloscope
  • Weekly highlights: 2017.1.16-2017.1.22
  • Suggestions on layout
  • LSM6DSM failed to set WAKE_UP_SRC register

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号