Multi-channel relay power failure testing device based on single-chip microcomputer

By using a microcontroller-based multi-channel relay power-down test device, combined with a Bluetooth chip and a monitoring microcontroller, multi-channel parallel testing was achieved. This solved the problems of limited testing scenarios, low automation, and communication limitations in existing technologies, and improved testing efficiency and stability.

CN224263335UActive Publication Date: 2026-05-19UNITED MEMORY TECHNOLOGY (JIANGSU) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
UNITED MEMORY TECHNOLOGY (JIANGSU) LTD
Filing Date
2025-04-01
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing power failure testing devices have limited testing scenarios, low automation, and communication limitations that result in poor deployment flexibility and make it difficult to achieve multi-channel parallel testing.

Method used

A multi-channel relay power-down test device based on a microcontroller is adopted. It combines a Bluetooth chip and a monitoring microcontroller to control 32 relays through wireless communication to achieve parallel testing. It is also equipped with a current sensor and optocoupler for real-time monitoring.

Benefits of technology

It improves testing efficiency and stability, ensures the authenticity of each power-down test, solves the problem of hardware failure or failure to take effect after power failure, and supports 32-channel parallel testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224263335U_ABST
    Figure CN224263335U_ABST
Patent Text Reader

Abstract

The utility model relates to the technical field of power failure testing, in particular to a multichannel relay power failure testing device based on a single-chip microcomputer, which comprises a Bluetooth chip, a monitoring single-chip microcomputer and thirty-two testing modules. Each test module comprises a test platform, a current sensor, a relay and an optical coupling element, the test platform is electrically connected with the current sensor, the current sensor is electrically connected with the optical coupling element through the relay, and all the optical coupling element and all the current sensor are electrically connected with the input end of the monitoring single chip microcomputer respectively; the output end of the monitoring single-chip microcomputer is electrically connected with the input end of the Bluetooth chip, all the relays are electrically connected with the output end of the Bluetooth chip, and each relay controls an equipment power supply. The model number of the Bluetooth chip is nRF52832, and the model number of the monitoring single-chip microcomputer is STM32F405RGT6. According to the mode, the 32-path testing module is adopted, 32-path parallel testing can be supported, and the testing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to the field of power-down testing technology, specifically a multi-channel relay power-down testing device based on a microcontroller. Background Technology

[0002] Stability testing of embedded devices under abnormal power loss conditions is a crucial step in ensuring their reliability and data integrity. Taking NAND Flash as an example, power loss can occur during data writing, copying, or file cleanup, leading to data corruption or system malfunction. Existing power loss testing equipment has the following shortcomings:

[0003] 1. Limited testing scenarios: Traditional methods often involve power outages at fixed intervals, which are difficult to cover the various critical states of equipment operation.

[0004] 2. Low level of automation: Relies on manual operation of relays or switches, resulting in low efficiency and poor consistency. 3. Communication limitations: Common wired interfaces (such as USB or serial ports) limit deployment flexibility. Utility Model Content

[0005] In view of this, the purpose of this utility model is to provide a multi-channel relay power-down test device based on a microcontroller to solve the technical problems mentioned in the background art.

[0006] To achieve the above objectives, the technical solution adopted by this utility model is as follows:

[0007] A multi-channel relay power-down testing device based on a microcontroller includes a Bluetooth chip, a monitoring microcontroller, and 32 test modules. Each test module includes a test platform, a current sensor, a relay, and an optocoupler. The test platform is electrically connected to the current sensor, which is electrically connected to the optocoupler via the relay. All optocouplers and all current sensors are electrically connected to the input terminals of the monitoring microcontroller. The output terminal of the monitoring microcontroller is electrically connected to the input terminal of the Bluetooth chip, and all relays are electrically connected to the output terminals of the Bluetooth chip. Each relay controls the power supply of one device. The Bluetooth chip is an nRF52832, and the monitoring microcontroller is an STM32F405RGT6.

[0008] Furthermore, it also includes a PC terminal and four 1-to-8 USB hubs. The PC terminal is electrically connected to each of the four 1-to-8 USB hubs, and each of the 1-to-8 USB hubs is electrically connected to the eight test platforms via a USB serial port. The Bluetooth chip establishes a Bluetooth wireless communication connection with the PC terminal.

[0009] Furthermore, it also includes an LED Bluetooth indicator light, which is electrically connected to the Bluetooth chip.

[0010] Furthermore, it also includes an SD card module, which is electrically connected to the Bluetooth chip.

[0011] Furthermore, the optocoupler is model PC817, and the current sensor is model ACS712.

[0012] The beneficial effects of this utility model are:

