newrudeman

#The Fifth Lichuang Electronic Design Competition#Wireless power monitor

 
Overview

#define 0x00 Idea!

Recently I was working on a power management system for a robot competition and needed to study the dynamic power usage of the chassis motor, so I planned to make a wireless power monitor to meet the needs.

#define 0x01 Preview!  Some requirements:

  1. Bidirectional current monitoring
  2. All the way voltage monitoring
  3. Power and cumulative power consumption monitoring
  4. Sampling frequency: 1KSa/S
  5. There is a host computer that supports data drawing and recording functions
  6. Uses OLED for display and can be used offline

#define 0x02 Producer!

hbozyq: an unknown engineer outside the industry, an honorary professor at his own university, and the individual marketing director of Xianyu. Currently in my third year of undergraduate studies.

#define 0x03 Project!

1. Work details: As of August 20, 2020, this project has achieved the following functions:

  1. [x] Bidirectional current monitoring
  2. [x] One voltage monitoring
  3. [ ] Power and cumulative power consumption monitoring
  4. [x] Sampling frequency: 1KSa/S
  5. [ ] There is a host computer that supports data drawing and recording functions
  6. [x] Use OLED for display and can be used offline

The current and voltage detection accuracy differs from that of a three-and-a-half-digit multimeter by about plus or minus 5 characters (the maximum value appears at the limit of the range.)

No external power supply is required, the power supply under test is used, the voltage range is 6-30v

Power and cumulative power consumption monitoring have not yet been implemented because the microcontroller has insufficient flash. It will be added in the next version after switching to a microcontroller with larger space.

PC development progress: 50%. Because it is difficult to achieve high-precision (resolution less than 1ms) timing using Python under Windows, only simple data recording has been implemented for the time being, and drawing has not yet been implemented.

In addition, the practicality of 1KSa/S is unknown, and I am considering whether to reduce it to 100Sa/S.

Item Consumption Guide: How to use this item?

  1. There are two boards in the PCB of this project, namely the PC receiver and the host computer. Modify the frame and connect them into one board for proofing.
  2. After getting the board, weld it against the schematic diagram. The wireless module can use Zeyao or ebyte's ML01S and other package-compatible NRF24l01 wireless modules. If you don't need a host computer, you don't need to solder the wireless module and PC receiver.
  3. Burn the firmware and modify the ADC correction program in about 750 lines of the host program according to the actual situation, and use polynomials to fit the corresponding relationship between the actual values ​​and the ADC acquisition values.
  4. The host is ready to use after power-on. No settings are required except for calibration. The current and voltage are displayed in two lines, the upper and lower lines. The current is displayed in reverse white to indicate negative current, and the positive display is positive current. The current reference direction is marked on the PCB. The PC-side receiver outputs wirelessly transmitted information through the serial port, with a bit rate of 2M.
  5. In addition to RST, two buttons are reserved for the PC-side receiver and one button is reserved for the host. They have no actual functions yet and will be added after the microcontroller is replaced.
  6. The welding input and output lines are as shown in the figure.

TIM screenshot 20200820103540.png

2. Challenges faced by the project and problems solved For this project, the main challenge is the design of the analog signal conditioning circuit. Current sampling part: High-end differential sampling current detection requires four precisely matched resistors. It is more difficult to match if discrete components are used, resulting in lower PSRR. Therefore, low-end current detection is used here, and a 10-fold current amplification is achieved through an inverting amplifier. A reference voltage is introduced at the non-inverting terminal so that a 1.65v voltage is output when the input is 0, thereby achieving bidirectional current detection. The RC filter network is connected between the op amp output and the adc. It has two functions. One is to resist aliasing, and the other is to provide a low-impedance charge source to avoid the impact of the SARADC sampling capacitance on the op amp output. TIM screenshot 20200820090122.png The voltage sampling part is a relatively simple voltage divider + op amp follower design, which will not be described in detail here. TIM screenshot 20200820090041.png

3. Describe the key points involved in the hardware and software parts of the project

The hardware focus is basically as mentioned above. This part briefly talks about the software focus. The focus of the software is mainly ADC fixed frequency acquisition and interrupt. In the program, a timer is used to trigger the ADC for 4khz sampling, and then the dma transfer is set to interrupt once four times to realize the 1khz sampling completion interrupt. In the interrupt callback program, the average value of the four samplings is calculated, converted into the actual voltage and current value and sent to the receiver, and finally get a regular 1KSa/S sampling result, according to the sampling theorem. Enough to restore current and voltage waveforms within 500hz.

4. See the end of the article for the project material list display BOM.

5. Upload project pictures, empty board and actual photos, 1.jpg2.jpg voltage accuracy comparison, 3.jpg4.jpg please view the video demonstration for more tests.

6. Demonstrate your project and record it as a video for uploading

See attachment, file size is limited, the picture quality is impressive, you can turn right to station b to watch high-definition uncensored blockbusters: https://www.bilibili.com/video/BV1oK4y1Y7SB/

7. Whether it is released to the public for the first time

yes

8. Open source documentation

None

9. References

None

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-22 21:49:07

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号