Design of data recording device based on STM32 single chip microcomputer (1)

Single chip microcomputer STM32L151CCU6
Crystal oscillator
Quartz Oscillator 3225 20M OSC

Introduction

This paper presents the design of a data recording device tailored for electric vehicle research. The device is integrated into the battery energy management system (BMS) and communicates with it to record external battery parameters such as voltage, current, and temperature during real-world operation. This helps in analyzing battery performance and verifying the BMS functionality, providing essential data for theoretical studies on power batteries used in electric vehicles.

1. Overall System Design

The design of the data recorder includes both hardware and software components. On the software side, it involves data receiving and storage programming. Hardware design covers the selection of the main control chip, reset function implementation, power supply modules, real-time clock (RTC), communication interfaces, and SD card integration. The main control chip serves as the core of the system, reducing the need for external circuits and simplifying the overall design. Power modules ensure stable voltage levels across different system components. The RTC ensures accurate time-stamping, while the SD card provides large storage capacity for the recorded data. Since most electric vehicles use CAN interfaces, the device is designed to communicate via CAN. Figure 1 shows the overall system architecture.

Design of data recording device based on STM32 single chip microcomputer (1)0

Figure 2 illustrates the schematic diagram of the hardware section of the data recording device.

Design of data recording device based on STM32 single chip microcomputer (1)1

2. Hardware Design

2.1 Main Control Chip

The STM32F103RBT6 is selected as the system controller. It is a high-performance, low-cost, and low-power microcontroller from STMicroelectronics, featuring a 32-bit RISC core (ARM Cortex-M3) operating at up to 72MHz. Its cost-effective nature makes it ideal for embedded applications, with a retail price around 12 yuan.

2.2 Reset Function

The STM32F103RBT6 integrates two watchdogs: an independent watchdog and a window watchdog. These help detect and recover from software faults, enabling soft resets. When the watchdog counter reaches a predefined timeout, an interrupt or system reset is triggered. The microcontroller also supports power-on and power-down resets, enhancing system reliability, timing accuracy, and usability, ensuring smooth program execution.

2.3 Real-Time Clock (RTC)

The STM32F103RBT6 has an internal RTC module that operates as a standalone timer. With proper software configuration, it can maintain calendar and time functions by continuously counting. The RTC settings are stored in the backup area, so they remain intact after a system reset or wake-up from standby mode. When the main power (VDD) is disconnected, the VBAT pin supplies power to the RTC and backup registers, ensuring continuous operation. This setup allows the system to retain time and critical data even when the main power is off.

2.4 Power Module

The power module supplies power to the entire system. The STM32 requires a voltage between 2.0V and 3.6V, while the RTC needs a backup battery. A CR1220 button cell is used for VBAT, and a hybrid power supply (VCC3.3V) is provided externally. When the external power is disconnected, the CR1220 takes over, ensuring the RTC and backup registers remain powered. To provide stable power to the microcontroller, an AMS AVS17 voltage regulator is used to generate 3.3V for the system. Figure 3 shows the power circuit design.

Design of data recording device based on STM32 single chip microcomputer (1)2 [1] [2] Design of data recording device based on STM32 single chip microcomputer (1)3

Self Regulating Heating Cable

Self Regulating Heating Cable,Electric Heating Tape,Insulation Heating Tape,Heating Tape

JIANGSU PENGSHEN HIGH TEMPERATURE WIRE CABLE CO., LTD. , https://www.pengshencable.com

Posted on