OzxbuW4F

Bluetooth power meter

 
Overview
Project Description:
  When debugging equipment with sudden load changes, such as motors, it's necessary to monitor voltage, current, and power variations to prevent undervoltage protection due to power fluctuations or overcurrent protection due to excessive instantaneous current. This requires a power meter with a sufficiently high sampling frequency that can graphically display parameter changes. The final solution uses the CH9140 Bluetooth serial port pass-through module for data transmission. Firstly, it allows the use of various serial port assistants as a host computer, flexibly utilizing their plotting, saving, and even other scripting functions. Secondly, Bluetooth transmission completely isolates the high-power power supply from the computer, ensuring the computer won't explode due to load failure (the downside is that the Bluetooth signal seems weak; a different wireless module may be considered later).
Open Source License:
  This project is open source under the CC BY-SA 4.0 license. Reproduction is permitted, but please indicate the original link and author; commercial use is permitted, but please indicate the original link and author; if you modify and distribute this project (open source), please use the same open source license.
Project-related functions
: Voltage range: 5-30V (cannot be too low because the LDO output voltage will be inaccurate); Voltage
resolution: 0.1V
; Current range
: 0-20A; Current resolution: 0.1A; Sampling frequency:
4kHz (then averaged eight times);
Refresh rate: 500Hz.
Project attributes:
This project is being publicly disclosed for the first time and is my original work. This project has not won any awards in other competitions.
Project progress :
The project completion rate has reached my expectations (roughly displaying voltage, current, and power).
Serial port current control was designed, but I don't know how to use it .
Due to the hardware limitation of BLE_SER_A_ANT, only a baud rate of 115200Hz can be used.
I cannot use Bluetooth serial port for wireless download; I don't know why.
Design principle:
    The current-sensing op-amp amplifies the differential signal of the voltage drop across the current-sensing resistor to a suitable voltage range that the microcontroller's ADC can read;
  the voltage is divided by a resistor and then followed by a unity-gain stable op-amp for impedance transformation.
  The above two signals are converted into digital signals by the ADC, and then linear fitting is performed to reconstruct the voltage and current signals.
  There is a low-pass filter with a cutoff frequency of approximately 1kHz at the input port of the microcontroller's ADC. Although the sampling rate is set to 4kHz, it is used for oversampling before software averaging and filtering, so the final data refresh rate (transmission rate) is still 500Hz. For
the ADC input RC filter resistor values, I referred to this table and approximately configured the ADC as shown in the red box, with an external resistor value of 10K.
In terms of software
, I configured the timer to 4kHz to trigger ADC sampling.
  There's not much else to say, just ADC sampling, averaging filtering, and serial transmission.
Since I don't use Keil for STM32 program development, please refer to my column for VSCode environment setup:
[A Brief Discussion on Developing STM32 HAL Library Using VSCode + EIDE Plugin + CubeMX - Bilibili]
Design Notes :
  The version using the BLE_SER_A_ANT module can only transmit at a fixed baud rate of 115200; this is a hardware design issue with WCH. This resulted in 1.2ms taking up time to send just 14 characters, forcing me to adjust the update rate to 500Hz.
There was also packet loss during serial transmission for some unknown reason, causing the VOFA+ curve to fluctuate when receiving abnormal data.
This switch was originally intended for serial wireless downloading, but for some reason it's not working.
(Physical demonstration)
BLEPowerMeter.zip
PDF_Bluetooth Power Meter.zip
Altium_Bluetooth Power Meter.zip
PADS_Bluetooth Power Meter.zip
BOM_Bluetooth Power Meter.xlsx
91196
electronic
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-28 05:59:08

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号