[0013] This utility model provides a multi-channel relay power-down testing device based on a microcontroller, comprising a Bluetooth chip, a monitoring microcontroller, and 32 test modules. Each test module includes a test platform, a current sensor, a relay, and an optocoupler. The test platform is electrically connected to the current sensor, and the current sensor is electrically connected to the optocoupler through the relay. All optocouplers and all current sensors are electrically connected to the input terminals of the monitoring microcontroller. The output terminal of the monitoring microcontroller is electrically connected to the input terminal of the Bluetooth chip, and all relays are electrically connected to the output terminals of the Bluetooth chip. Each relay controls the power supply of one device. The Bluetooth chip is an nRF52832, and the monitoring microcontroller is an STM32F405RGT6. The above method utilizes Bluetooth wireless communication technology, eliminating the need for manual relay operation and improving efficiency. It also replaces existing wired connections and employs a 32-channel test module, supporting 32-channel parallel testing and further enhancing efficiency. However, the limited interface count of the nRF52832 Bluetooth chip necessitates the addition of a monitoring microcontroller. This microcontroller feeds back the output levels of the optocouplers to the monitoring microcontroller, which in turn feeds back to the Bluetooth chip, enabling parallel power-down testing of 32 relays via Bluetooth. Simultaneously, it implements pre-test self-checks and real-time monitoring during testing, detecting relay mechanical states, Bluetooth signals, and load current changes. This ensures the stability of the 32-channel parallel testing and the authenticity of each power-down test, resolving the unreliability issues caused by hardware failure or ineffective power-down testing in existing technologies. Attached Figure Description

[0014] Figure 1 This is a circuit module connection diagram of the microcontroller-based multi-channel relay power-down test device of this utility model;

[0015] Figure 2 This is a circuit module connection diagram of the test module of the multi-channel relay power-down test device based on a single-chip microcomputer of this utility model;

[0016] Explanation of the labels in the diagram:

[0017] 1. Bluetooth chip; 2. Monitoring microcontroller; 3. Test module; 31. Test platform; 32. Current sensor; 33. Relay; 34. Optocoupler; 4. PC terminal. Detailed Implementation

[0018] The present invention will be further described below with reference to the accompanying drawings and specific embodiments:

[0019] like Figures 1 to 2 As shown, a multi-channel relay power-down testing device based on a microcontroller includes a Bluetooth chip 1, a monitoring microcontroller 2, and 32 test modules 3. Each test module 3 includes a test platform 31, a current sensor 32, a relay 33, and an optocoupler 34. The test platform 31 is electrically connected to the current sensor 32, and the current sensor 32 is electrically connected to the optocoupler 34 through the relay 33. All optocouplers 34 and all current sensors 32 are electrically connected to the input terminals of the monitoring microcontroller 2. The output terminal of the monitoring microcontroller 2 is electrically connected to the input terminal of the Bluetooth chip 1, and all relays 33 are electrically connected to the output terminals of the Bluetooth chip 1. Each relay controls the power supply of one device. The Bluetooth chip is an nRF52832, the monitoring microcontroller is an STM32F405RGT6, the optocoupler is a PC817, and the current sensor is an ACS712.

[0020] The beneficial effects of this utility model are:

[0021] This utility model provides a multi-channel relay power-down testing device based on a microcontroller, comprising a Bluetooth chip, a monitoring microcontroller, and 32 test modules. Each test module includes a test platform, a current sensor, a relay, and an optocoupler. The test platform is electrically connected to the current sensor, and the current sensor is electrically connected to the optocoupler through the relay. All optocouplers and all current sensors are electrically connected to the input terminals of the monitoring microcontroller. The output terminal of the monitoring microcontroller is electrically connected to the input terminal of the Bluetooth chip, and all relays are electrically connected to the output terminals of the Bluetooth chip. Each relay controls the power supply of one device. The Bluetooth chip is an nRF52832, and the monitoring microcontroller is an STM32F405RGT6. The above method utilizes Bluetooth wireless communication technology, eliminating the need for manual relay operation and improving efficiency. It also replaces existing wired connections and employs a 32-channel test module, supporting 32-channel parallel testing and further enhancing efficiency. However, the limited interface count of the nRF52832 Bluetooth chip necessitates the addition of a monitoring microcontroller. This microcontroller feeds back the output levels of the optocouplers to the monitoring microcontroller, which in turn feeds back to the Bluetooth chip, enabling parallel power-down testing of 32 relays via Bluetooth. Simultaneously, it implements pre-test self-checks and real-time monitoring during testing, detecting relay mechanical states, Bluetooth signals, and load current changes. This ensures the stability of the 32-channel parallel testing and the authenticity of each power-down test, resolving the unreliability issues caused by hardware failure or ineffective power-down testing in existing technologies.

[0022] In this embodiment, the Bluetooth chip is an nRF52832 with 32 GPIOs, supporting Bluetooth 5.0. It is powered by a 5V USB input, stepped down to 3.3V. The clock is a 32MHz crystal oscillator. The 32 GPIOs control 32 relays. Each relay is driven by an NPN transistor (e.g., 2N3904). When the GPIO output is high (3.3V), the transistor conducts, and the relay closes (powers on); a low output opens (powers off). The relays are powered by a 12V external power supply, with a total current of approximately 640mA (32 × 20mA).

[0023] Furthermore, it also includes a PC terminal 4 and four 1-to-8 USB hubs. The PC terminal 4 is electrically connected to each of the four 1-to-8 USB hubs, and each of the 1-to-8 USB hubs is electrically connected to the eight test platforms via a USB serial port. The Bluetooth chip establishes a Bluetooth wireless communication connection with the PC terminal.

