vmRtn

CW32-based voltage and current meters

 
Overview

The most important parts of the hardware circuit are the voltage acquisition section and the current acquisition section
. The voltage acquisition circuit implements the acquisition
of voltage under both high and low voltage conditions. The current acquisition section uses a small resistor and an ADC sampling method to acquire the current magnitude . In the software
section ,
the most important parts are calibration and mean filtering
. Calibration uses a linear fitting method, obtaining the slope of the fitted curve based on the actual voltage change and the calculated voltage change.
Filtering uses a mean filtering method, which involves acquiring voltage values ​​over a period of time, subtracting the maximum and minimum values, and averaging the remaining values. This filtering method can prevent voltage spikes to some extent.
It is important to note that
in MDK-ARM6, the definition should be uppercase __WEAK; if it is defined as lowercase __weak in the example code, an error will occur.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-26 03:47:12

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号