Note: * is a required field,
please fill it in during the registration stage↓
* 1. Introduction to project functions
1. It can measure voltage (MAX<=6V), current (MAX<=5A) (5V/5A input with load test for 10 minutes, the USB port is about 60 degrees), can measure power, energy metering, energy storage, and energy history query
2. Two buttons are added on the basis of the ordinary version: START and HISTORY, which are used to enter different interfaces
Voltage and current measurement interface:
You can see the real-time voltage, current and power in this interface. Long press START to enter the energy measurement interface. Long press HISTORY to flip the screen. Click START or HISTORY to switch the voltage or current waveform display interface.
Energy metering interface:
In the voltage and current measurement interface, long press START to enter the energy measurement interface, where you can see the current voltage, current, energy, as well as the time of energy metering and the current direction. After entering the energy measurement interface, click START, and the time starts counting. Each time you click HISTORY, the current voltage, current, energy, and running time will be recorded. A maximum of 8 records (a maximum of 8 clicks). If the record exceeds eight times, the first data will be overwritten (and so on). Long press START to exit the energy measurement interface.
Historical energy query interface:
In the voltage and current measurement interface, click the HISTORY button to enter the historical energy query interface. At this time, the interface displays the recorded voltage, current, energy, recorded time, and recording page (a total of 8 pages). Click START to switch the recording page to the right, and click HISTORY to switch the recording page to the left. Long press START to clear all recorded energy data. Long press HISTORY to exit the historical energy query interface and return to the voltage and current detection interface.
3. Historical energy storage
In Section 2, it is introduced how to store and delete energy through buttons. No EEPROM is used, and the storage function of the chip's internal FLASH emulation EEPROM is used.
4. Waveform drawing
can draw waveforms for voltage, current, and power (not accurate, because the screen Y axis has only 32 points and cannot be subdivided a lot).
*2. The project attributes
are made public for the first time, and it is the first time to participate in the training camp
* 3.
Please fill in the open source agreement during the competition stage↓
*4. Hardware part
*5. Software part
1. Two channels are opened for ADC sampling , because one channel samples voltage and the other channels samples current
. The continuous conversion mode is not turned on. I use a timer to trigger a sample every 10MS, sample 20 points (non-continuously), and do a filtering process, so the metering data is refreshed 5 times in 1S. 2. The long and short press of the button does not use external interrupts, but uses a scanning button, which uses a timer to scan and judges whether the button is long pressed or short pressed by time. 3. The energy-related data storage uses a two-dimensional array data[8][4]. The first dimension represents the number of storage pages, a total of eight pages (it can be changed to more, but I don’t think it’s necessary), and the second dimension represents data: voltage, current, energy, and time. When you press and hold START to exit, the data will be stored in FLASH. A for loop is used to store the data of this two-dimensional array, and it will be read out next time the computer is turned on. *6. BOM list *7. Competition LOGO verification * 8. Demonstrate your project and upload it as a video. 5V/5A is injected to see the actual electronic load. I passed it for 10 minutes and touched it with courage. It is acceptable. If you want to use it, try to control the use range within 5V2A. After all, USB cannot withstand it for a long time.