[0024] In this embodiment, the PC terminal is configured to support multi-threaded processing (e.g., an 8-core CPU, 16GB of RAM). Four 1-to-8 USB hubs, totaling 32 ports, are USB 2.0 and have independent power supplies. Each USB-to-serial cable connects to the serial debugging interface of a device (e.g., a router). Optocouplers are used to detect relay status; current sensors are used to detect load current.

[0025] Furthermore, it also includes an LED Bluetooth indicator and an SD card module. The LED Bluetooth indicator is electrically connected to the Bluetooth chip. The LED Bluetooth indicator is used for signal status indication and interacts with the nRF52832 via UART. The SD card module is electrically connected to the Bluetooth chip, specifically through an SPI interface, to record commands and action logs.

[0026] 1. Pre-test self-check, details as follows:

[0027] Relay status detection (PC817 optocoupler): Each relay is equipped with a PC817 optocoupler. The input is connected to the load side, and the output is connected to the GPIO of the STM32F030. When the relay is closed, the PC817 is turned on, and the MCU detects a low level. When the relay is open, the PC817 is turned off, and the MCU detects a high level.

[0028] The self-inspection process is as follows:

[0029] The nRF52832 sends A0FF01A0 to power on all relays. The STM32F405RGT6 detects 32 GPIOs (PC817 optocoupler outputs). If channel X is high, it displays "Channel X relay not closed". The batch command is: power on all channels as A0FF01A0; power off all channels as A0FF00FF.

[0030] Bluetooth signal detection details are as follows:

[0031] RSSI measurement: The nRF52832 periodically checks the Bluetooth signal strength to ensure that the signal strength is stable above -60dBm.

[0032] LED indicator lights:

[0033] Bluetooth connection is normal → LED stays on;

[0034] Weak signal (RSSI < -80dBm) → LED flashes slowly;

[0035] Bluetooth disconnects → LED flashes rapidly;

[0036] Current detection (ACS712 Hall current sensor), details are as follows:

[0037] When the ACS712 is connected to the ADC of the STM32F405RGT6, and the nRF52832 sends A0FF00FF, if the current is >10mA, the message "Channel X failed to power down" is displayed.

[0038] 2. The testing process is monitored in real time, as detailed below:

[0039] Power-down effect verification: After each power-down command (e.g., A00100A1) is issued, the STM32F405RGT6 immediately checks the status of the corresponding channel's PC817 (whether it is disconnected). It also checks the ACS712 current (whether it has dropped to 0mA). If the optocoupler displays "not disconnected" or the current is >10mA, the STM32F030 notifies the nRF52832 via UART to pause the test and record the anomaly. This ensures that each power-down test actually occurs and avoids "false power-downs" affecting the results.

[0040] 3. Exception handling and feedback, as detailed below:

[0041] The error messages are: "Channel X relay not closed, please replace the relay.", "Channel X current abnormal, please check the wiring.", and "Bluetooth signal weak, please adjust the position." The monitoring results are sent to the nRF52832 via UART and logged to the SD card.

[0042] This utility model has been described with reference to the above-described embodiments and accompanying drawings. However, the above embodiments are merely examples for implementing this utility model. It must be noted that the disclosed embodiments do not limit the scope of this utility model. On the contrary, modifications and equivalent provisions included in the spirit and scope of the claims are all included within the scope of this utility model.

Claims

1. A multi-channel relay power-down testing device based on a microcontroller, characterized in that: The system includes a Bluetooth chip, a monitoring microcontroller, and a 32-channel test module. Each test module includes a test platform, a current sensor, a relay, and an optocoupler. The test platform is electrically connected to the current sensor, which is electrically connected to the optocoupler via the relay. All optocouplers and all current sensors are electrically connected to the input terminals of the monitoring microcontroller. The output terminals of the monitoring microcontroller are electrically connected to the input terminals of the Bluetooth chip, and all relays are electrically connected to the output terminals of the Bluetooth chip. Each relay controls the power supply of one device. The Bluetooth chip is an nRF52832, and the monitoring microcontroller is an STM32F405RGT6.

2. The multi-channel relay power-down test device based on a microcontroller according to claim 1, characterized in that: It also includes a PC terminal and four 1-to-8 USB hubs. The PC terminal is electrically connected to each of the four 1-to-8 USB hubs, and each of the 1-to-8 USB hubs is electrically connected to eight test platforms via a USB serial port. The Bluetooth chip establishes a Bluetooth wireless communication connection with the PC terminal.

3. The multi-channel relay power-down test device based on a microcontroller according to claim 1, characterized in that: It also includes an LED Bluetooth indicator light, which is electrically connected to the Bluetooth chip.

4. The multi-channel relay power-down test device based on a microcontroller according to claim 1, characterized in that: It also includes an SD card module, which is electrically connected to the Bluetooth chip.

5. The multi-channel relay power-down test device based on a microcontroller according to claim 1, characterized in that: The optocoupler is model PC817, and the current sensor is model ACS712.