Embedded development and application experiment system based on digital twinning
By combining digital twin technology and microcontroller teaching resources, an experimental box and a host computer simulation system were designed, which solved the problem of insufficient microcontroller teaching resources, realized the simulation and real-time monitoring of complex experiments, and improved the quality of education and students' technical level.
Patent Information
- Application Number
- CN202422842313.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2034-11-21
AI Technical Summary
The existing technology lacks sufficient integration of microcontroller teaching resources with digital twin technology, resulting in limited student experiments and a single teaching mode, making it difficult to simulate and monitor complex or dangerous operations in real time.
Design an embedded development and application experimental system based on digital twins, including an experimental box and a host computer simulation system, which are connected via RS485 communication. Modules in the experimental box, such as the STM32 minimum system board and the basic object development board, are used for simulation and data transmission in conjunction with digital twin technology.
It enables students to conduct complex experiments in a virtual environment, improving the quality of education and students' technical skills. The modular design supports system customization and functional expansion, enhancing the reliability of experimental results and the ability to diagnose faults.
Smart Images

Figure CN223815601U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model belongs to the technical field of technology education, especially relates to a kind of embedded development and application experimental system based on digital twinning. BACKGROUND
[0002] In the current technical education field, single-chip microcomputer embedded development and digital twinning technology have become a hot topic in their respective fields.Single-chip microcomputer, as the core of controlling various electronic systems, its development and application have been quite mature, and the relevant learning resources are also very rich, which provides students and engineers with solid basic knowledge and practical skills.However, there is little exploration in the application of these traditional education resources combined with the cutting-edge digital twinning technology on teaching equipment.
[0003] Digital twinning technology can reflect, simulate and even predict the behavior and state of physical entities in real time by creating an accurate virtual copy of the physical entity in digital space.This technology uses data collected by Internet of Things sensors, physical models and operation history information to achieve the whole life cycle management of the entity.Imagine that if this technology is introduced into single-chip microcomputer learning and experiment, it may bring revolutionary changes.
[0004] In traditional single-chip microcomputer teaching, students may need to face the limitations of hardware equipment and the constraints of experimental resources.The introduction of digital twinning technology can allow students to conduct experiments in a virtual environment without being limited by physical equipment, and even simulate more complex or dangerous operations in the experiment, which is often difficult to achieve in traditional teaching.In addition, digital twinning technology can also help teachers monitor students' experimental progress in real time and adjust teaching strategies according to students' learning situation, which is difficult to imagine in traditional teaching mode. UTILITY MODEL CONTENT
[0005] The utility model aims to provide a kind of embedded development and application experimental system based on digital twinning, realize the combination of single-chip microcomputer embedded development and digital twinning technology, to improve the quality of education, improve the technical level of students.The specific technical scheme is as follows:
[0006] An embedded development and application experimental system based on digital twinning, comprising an experimental box and an upper computer simulation system, the experimental box is communicated and connected with the upper computer simulation system through RS485 communication;
[0007] The experimental box includes an experimental box motherboard, an STM32 minimum system board, a basic object development board module, a basic introductory module, an electric power generation integrated module, a temperature control module, a stepless dimming module, a road traffic light simulation board module, a wireless answerer module, a tracing trolley and a JLINK emulator;
[0008] The basic introductory module is communicatively connected to the basic object development module. The basic object development board module, the electric generator integrated module, the temperature control module, the stepless dimming module, the road traffic light simulation board module, the wireless answer-grabbing device module, the line-following car, and the JLINK emulator are all communicatively connected to the STM32 minimum system board.
[0009] The experimental box motherboard is used to connect the STM32 minimum system board, basic object development board module, basic intro module, electric generator integrated module, temperature control module, stepless dimming module, road traffic light simulation board module, and wireless answering device module.
[0010] The host computer system includes a true simulation model of the above modules.
[0011] Preferably, the STM32 minimum system board uses STM32F103RCT6 as the MCU. The STM32F103RCT6 is equipped with a JLINK program download port, RS485 circuit, power supply circuit, reset button, and microcontroller I / O pin header.
[0012] Preferably, the basic object development module is equipped with an STM32 minimum system board connector, a stepless dimming module connector, a motor control module connector, a temperature control module connector, a serial port connector, a ZIGBEE wireless communication module connector, a heart rate detection module connector, and a basic introductory module connector.
[0013] Preferably, the basic entry-level module includes a button-activated LED module, a buzzer module, a two-digit digital tube module, an OLED display module, an 18B20 temperature sensor module, a potentiometer module, a DHT11 temperature and humidity sensor module, a photoresistor module, a touch sensor module, a flame sensor module, a human infrared sensor module, a carbon dioxide detection module, an alcohol detection module, an ultrasonic ranging module, a motor speed control module, a heart rate detection module, a color recognition module, and a fingerprint recognition module.
[0014] Preferably, the integrated electric generator module includes a motor, a generator, a coupling, a motor drive circuit, a motor encoder circuit, a generator load circuit, and a control signal interface.
[0015] Preferably, the temperature control module includes an incandescent lamp, an acrylic insulation tube, an incandescent lamp driving circuit, a temperature sensor, a temperature signal conditioning circuit, a control signal interface, and a cooling fan.
[0016] Preferably, the traffic light simulation board module hardware includes a cylindrical traffic light, a cylindrical traffic light connector, an L-shaped traffic light, an L-shaped traffic light connector, and an STM32 minimum system board connector.
[0017] Preferably, the stepless dimming module includes an LED bead group, an LED bead driving circuit, an LED bead current sampling circuit, and a control signal interface.
[0018] Preferably, the wireless answer-grabbing module includes an STM32F030C8T6 microcontroller, an answer-grabbing button, and a power supply circuit for the ZIGBEE wireless communication module.
[0019] Preferably, the line-following vehicle includes a 12V lithium battery, a DC motor, a motor encoder circuit, a motor drive circuit, a charging circuit, a power supply circuit, a four-channel line-following module, and a servo motor connected to the STM32 minimum system board.
[0020] Compared with existing technologies, this utility model has the following beneficial effects:
[0021] 1. In this utility model, by combining real-world simulation with interactive teaching, students can intuitively observe and understand the working principle of complex embedded systems, deepen their understanding of theoretical knowledge, and apply it in practice.
[0022] 2. In this utility model, the experimental box contains a variety of modules, such as a basic introductory module and an integrated electric power generation module, which allow students to improve their technical skills through hands-on operation.
[0023] 3. In this utility model, due to the modular design of the experimental box, users can select different modules for teaching or experiments as needed, easily realizing system customization and functional expansion.
[0024] 4. In this invention, fault conditions can be easily simulated and reproduced in a digital twin model, helping students learn how to diagnose problems and perform effective debugging.
[0025] 5. In this utility model, the host computer simulation system provides a real simulation model of all modules of the experimental box, ensuring the consistency between the simulation environment and the real world, and enhancing students' confidence in the experimental results. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0027] Figure 1 This is a schematic diagram of the principle of this utility model.
[0028] Figure 2 This is the block diagram of the STM32 minimum system board.
[0029] Figure 3 This is a block diagram of the basic object development board module.
[0030] Figure 4 This is a block diagram of the integrated electric power generation module.
[0031] Figure 5 This is a block diagram of the temperature control module.
[0032] Figure 6 This is a block diagram of the road traffic simulation board.
[0033] Figure 7 This is a block diagram of the stepless dimming module.
[0034] Figure 8 This is a block diagram of the wireless answer-grabbing module.
[0035] Figure 9 This is another principle block diagram of the wireless answer-grabbing module.
[0036] Figure 10 This is a block diagram of the principle of a line-following car. Detailed Implementation
[0037] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, and not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present utility model.
[0038] In the description of this utility model, it should be noted that the terms "center", "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "top surface", "bottom surface", "inner", "outer", "inner side", "outer side", etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this utility model and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this utility model.
[0039] In the description of this utility model, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. If the terms "first," "second," and "third" are used in the description, they are for descriptive purposes and to distinguish technical features, and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features.
[0040] In the description of this utility model, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "setting" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this utility model based on the specific circumstances. The embodiments of this utility model will now be described based on its overall structure.
[0041] Example 1
[0042] Please see Figures 1-10 This embodiment discloses an embedded development and application experimental system based on digital twins, including an experimental box and a host computer simulation system. The experimental box is connected to the host computer simulation system via RS485 communication.
[0043] The experimental box includes an experimental box motherboard, an STM32 minimum system board, a basic object development board module, a basic introductory module, an integrated electric power generation module, a temperature control module, a stepless dimming module, a road traffic light simulation board module, a wireless quiz buzzer module, a line-following car, and a JLINK emulator.
[0044] The host computer system includes a true simulation model of the above modules.
[0045] The specific working principle and process are as follows: The host computer simulation system serves as the control, processing, and experimental demonstration platform, controlling and displaying the twin data of each module in the experimental box and realistically simulating and reproducing experimental phenomena. The STM32 minimum system board of the experimental box is programmed to control each module to conduct experiments, and on the other hand, it communicates with the host computer simulation system via RS485 communication. During the experiment, the STM32 minimum system board is used in conjunction with other modules.
[0046] In addition, the connection relationships between the various modules are as follows: the experimental box motherboard can be connected to the basic object development board module, the road traffic light simulation board module, the electric generator integrated module, the temperature control module, and the stepless dimming module; the STM32 minimum system board can be connected to the basic object development board module, the road traffic light simulation board module, and the line-following car. In addition to connecting to the STM32 minimum system board, the basic object development board module can also connect to the basic introductory module.
[0047] The principles and functions of each module will be explained below:
[0048] Experimental box motherboard: Converts 220V AC mains power into +15V DC power. The motherboard also has power supplies and fixed connectors for each module. During the experiment, the road traffic light simulation board module / basic object development board module / electric generator integrated module / temperature control module / stepless dimming module board can be plugged into the corresponding power supply and fixed connectors for the experiment.
[0049] like Figure 2 As shown, the STM32 minimum system board design uses the STM32F103RCT6 as the MCU, and also includes a JLINK program download port, RS485 circuit, power supply circuit, reset button, and external MCU I / O headers. The JLINK program download port is used for embedded program download and online simulation debugging; the RS485 circuit connects the MCU to an RS485-to-USB data cable, and then connects to a host computer simulation system via a communication data cable, allowing experimental data from each module to be replicated to the host computer simulation system; the power supply circuit converts the 5V voltage input from the headers to the 3.3V voltage used by the MCU; the reset button is used to reset the MCU in case of a crash or program error, allowing the MCU to restart; the available I / O pins of the STM32F103RCT6 MCU are externally accessible via headers, allowing connection to other module boards for experimentation.
[0050] like Figure 3 As shown, the basic object development board module serves to connect other module boards and provide power voltage conversion. The module's interfaces include an STM32 minimum system board connector, a stepless dimming module connector, a motor control module connector, a temperature control module connector, a serial port connector, a Zigbee wireless communication module connector, a heart rate detection module connector, and a basic introductory module connector. The basic object development board module is plugged into the experimental box motherboard. Its input voltage is +15V, and its output voltage is +5V. Therefore, this module can provide either +15V or +5V voltage to accommodate modules requiring different voltages.
[0051] like Figure 4As shown, the integrated electric generator module hardware includes a motor, generator, coupling, motor drive circuit, motor encoder circuit, generator load circuit, and control signal interface. The rotating motor drives the generator to rotate via the coupling, and the generator generates electricity to power the load circuit. The motor drive circuit ultimately drives the motor to rotate, and the input is a PWM wave control signal, which controls the motor speed. The motor encoder circuit converts the rotating motor into a 3.3V pulse signal. The faster the motor speed, the higher the frequency of the pulse signal. The pulses are connected to the microcontroller through the control signal interface. The microcontroller obtains the motor speed by acquiring and calculating the pulses. The generator load circuit is designed with a light bulb and two forward / reverse indicator lights. When the generator generates electricity, it drives the light bulb and the forward / reverse indicator lights. The control signal interface connects to the motor control module wiring port of the basic object development board module, and then connects to the microcontroller through the STM32 minimum system board interface. During the experiment, the integrated electric generator module and the basic object development board module are plugged into the experimental box motherboard, and the STM32 minimum system board is plugged into the STM32 minimum system board interface of the basic object development board module. During the experiment, the STM32 minimum system board sends experimental parameters such as motor speed and generator voltage to the host computer. In this way, the host computer simulation system observes experimental phenomena such as motor speed and bulb brightness.
[0052] like Figure 5 As shown, the temperature control module achieves the experimental effect of temperature control. The design includes an incandescent lamp, an acrylic insulation tube, an incandescent lamp driver circuit, a temperature sensor, a temperature signal conditioning circuit, a control signal interface, and a cooling fan. The module has two incandescent lamps placed in a relatively enclosed acrylic insulation tube. When the incandescent lamps are lit, they generate heat, raising the ambient temperature inside the insulation tube. When the temperature reaches the value set by the program / host computer, the incandescent lamps turn off. The incandescent lamp driver circuit connects the incandescent lamps and the microcontroller, controlling the lamps' on / off state and adjusting their brightness; higher brightness results in greater heat generation. The temperature sensor and temperature signal conditioning circuit collect the temperature within the insulation tube. The control signal interface connects to the temperature control module's wiring port on the basic object development board module; the experimental method is the same as described above. During the experiment, the brightness of the incandescent lamp can be observed to change with temperature through the host computer simulation system. When the set temperature is modified on the host computer simulation system, the brightness of the incandescent lamp also changes accordingly. When the temperature is lower than the set value, the incandescent lamp becomes brighter and brighter, and when the temperature is higher than the set value, the incandescent lamp becomes dimmer and dimmer until it goes out.
[0053] like Figure 6As shown, the traffic light simulation board module hardware includes cylindrical traffic lights, cylindrical traffic light connectors, L-shaped traffic lights, L-shaped traffic light connectors, and an STM32 minimum system board connector. There is one cylindrical traffic light, which plugs into the cylindrical traffic light connector on the traffic light simulation board. Each cylindrical traffic light has three red, yellow, and green straight-ahead traffic lights in each of the four directions (up, down, left, and right). There are four L-shaped traffic lights, which plug into the four directions (up, down, left, and right) on the traffic light simulation board. Each L-shaped traffic light has one digital tube for displaying a countdown, one set of straight-ahead indicator lights (red, yellow, green), and one set of left-turn indicator lights (red, yellow, green). The control logic is that the straight-ahead indicator lights, left-turn indicator lights, and digital tube displays in the same direction (up / down / left / right) are individually controlled via the same microcontroller I / O pins. Before the experiment, the traffic light simulation board was connected to the motherboard of the experimental box. Then, cylindrical traffic lights, L-shaped traffic lights, and the STM32 minimum system board were connected to the traffic light simulation board. Finally, a J-LINK downloader and an RS485 to USB data cable were connected. A 3D simulation model of the traffic light simulation board module was designed on the host computer simulation system. During the experiment, the microcontroller sent the various states of the traffic light simulation board module to the host computer via RS485 communication. The host computer simulation system then realistically reproduced the experimental phenomena of the traffic light simulation board module based on the data, thus achieving data twinning of the experiment.
[0054] like Figure 7 As shown, the stepless dimming module hardware includes an LED bead group, an LED bead driver circuit, an LED bead current sampling circuit, and a control signal interface. The LED bead group consists of five LED beads connected in series. These beads are connected to the LED bead driver circuit and finally connected to the stepless dimming module connector on the basic object development board module via the control signal interface, ultimately connecting to the STM32 microcontroller. The LED bead current sampling circuit collects the current flowing through the LED beads, and the magnitude of this current indirectly reflects the brightness of the LED beads. The stepless dimming module controls the brightness of the LED bead group by collecting and controlling the LED bead current. The host computer simulation system modifies the set current value and sends the set current value to the microcontroller via RS485 communication. The microcontroller adjusts the brightness of the LED bead group according to the set current value, while simultaneously sampling and calculating the current value of the LED bead group in real time and uploading it to the host computer simulation system. Finally, the host computer simulation system simulates and recreates the brightness of the LED bead group based on the set current value and the real-time current value.
[0055] like Figure 8 , 9As shown, the wireless quiz buzzer module hardware includes an STM32F030C8T6 microcontroller, quiz buttons, a Zigbee wireless communication module, and a power supply circuit. The STM32F030C8T6 microcontroller acts as the MCU for the wireless quiz buzzer, responsible for real-time button detection and data transmission processing. The Zigbee wireless communication module transmits the data from the microcontroller wirelessly. The wireless quiz buzzer module is powered by an 18650 lithium battery, which typically has a voltage of 3.7V to 4.2V. This battery voltage cannot directly power the microcontroller; the power supply circuit needs to convert the voltage to 3.3V before supplying it to the microcontroller. Each experimental box has three wireless quiz buzzer modules. During the experiment, the basic object development board module needs to be plugged into the motherboard of the experimental box, and then the STM32 minimum system board and the Zigbee wireless communication module need to be plugged into the corresponding interfaces of the basic object development board module. The ZIGBEE wireless communication module on the basic object development board and the ZIGBEE wireless communication modules on the three wireless answer-grabbing modules are configured with the same communication channel and baud rate, allowing them to communicate with each other. The STM32 microcontroller minimum system receives data from the three answer-grabbing devices via ZIGBEE and analyzes the different data to determine which answer-grabbing device was pressed. A host computer simulation system was designed to simulate the answer-grabbing devices, and the entire experiment requires control and display from the host computer simulation system.
[0056] like Figure 10 As shown, the line-following car, as the name suggests, is a car that travels along a set black track. The hardware of the line-following car includes a 12V lithium battery, a DC motor, a motor encoder circuit, a motor drive circuit, a charging circuit, a power supply circuit, a four-channel line-following module, a servo motor, and an STM32 minimum system board. A 12V lithium battery is connected to the power supply circuit, which converts the 12V battery voltage into the voltage required by various circuit modules (e.g., 3.3V, 5V). The line-following car is equipped with two DC motors mounted on the rear wheels. The input and output of the DC motors are connected to the motor drive circuit and the motor encoder circuit, respectively, and both are ultimately input to the STM32 microcontroller. The former drives the DC motor rotation and speed regulation, while the latter collects motor pulses and calculates the speed. The charging circuit connects the 12V lithium battery charger and the 12V lithium battery, and is responsible for charging the 12V lithium battery. The four-channel line-following module mainly detects the black track on the ground and then inputs the signal to the microcontroller. The microcontroller determines the car's position on the black track based on the signal, so that the car can make timely adjustments to keep the car always following the black track. The servo motor is responsible for controlling the direction of the car (straight / left turn / right turn).
[0057] Additionally, it should be noted that the basic introductory modules include a button-based LED display module, a buzzer module, a two-digit LED display module, an OLED display module, an 18B20 temperature sensor module, a potentiometer module, a DHT11 temperature and humidity sensor module, a photoresistor module, a touch sensor module, a flame sensor module, a human infrared sensor module, a carbon dioxide detection module, an alcohol / ethanol detection module, an ultrasonic ranging module, a motor speed control module, a heart rate detection module, a color recognition module, and a fingerprint recognition module. These modules are plugged into the basic introductory module connectors on the basic object development board and connected to the STM32 microcontroller. Ultimately, a digital twin simulation experiment can be conducted through a host computer simulation system. The purpose of the experiment is to allow students to recognize and learn how to use basic electronic components and sensors. The working principle of each module will be briefly introduced below.
[0058] The button-operated sequential LED module consists of 8 LEDs and 4 buttons. The anodes of the 8 LEDs are connected to 3.3V via current-limiting resistors, while the cathodes are directly connected to the microcontroller's I / O pins. The LEDs light up when the microcontroller's I / O pin is set low. The 4 buttons are pull-up, with another pin connected to GND. Pressing a button changes the microcontroller's I / O pin from high to low.
[0059] The buzzer module primarily controls the buzzer's operation. Since the microcontroller's I / O pins have limited driving capabilities and cannot make the buzzer sound at full power, a transistor is used to indirectly control the buzzer. The buzzer sounds when the microcontroller pin is high, and vice versa.
[0060] Digital tubes are divided into common cathode and common anode types. The digital tubes in a two-digit digital tube module are common anode digital tubes. In the circuit, the two common anode pins of the two-digit digital tube are connected to a 3.3V voltage through a current-limiting resistor. The cathode of the digital tube is directly connected to the microcontroller's IO pin. When the microcontroller's IO pin is set to a level, the corresponding digital segment lights up. The display control of the digital tube is achieved by controlling the on / off state of specific digital segments.
[0061] The OLED display module is a 128*64 resolution LCD screen. The OLED screen uses I2C communication. The control pins of the LCD screen are connected to the I / O pins of the microcontroller. The microcontroller sends the characters to be displayed to the OLED screen through I2C communication.
[0062] The 18B20 temperature sensor module hardware consists of a DS18B20 temperature sensor. Its control pin is connected to the microcontroller's I / O pin. The DS18B20 has only one control pin, and the microcontroller uses a single-bus communication method to control and read the temperature collected by the DS18B20 temperature sensor.
[0063] The potentiometer module has three different types of potentiometers. Two of the three potentiometers are fixed and connected to a 3.3V voltage, while the adjustable terminals are connected to the microcontroller's AD sampling pin. When the potentiometer is slid, the resistance of the adjustable terminal changes, and the voltage also changes. The microcontroller samples the voltage and calculates the resistance value of the adjustable terminal using a formula.
[0064] The DHT11 temperature and humidity sensor module consists of a DHT11 temperature and humidity sensor whose control pin is connected to a microcontroller's I / O pin, and its power supply pin is connected to a 5V voltage. The DHT11 temperature and humidity sensor has only one control pin, and the microcontroller reads the temperature and humidity data from the DHT11 sensor via a single-bus communication method.
[0065] The hardware principle of the photoresistor module is that the voltage divider resistor is connected in series with the photoresistor and then connected to GND. The other end of the voltage divider resistor is connected to a 3.3V voltage. When the light intensity sensed by the photoresistor changes, its resistance value also changes accordingly. Therefore, the sampling voltage of the corresponding AD sampling pin of the microcontroller also changes. The microcontroller calculates the resistance value of the photoresistor through AD sampling.
[0066] The touch sensing module hardware includes a touch sensor and a touch sensing chip. When a hand touches the touch sensor, its output voltage changes. This voltage signal is input to the touch sensing chip, which determines whether a touch has occurred based on the signal strength. Finally, it outputs a voltage level signal to the microcontroller. The microcontroller determines whether a finger has touched the touch module by analyzing the voltage level of this signal.
[0067] The flame sensor module hardware includes a flame sensor and a comparator circuit. When the output terminal of the flame sensor is connected to the comparator circuit, the output level of the flame sensor changes when it detects a flame. The comparator circuit outputs a high / low level to the microcontroller by comparing the output level of the flame sensor with the set level. The comparator circuit adjusts the magnitude of the comparison voltage through a potentiometer, thereby indirectly adjusting the detection sensitivity of the flame sensor.
[0068] The human infrared sensor module is a human infrared sensor in hardware. Its output terminal is connected to the IO pin of the microcontroller. The microcontroller determines whether there is a person near the sensor by judging the high and low level of the human infrared sensor output terminal.
[0069] The carbon dioxide detection module is a carbon dioxide sensor in terms of hardware. Its circuit principle is the same as that of the flame sensor module, so it will not be explained again here.
[0070] The alcohol detection module hardware includes an alcohol sensor, a signal processing circuit, and a comparison circuit. The output of the alcohol sensor is connected to the signal processing and comparison circuits. The output of the signal processing circuit is connected to the microcontroller's AD sampling pin. Different concentrations of alcohol gas result in different voltage levels measured by the microcontroller's AD sampling, and the microcontroller calculates the alcohol gas concentration based on the magnitude of the AD sampling voltage. The output of the comparison circuit is connected to the microcontroller's I / O pin. The microcontroller determines whether the alcohol sensor has detected alcohol gas by judging the high or low level of the I / O pin. The detection sensitivity of the alcohol sensor can be adjusted using a potentiometer.
[0071] The ultrasonic ranging module is an ultrasonic transmitter and receiver module with two control pins: an enable pin and a pulse pin. When the enable pin is enabled, the ultrasonic module emits ultrasonic waves, and at the same time, the pulse pin changes from low to high. When the ultrasonic wave hits an object and is reflected back and received by the ultrasonic module, the pulse pin goes back to low. The microcontroller determines the distance between the ultrasonic module and the object being detected by acquiring and calculating the high-level time of the pulse signal.
[0072] The motor speed control module uses a microcontroller to regulate the motor speed. The hardware includes a DC motor, a motor drive circuit, and an encoder circuit. The motor drive circuit connects the microcontroller to the DC motor and drives it to rotate at a set speed. The encoder circuit converts the motor speed into pulses, which are input to the microcontroller. The microcontroller determines the motor speed based on the pulse frequency.
[0073] The heart rate detection module consists of a heart rate sensor module, which operates via a control pin and I2C communication. The microcontroller reads data from the heart rate sensor module through I2C communication, performs calculations using an algorithm, and finally obtains the heart rate value. During the experiment, the heart rate sensor is placed on the arm's pulse point or on the finger to detect the heart rate.
[0074] The color recognition module mainly consists of a color recognition sensor, which can be controlled by a microcontroller to recognize and read the RGB colors of the object being measured. The color recognition sensor is mainly controlled by two control pins and one pulse output pin. The microcontroller performs level shifting on the two control pins according to control logic. The microcontroller can then read the number of pulses from the pulse output pin of the color recognition sensor through an external interrupt function, and then calculate the corresponding RGB value using a formula.
[0075] The fingerprint recognition module mainly consists of a fingerprint recognition sensor, which is controlled by a microcontroller via a serial port. The microcontroller can control the fingerprint recognition sensor by sending specific commands to it through the serial port, such as adding fingerprints, deleting fingerprints, and verifying fingerprints.
[0076] In summary, during the experiment, the STM32 minimum system board controlled the operation of each module and uploaded experimental data to the computer simulation system via RS485 communication. Similarly, the computer simulation system could also send data down to the STM32 minimum system board. This achieves the goal of combining microcontroller embedded development and application technology with digital twin technology.
[0077] The foregoing description of specific exemplary embodiments of the present invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the present invention to the precise forms disclosed, and it is obvious that many changes and variations can be made based on the above teachings. Although embodiments of the present invention have been shown and described, these specific embodiments are merely explanations of the present invention and are not intended to limit the invention. The specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. The purpose of selecting and describing exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art, after reading this specification, can make modifications, substitutions, variations, and various choices and changes to the embodiments as needed without departing from the principles and spirit of the present invention, provided that such modifications, substitutions, variations, and choices and changes are within the scope of the claims of the present invention and are protected by patent law.
Claims
1. An embedded development and application experimental system based on digital twins, characterized in that, It includes an experimental box and a host computer simulation system. The experimental box is connected to the host computer simulation system via RS485 communication. The experimental box includes an experimental box motherboard, an STM32 minimum system board, a basic object development board module, a basic introductory module, an integrated electric power generation module, a temperature control module, a stepless dimming module, a road traffic light simulation board module, a wireless quiz buzzer module, a line-following car, and a JLINK emulator. The basic introductory module is communicatively connected to the basic object development module. The basic object development board module, the electric generator integrated module, the temperature control module, the stepless dimming module, the road traffic light simulation board module, the wireless answer-grabbing device module, the line-following car, and the JLINK emulator are all communicatively connected to the STM32 minimum system board. The experimental box motherboard is used to connect the STM32 minimum system board, basic object development board module, basic intro module, electric generator integrated module, temperature control module, stepless dimming module, road traffic light simulation board module, and wireless answering device module. The host computer system includes a true simulation model of the above modules.
2. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The STM32 minimum system board uses STM32F103RCT6 as the MCU. The STM32F103RCT6 is equipped with a JLINK program download port, RS485 circuit, power supply circuit, reset button, and microcontroller I / O pin header.
3. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The basic object development module is equipped with an STM32 minimum system board connector, a stepless dimming module connector, a motor control module connector, a temperature control module connector, a serial port connector, a ZIGBEE wireless communication module connector, a heart rate detection module connector, and a basic introductory module connector.
4. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The basic entry-level module includes a button-activated LED module, a buzzer module, a two-digit digital tube module, an OLED display module, an 18B20 temperature sensor module, a potentiometer module, a DHT11 temperature and humidity sensor module, a photoresistor module, a touch sensor module, a flame sensor module, a human infrared sensor module, a carbon dioxide detection module, an alcohol / ethanol detection module, an ultrasonic ranging module, a motor speed control module, a heart rate detection module, a color recognition module, and a fingerprint recognition module.
5. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The integrated electric generator module includes a motor, a generator, a coupling, a motor drive circuit, a motor encoder circuit, a generator load circuit, and a control signal interface.
6. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The temperature control module includes an incandescent lamp, an acrylic insulation tube, an incandescent lamp drive circuit, a temperature sensor, a temperature signal conditioning circuit, a control signal interface, and a cooling fan.
7. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The traffic light simulation board module hardware includes a cylindrical traffic light, a cylindrical traffic light connector, an L-shaped traffic light, an L-shaped traffic light connector, and an STM32 minimum system board connector.
8. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The stepless dimming module includes an LED bead group, an LED bead driver circuit, an LED bead current sampling circuit, and a control signal interface.
9. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The wireless quiz buzzer module includes an STM32F030C8T6 microcontroller, a quiz buzzer button, and a power supply circuit for the ZIGBEE wireless communication module.
10. The embedded development and application experimental system based on digital twins according to claim 1, characterized in that, The line-following vehicle includes a 12V lithium battery, a DC motor, a motor encoder circuit, a motor drive circuit, a charging circuit, a power supply circuit, a four-channel line-following module, and a servo motor, all connected to the STM32 minimum system board.