Adjustable digital direct-current power supply

By using components such as microcontrollers and button modules, the digital DC power supply design solves the problems of accuracy and complexity of traditional DC power supplies, and achieves low-cost, reliable, fast voltage switching and real-time display, which is suitable for electronic system debugging.

CN223928223UActive Publication Date: 2026-02-17JINAN GUOKE MEDICAL TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202520499052.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2026-02-17
Estimated Expiration
2035-03-20

AI Technical Summary

Technical Problem

Traditional adjustable DC power supplies suffer from output parameter deviations due to temperature drift and aging of analog devices, making it difficult to achieve high-precision adjustment. Furthermore, digital adjustable power supply solutions are complex, bulky, and costly, failing to meet the needs of complex load scenarios.

Method used

By using a microcontroller (such as the STM32F030 chip) combined with a button module, relay module, power supply module, and output and indicator alarm module, the power supply voltage can be quickly switched and displayed in real time, simplifying the circuit structure and reducing costs.

Benefits of technology

It realizes a low-cost, reliable, and fast-adjustable digital DC power supply with real-time voltage and current display and overcurrent protection functions, and is suitable for electronic system debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223928223U_ABST
    Figure CN223928223U_ABST
Patent Text Reader

Abstract

The utility model discloses an adjustable digital direct-current power supply, which comprises a microcontroller, and a key module, a relay module, a power supply module and an output and indication alarm module which are electrically connected with the microcontroller, and is characterized in that the key module is used for controlling power supply voltage switching and power supply voltage output; and the output and indication module is used for detecting and displaying the output voltage and current in real time. Rapid switching of different output voltages and power supply voltage output are achieved through the key module, a complex controller or an analog circuit does not need to be used, the circuit is simple and reliable, low in cost and convenient to use, the overcurrent protection and voltage and current real-time display functions are achieved, and a proper power supply is rapidly provided for a load when an electronic system is debugged.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The utility model relates to the technical field of adjustable power supply, concretely relates to an adjustable digital direct current power supply. BACKGROUND

[0002] As the core power supply device in electronic equipment test, industrial control and scientific research experiment, the output precision, stability and adjustability of direct current power supply directly affect the performance and reliability of terminal equipment.

[0003] Traditional adjustable direct current power supply adopts analog control technology, and the output voltage or current is adjusted through a potentiometer or a mechanical knob, and the voltage stabilizing function is realized by an analog feedback loop. However, the temperature drift and aging of analog devices will cause the output parameter to deviate, making it difficult to achieve high-precision adjustment, and the function is single, which cannot meet the demand of complex load scenarios. In recent years, some digital direct current power supplies use microcontrollers to replace analog circuits to realize digital setting and display functions. However, in the process of electronic system debugging, digital adjustable power supply is mostly continuous adjustable power supply, and the scheme is complex, bulky and high in cost. The output voltage is mostly adjusted by rotating the knob or inputting through the digital keyboard, and the adjustment process is complex and time-consuming.

[0004] Therefore, there is an urgent need for a low-cost, high-reliability, fast-adjustable digital direct current power supply. UTILITY MODEL CONTENT

[0005] The utility model provides the following technical scheme in order to solve the above technical problem:

[0006] The utility model embodiment provides a kind of adjustable digital direct current power supply, comprising: microcontroller and the key module, relay module, power module and output and indication alarm module being electrically connected with the microcontroller, the key module is used to control power voltage switching and power voltage output, the output and indication module is used to carry out real-time detection and display to output voltage and current.

[0007] In a possible implementation, the power module includes a 5V output switching power supply, a 12V output switching power supply and a 24V output switching power supply, the L port of the 5V output switching power supply, the L port of the 12V output switching power supply and the L port of the 24V output switching power supply are electrically connected with the first end of a boat-shaped switch, the second end of the boat-shaped switch is electrically connected with the L end of a 220V alternating current power input interface, the N port of the 5V output switching power supply, the N port of the 12V output switching power supply and the N port of the 24V output switching power supply are electrically connected with the N port of the 220V alternating current power input interface, the PE port of the 5V output switching power supply, the PE port of the 12V output switching power supply and the PE port of the 24V output switching power supply are electrically connected with the E port of the 220V alternating current power input interface, the V+ port of the 5V output switching power supply is electrically connected with a 5V power supply, the V+ port of the 12V output switching power supply is electrically connected with a 12V power supply, the V+ port of the 24V output switching power supply is electrically connected with a 24V power supply, the V- port of the 5V output switching power supply, the V- port of the 12V output switching power supply and the V- port of the 24V output switching power supply are grounded.

[0008] In a possible implementation, the microcontroller adopts an STM32F030 chip, a VIN port of the STM32F030 chip is electrically connected with a first end of a first capacitor, a first end of a second capacitor and a 5V power supply respectively, a VOUT port of the STM32F030 chip is electrically connected with a first end of a third capacitor, a first end of a fourth capacitor and a 3.3V power supply respectively, a VDD port of the STM32F030 chip is electrically connected with a first end of a fifth capacitor, a first end of a sixth capacitor, a first end of a seventh capacitor, a first end of a first inductor and a 3.3V power supply respectively, a second end of the first inductor is electrically connected with a first end of an eighth capacitor and a VDDA port of the STM32F030 chip respectively, a PF0 port of the STM32F030 chip is electrically connected with a first end of a ninth capacitor and a first end of a first crystal oscillator respectively, a second end of the first crystal oscillator is electrically connected with a PF1 port of the STM32F030 chip and a first end of a tenth capacitor respectively, a BOOT0 port of the STM32F030 chip is electrically connected with a first end of a first resistor, a NRST port of the STM32F030 chip is electrically connected with a first end of a second resistor and a first end of an eleventh capacitor respectively, a second end of the second resistor is electrically connected with the 3.3V power supply, a PA13 port of the STM32F030 chip is electrically connected with a second end of a SWD port, a PA14 port of the STM32F030 chip is electrically connected with a third end of the SWD port, a first end of the SWD port is electrically connected with the 3.3V power supply, a TAB port, a VSS port, a VSSA port, a GND port, second ends of the first capacitor to the eleventh capacitor, a second end of the first resistor, a fourth end of the SWD port of the STM32F030 chip are grounded.

[0009] In a possible implementation, the relay module includes a first optocoupler, a first port of the first optocoupler is electrically connected with a first end of a third resistor, a second end of the third resistor is electrically connected with a 3.3V power supply, a second port of the first optocoupler is electrically connected with a PB0 port of the STM32F030 chip, a fourth port of the first optocoupler is electrically connected with a first end of a second inductor, a second end of the second inductor is electrically connected with a first port of a first relay and a positive electrode of a first zener diode respectively, a negative electrode of the first zener diode is electrically connected with a first end of a third inductor and a fourth port of the first relay respectively, a second end of the third inductor and a third port of the first relay are electrically connected with a 5V power supply, a second port of the first relay is electrically connected with a second port of a second relay, a second port of a third relay and a third port of a fourth relay respectively, a third port of the second relay is electrically connected with a 12V power supply, a first port of the second relay is electrically connected with a first end of a fourth inductor and a positive electrode of a second zener diode respectively, a negative electrode of the second zener diode is electrically connected with a first end of a fifth inductor and a fourth port of the second relay respectively, a second end of the fifth inductor is electrically connected with a 5V power supply, a second end of the fourth inductor is electrically connected with a fourth port of a second optocoupler, a first port of the second optocoupler is electrically connected with a first end of a fourth resistor, a second end of the fourth resistor is electrically connected with a 3.3V power supply, a second port of the second optocoupler is electrically connected with a PB1 port of the STM32F030 chip, a third port of the third relay is electrically connected with a 24V power supply, a first port of the third relay is electrically connected with a first end of a sixth inductor and a positive electrode of a third zener diode respectively, a negative electrode of the third zener diode is electrically connected with a first end of a seventh inductor and a fourth port of the third relay respectively, a second end of the seventh inductor is electrically connected with a 5V power supply, a second end of the sixth inductor is electrically connected with a fourth port of a third optocoupler, a first port of the third optocoupler is electrically connected with a first end of a fifth resistor, a second end of the fifth resistor is electrically connected with a 3.3V power supply, a second port of the third optocoupler is electrically connected with a PB2 port of the STM32F030 chip, a first port of the fourth relay is electrically connected with a first end of an eighth inductor and a positive electrode of a fourth zener diode respectively, a second port of the fourth relay is electrically connected with a + terminal of a power output port P2, a negative electrode of the fourth zener diode is electrically connected with a first end of a ninth inductor and a fourth port of the fourth relay respectively, a second end of the ninth inductor is electrically connected with a 5V power supply, a second end of the eighth inductor is electrically connected with a fourth port of a fourth optocoupler, a first port of the fourth optocoupler is electrically connected with a first end of a sixth resistor, a second end of the sixth resistor is electrically connected with a 3.3V power supply is electrically connected, the second port of the fourth optocoupler is electrically connected with the PB3 port of the STM32F030 chip, and the third port of the first optocoupler, the third port of the second optocoupler, the third port of the third optocoupler and the third port of the fourth optocoupler are grounded.

[0010] In a possible implementation, the key module includes a fifth optocoupler and a sixth optocoupler, the first port of the fifth optocoupler is electrically connected with the first end of the seventh resistor, the second port of the fifth optocoupler is electrically connected with the first end of the first button, the third port of the fifth optocoupler is respectively electrically connected with the first end of the eighth resistor, the first end of the twelfth capacitor and the PA2 port of the STM32F030 chip, the first port of the sixth optocoupler is electrically connected with the first end of the ninth resistor, the second port of the sixth optocoupler is electrically connected with the first end of the second button, the third port of the sixth optocoupler is respectively electrically connected with the first end of the tenth resistor, the first end of the thirteenth capacitor and the PA3 port of the STM32F030 chip, the fourth port of the fifth optocoupler and the fourth port of the sixth optocoupler are electrically connected with 3.3V power supply, the second end of the seventh resistor and the second end of the ninth resistor are electrically connected with 5V power supply, and the second end of the first button, the second end of the eighth resistor, the second end of the twelfth capacitor, the second end of the second button, the second end of the tenth resistor and the second end of the thirteenth capacitor are grounded.

[0011] In a possible implementation, the output and indication alarm module includes a buzzer module, an indication module and a current detection module, the buzzer module includes a buzzer, the first end of the buzzer is electrically connected with 5V power supply, the second end of the buzzer is electrically connected with the collector of the first triode, the base of the first triode is respectively electrically connected with the first end of the eleventh resistor and the first end of the twelfth resistor, the second end of the eleventh resistor is electrically connected with the PB4 port of the STM32F030 chip, the emitter of the first triode and the second end of the twelfth resistor are grounded.

[0012] In a possible implementation, the indication module comprises a three-color light LED, a positive electrode of the three-color light LED is electrically connected with a first end of a thirteenth resistor, a first end of a fourteenth resistor and a first end of a fifteenth resistor respectively, a second end of the thirteenth resistor is electrically connected with a PB5 port of the STM32F030 chip, a second end of the fourteenth resistor is electrically connected with a PB6 port of the STM32F030 chip, a second end of the fifteenth resistor is electrically connected with a PB7 port of the STM32F030 chip, a negative electrode of the three-color light LED is grounded, a positive electrode of a first light-emitting diode is electrically connected with a first end of a sixteenth resistor, and a second end of the sixteenth resistor is electrically connected with a PA4 port of the STM32F030 chip.

[0013] In a possible implementation, the current detection module comprises a first operational amplifier, a positive input end of the first operational amplifier is electrically connected with a first end of a seventeenth resistor and a first end of an eighteenth resistor respectively, a negative input end of the first operational amplifier is electrically connected with a first end of a nineteenth resistor and a first end of a twentieth resistor respectively, a second end of the seventeenth resistor is electrically connected with an I+ port of a voltage-current meter head and a - terminal of a power output port P2 respectively, a second end of the twentieth resistor is electrically connected with an output end of the first operational amplifier and a PA0 port of the STM32F030 chip respectively, a V+ port of the voltage-current meter head is electrically connected with a + terminal of the power output port P2 and a first end of a twenty-first resistor respectively, a second end of the twenty-first resistor is electrically connected with a first end of a twenty-second resistor and a first end of a twenty-third resistor respectively, a second end of the twenty-second resistor is electrically connected with a positive input end of a second operational amplifier, a negative input end of the second operational amplifier is electrically connected with a first end of a twenty-fourth resistor and a first end of a twenty-fifth resistor respectively, a second end of the twenty-fifth resistor is electrically connected with an output end of the second operational amplifier and a PA1 port of the STM32F030 chip respectively, a second end of the eighteenth resistor, a second end of the nineteenth resistor, an I- port of the voltage-current meter head, a V- port of the voltage-current meter head are grounded, and a second end of the twenty-third resistor and a second end of the twenty-fourth resistor are grounded.

[0014] Compared with the prior art, the utility model has the advantages that:

[0015] The utility model discloses a button module realizes the quick switching of different output voltage and power voltage output, need not using complex controller or analog circuit, and the circuit is simple and reliable, low in cost, convenient to use, and has overcurrent protection and voltage current real -time display function, provides the suitable power for load quickly when carrying out electronic system debugging. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 A module schematic diagram of the adjustable digital DC power supply provided by the embodiment of the utility model;

[0017] Figure 2 A whole circuit schematic diagram of the adjustable digital DC power supply provided by the embodiment of the utility model;

[0018] Figure 3 A circuit schematic diagram of the power module provided by the embodiment of the utility model;

[0019] Figure 4 A circuit schematic diagram of the microcontroller provided by the embodiment of the utility model;

[0020] Figure 5 A circuit schematic diagram of the relay module provided by the embodiment of the utility model

[0021] Figure 6 A circuit schematic diagram of the key module provided by the embodiment of the utility model

[0022] Figure 7 A circuit schematic diagram of the output and indication alarm module provided by the embodiment of the utility model. Specific implementation

[0023] The present scheme will be described below in combination with the accompanying drawings and specific implementation.

[0024] Figure 1 A module schematic diagram of the adjustable digital DC power supply provided by the embodiment of the utility model, refer to Figure 1 The adjustable digital DC power supply in the embodiment comprises a microcontroller and a key module, a relay module, a power module and an output and indication alarm module electrically connected with the microcontroller, wherein the key module is used for controlling power voltage switching and power voltage output, and the output and indication module is used for real-time detection and display of output voltage and current.

[0025] Refer to Figure 2The overall circuit schematic of the adjustable digital direct-current power supply provided in the embodiment of the application is shown in the figure, P1 is a 220V alternating-current power supply input, and is connected to three AC-DC power supply modules of 5V, 12V and 24V after a boat-shaped switch, the power of the three power supply modules is 100W, 120W and 120W respectively, the maximum output current thereof is 20A, 10A and 5A respectively, and the system 5V power supply is provided by the 5V AC-DC module; the contacts of the relays K1, K2, K3 and K4 are all normally open contacts; the photoelectric couplers T1, T2, T3, T4, T5 and T6 are switch-type photoelectric couplers; U1 is an STM32F030 microcontroller; D1 is a red-yellow-blue three-color LED, and D2 is a green LED; TD1 is a voltage and current detection and display circuit board, which can display the output voltage and current value in real time, and can also sample the output voltage and output current; and BP1 is an alarm buzzer.

[0026] Referring to Figure 3 The power supply module in the embodiment includes a 5V output switching power supply PWR1, a 12V output switching power supply PWR2 and a 24V output switching power supply PWR3, wherein the L port of the 5V output switching power supply, the L port of the 12V output switching power supply and the L port of the 24V output switching power supply are all electrically connected with the first end of the boat-shaped switch SW1, the second end of the boat-shaped switch SW1 is electrically connected with the L end of the 220V alternating-current power supply input interface, the N port of the 5V output switching power supply, the N port of the 12V output switching power supply and the N port of the 24V output switching power supply are all electrically connected with the N port of the 220V alternating-current power supply input interface, the PE port of the 5V output switching power supply, the PE port of the 12V output switching power supply and the PE port of the 24V output switching power supply are all electrically connected with the E port of the 220V alternating-current power supply input interface, the V+ port of the 5V output switching power supply is electrically connected with the 5V power supply, the V+ port of the 12V output switching power supply is electrically connected with the 12V power supply, the V+ port of the 24V output switching power supply is electrically connected with the 24V power supply, and the V- port of the 5V output switching power supply, the V- port of the 12V output switching power supply and the V- port of the 24V output switching power supply are grounded.

[0027] Referring to Figure 4The microcontroller in the embodiment adopts an STM32F030 chip, a first end of a first capacitor C1, a first end of a second capacitor C2 and a 5V power supply are electrically connected with a VIN port of the STM32F030 chip, a first end of a third capacitor C3, a first end of a fourth capacitor C4 and a 3.3V power supply are electrically connected with a VOUT port of the STM32F030 chip, a first end of a fifth capacitor C5, a first end of a sixth capacitor C6, a first end of a seventh capacitor C7, a first end of a first inductor L9 and a 3.3V power supply are electrically connected with a VDD port of the STM32F030 chip, a second end of the first inductor L9 is electrically connected with a first end of an eighth capacitor C8 and a VDDA port of the STM32F030 chip, a PF0 port of the STM32F030 chip is electrically connected with a first end of a ninth capacitor C10 and a first end of a first crystal oscillator X1, a second end of the first crystal oscillator X1 is electrically connected with a PF1 port of the STM32F030 chip and a first end of a tenth capacitor C9, a BOOT0 port of the STM32F030 chip is electrically connected with a first end of a first resistor R9, a NRST port of the STM32F030 chip is electrically connected with a first end of a second resistor R10 and a first end of an eleventh capacitor C11, a second end of the second resistor R10 is electrically connected with a 3.3V power supply, a PA13 port of the STM32F030 chip is electrically connected with a second end of a SWD port, a PA14 port of the STM32F030 chip is electrically connected with a third end of the SWD port, a first end of the SWD port is electrically connected with a 3.3V power supply, a TAB port, a VSS port, a VSSA port, a GND port, second ends of the first capacitor C1 to the eleventh capacitor C11, a second end of the first resistor R9, a fourth end of the SWD port of the STM32F030 chip are grounded.

[0028] Referring to Figure 5The relay module in the embodiment includes a first optocoupler T1, a first port of the first optocoupler T1 is electrically connected with a first end of a third resistor R1, a second end of the third resistor R1 is electrically connected with a 3.3V power supply, a second port of the first optocoupler T1 is electrically connected with a PB0 port of the STM32F030 chip, a fourth port of the first optocoupler T1 is electrically connected with a first end of a second inductor L2, a second end of the second inductor L2 is respectively electrically connected with a first port of a first relay K1 and a positive electrode of a first voltage stabilizing diode D3, a negative electrode of the first voltage stabilizing diode D3 is respectively electrically connected with a first end of a third inductor L1 and a fourth port of the first relay K1, a second end of the third inductor L1 and a third port of the first relay K1 are both electrically connected with a 5V power supply, a second port of the first relay K1 is respectively electrically connected with a second port of a second relay K2, a second port of a third relay K3 and a third port of a fourth relay K4, a third port of the second relay K2 is electrically connected with a 12V power supply, a first port of the second relay K2 is respectively electrically connected with a first end of a fourth inductor L4 and a positive electrode of a second voltage stabilizing diode D4, a negative electrode of the second voltage stabilizing diode D4 is respectively electrically connected with a first end of a fifth inductor L3 and a fourth port of the second relay K2, a second end of the fifth inductor L3 is electrically connected with a 5V power supply, a second end of the fourth inductor L4 is electrically connected with a fourth port of a second optocoupler T2, a first port of the second optocoupler T2 is electrically connected with a first end of a fourth resistor R2, a second end of the fourth resistor R2 is electrically connected with a 3.3V power supply, a second port of the second optocoupler T2 is electrically connected with a PB1 port of the STM32F030 chip, a third port of the third relay K3 is electrically connected with a 24V power supply, a first port of the third relay K3 is respectively electrically connected with a first end of a sixth inductor L6 and a positive electrode of a third voltage stabilizing diode D5, a negative electrode of the third voltage stabilizing diode D5 is respectively electrically connected with a first end of a seventh inductor L5 and a fourth port of the third relay K3, a second end of the seventh inductor L5 is electrically connected with a 5V power supply, a second end of the sixth inductor L6 is electrically connected with a fourth port of a third optocoupler T3, a first port of the third optocoupler T3 is electrically connected with a first end of a fifth resistor R3, a second end of the fifth resistor R3 is electrically connected with a 3.3V power supply is electrically connected, the second port of the third optocoupler T3 is electrically connected with the PB2 port of the STM32F030 chip, the first port of the fourth relay K4 is respectively electrically connected with the first end of the eighth inductor L8 and the anode of the fourth voltage stabilizing diode D6, the second port of the fourth relay K4 is electrically connected with the + terminal of the power output P2, the cathode of the fourth voltage stabilizing diode D6 is respectively electrically connected with the first end of the ninth inductor L7 and the fourth port of the fourth relay K4, the second end of the ninth inductor L7 is electrically connected with the 5V power supply, the second end of the eighth inductor L8 is electrically connected with the fourth port of the fourth optocoupler T4, the first port of the fourth optocoupler T4 is electrically connected with the first end of the sixth resistor R4, the second end of the sixth resistor R4 is electrically connected with the 3.3V power supply, the second port of the fourth optocoupler T4 is electrically connected with the PB3 port of the STM32F030 chip, the third port of the first optocoupler T1, the third port of the second optocoupler T2, the third port of the third optocoupler T3 and the third port of the fourth optocoupler T4 are grounded. When the RY1 port is pulled low, the output of the first optocoupler T1 is turned on, the first relay K1 coil is energized, and the contact is attracted. Similarly, when the RY2 / RY3 / RY4 port is pulled low, the corresponding relay K2 / K3 / K4 contact is attracted; when K1 is attracted, the voltage is switched to +5V, when K2 is attracted, the voltage is switched to +12V, when K3 is attracted, the voltage is switched to +24V, and when K4 is attracted, the power output is turned on.

[0029] Referring to Figure 6The key module in the embodiment includes a fifth optoelectronic coupler T5 and a sixth optoelectronic coupler T6. A first port of the fifth optoelectronic coupler T5 is electrically connected with a first end of a seventh resistor R11. A second port of the fifth optoelectronic coupler T5 is electrically connected with a first end of a first button S1. A third port of the fifth optoelectronic coupler T5 is electrically connected with a first end of an eighth resistor R12, a first end of a twelfth capacitor C12 and a PA2 port of the STM32F030 chip respectively. A first port of the sixth optoelectronic coupler T6 is electrically connected with a first end of a ninth resistor R13. A second port of the sixth optoelectronic coupler T6 is electrically connected with a first end of a second button S2. A third port of the sixth optoelectronic coupler T6 is electrically connected with a first end of a tenth resistor R14, a first end of a thirteenth capacitor C13 and a PA3 port of the STM32F030 chip respectively. A fourth port of the fifth optoelectronic coupler T5 and a fourth port of the sixth optoelectronic coupler T6 are electrically connected with a 3.3V power supply. A second end of the seventh resistor R11 and a second end of the ninth resistor R13 are electrically connected with a 5V power supply. A second end of the first button S1, a second end of the eighth resistor R12, a second end of the twelfth capacitor C12, a second end of the second button S2, a second end of the tenth resistor R14 and a second end of the thirteenth capacitor C13 are grounded.

[0030] Referring to Figure 7The output and indication alarm module in the embodiment comprises a buzzer module, an indication module and a current detection module. The buzzer module comprises a buzzer BP1, the first end of which is electrically connected with a 5V power supply, and the second end of which is electrically connected with the collector of a first triode Q1, the base of which is electrically connected with the first end of an eleventh resistor R15 and the first end of a twelfth resistor R16, respectively, the second end of the eleventh resistor R15 is electrically connected with the PB4 port of the STM32F030 chip, and the emitter of the first triode Q1 and the second end of the twelfth resistor R16 are grounded. The indication module comprises a three-color light LED, the positive electrode of which is electrically connected with the first end of a thirteenth resistor R17, the first end of a fourteenth resistor R18 and the first end of a fifteenth resistor R19, respectively, the second end of the thirteenth resistor R17 is electrically connected with the PB5 port of the STM32F030 chip, the second end of the fourteenth resistor R18 is electrically connected with the PB6 port of the STM32F030 chip, the second end of the fifteenth resistor R19 is electrically connected with the PB7 port of the STM32F030 chip, the negative electrode of the three-color light LED is grounded, the positive electrode of a first light emitting diode D2 is electrically connected with the first end of a sixteenth resistor R20, and the second end of the sixteenth resistor R20 is electrically connected with the PA4 port of the STM32F030 chip.The current detection module comprises a first operational amplifier U3, a positive input end of the first operational amplifier U3 is electrically connected with a first end of a seventeenth resistor R5 and a first end of an eighteenth resistor R8 respectively, a negative input end of the first operational amplifier U3 is electrically connected with a first end of a nineteenth resistor R6 and a first end of a twentieth resistor R7 respectively, a second end of the seventeenth resistor R5 is electrically connected with an I+ port of a voltage and current meter head TD1 and a - terminal of a power output port P2 respectively, a second end of the twentieth resistor R7 is electrically connected with an output end of the first operational amplifier U3 and a PA0 port of the STM32F030 chip respectively, a V+ port of the voltage and current meter head TD1 is electrically connected with a + terminal of the power output port P2 and a first end of a twenty-first resistor R24 respectively, a second end of the twenty-first resistor R24 is electrically connected with a first end of a twenty-second resistor R23 and a first end of a twenty-third resistor R25 respectively, a second end of the twenty-second resistor R23 is electrically connected with a positive input end of a second operational amplifier U4, a negative input end of the second operational amplifier U4 is electrically connected with a first end of a twenty-fourth resistor R21 and a first end of a twenty-fifth resistor R22 respectively, a second end of the twenty-fifth resistor R22 is electrically connected with an output end of the second operational amplifier U4 and a PA1 port of the STM32F030 chip respectively, a second end of the eighteenth resistor R8, a second end of the nineteenth resistor R6, an I- port of the voltage and current meter head TD1, a V- port of the voltage and current meter head TD1 are grounded, a second end of the twenty-third resistor R25 and a second end of the twenty-fourth resistor R21 are grounded. In the embodiment, SBK is connected with an SBK port of the microcontroller, when the port outputs a high level, Q1 is turned on, the buzzer emits an alarm sound, D1 is a three-color light LED, RED\GER\YEL is connected with a RED\GER\YEL port of the microcontroller respectively, when the corresponding port outputs a high level, the corresponding color of D1 is lighted; B, U is connected with a BLU port of the microcontroller, when the BLU port outputs a high level, D2 is lighted; TD1 is a voltage and current meter head, can display output voltage and current, V+ is connected with V+ and I+ of TD1, I- of TD1 is connected with a + terminal of the output end P2, - terminal of P2 is connected with a system ground GND.

[0031] In this embodiment, when the input ship switch SW1 is turned on, the system enters the initialization state, first, the state self-checking is carried out, the self-checking process is: U1 first samples the voltage and current value in the initial state through the internal analog-to-digital converter (ADC), if it is not zero, then BP1 beeps alarm, if they are all zero, then continue, then U1 controls K1 to be turned on by outputting high level through GPIO, and D1 is lit red, TD1 displays 5.00V / 0.00A, after 2s delay, U1 controls K1 to be turned off by outputting low level through GPIO, after 20ms delay, U1 controls K2 to be turned on by outputting high level through GPIO, and D1 is lit yellow, TD1 displays 12.00V / 0.00A, after 2s delay, U1 controls K2 to be turned off by outputting low level through GPIO, after 20ms delay, U1 controls K3 to be turned on by outputting high level through GPIO, and D1 is lit blue, TD1 displays 24.00V / 0.00A, after 2s delay, U1 controls K3 to be turned off by outputting low level through GPIO, after 20ms delay, U1 controls K1 to be turned on by outputting high level through GPIO, and D1 is lit red, TD1 displays 5.00V / 0.00A, the self-checking is completed.

[0032] After the self-checking is completed, the system enters the main loop, and the buttons S1 and S2 are monitored in real time, and the voltage and current sampling values fed back by TD1 are monitored, when S1 is pressed and released, U1 controls K1 to be turned off, after 20ms delay, U1 controls K2 to be turned on, when S1 is pressed again and released, U1 controls K2 to be turned off, after 20ms delay, U1 controls K3 to be turned on, when S1 is pressed again and released, U1 controls K3 to be turned off, after 20ms delay, U1 controls K1 to be turned on, and the cycle is repeated; when S2 is pressed and released, U1 controls K4 to be turned on, and D2 is lit at this time, at this time, P2 outputs the current selected voltage, and the current voltage and current are detected through TD1, when the current value detected by MCU is greater than the maximum output current of the current selected voltage or when the voltage value exceeds the current selected voltage value by ±10%, U1 controls K4 to be turned off and D2 to be extinguished, and the functions of overcurrent protection and overvoltage protection are realized.

[0033] It should be noted that, in the present document, relational terms such as“first” and“second”, and the like, can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms“comprises”,“comprising”, or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by“comprises... a” does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0034] The above merely illustrates the specific embodiments of the present application, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which shall be covered in the protection range of the present application. The protection range of the present application shall be subject to the protection range of the claims.

Claims

1. An adjustable digital DC power supply, characterized by, It includes a microcontroller and a key module, a relay module, a power module and an output and indication alarm module electrically connected with the microcontroller, the key module is used for controlling power voltage switching and power voltage output, and the output and indication module is used for real-time detection and display of output voltage and current.

2. The adjustable digital DC power supply of claim 1, wherein, The power module includes a 5V output switching power supply, a 12V output switching power supply and a 24V output switching power supply, the L port of the 5V output switching power supply, the L port of the 12V output switching power supply and the L port of the 24V output switching power supply are electrically connected with the first end of a boat-shaped switch, the second end of the boat-shaped switch is electrically connected with the L end of a 220V alternating current power input interface, the N port of the 5V output switching power supply, the N port of the 12V output switching power supply and the N port of the 24V output switching power supply are electrically connected with the N port of the 220V alternating current power input interface, the PE port of the 5V output switching power supply, the PE port of the 12V output switching power supply and the PE port of the 24V output switching power supply are electrically connected with the E port of the 220V alternating current power input interface, the V+ port of the 5V output switching power supply is electrically connected with a 5V power supply, the V+ port of the 12V output switching power supply is electrically connected with a 12V power supply, the V+ port of the 24V output switching power supply is electrically connected with a 24V power supply, the V- port of the 5V output switching power supply, the V- port of the 12V output switching power supply and the V- port of the 24V output switching power supply are grounded.

3. The adjustable digital DC power supply of claim 1, wherein, The microcontroller adopts an STM32F030 chip, the VIN port of the STM32F030 chip is electrically connected with the first end of a first capacitor, the first end of a second capacitor and a 5V power supply respectively, the VOUT port of the STM32F030 chip is electrically connected with the first end of a third capacitor, the first end of a fourth capacitor and a 3.3V power supply respectively, the VDD port of the STM32F030 chip is electrically connected with the first end of a fifth capacitor, the first end of a sixth capacitor, the first end of a seventh capacitor, the first end of a first inductor and a 3.3V power supply respectively, the second end of the first inductor is electrically connected with the first end of an eighth capacitor and the VDDA port of the STM32F030 chip respectively, the PF0 port of the STM32F030 chip is electrically connected with the first end of a ninth capacitor and the first end of a first crystal oscillator respectively, the second end of the first crystal oscillator is electrically connected with the PF1 port of the STM32F030 chip and the first end of a tenth capacitor respectively, the BOOT0 port of the STM32F030 chip is electrically connected with the first end of a first resistor, the NRST port of the STM32F030 chip is electrically connected with the first end of a second resistor and the first end of an eleventh capacitor respectively, the second end of the second resistor is electrically connected with a 3.3V power supply, the PA13 port of the STM32F030 chip is electrically connected with the second end of a SWD port, the PA14 port of the STM32F030 chip is electrically connected with the third end of the SWD port, the first end of the SWD port is electrically connected with a 3.3V power supply, the TAB port, the VSS port, the VSSA port, the GND port, the second ends of the first capacitor to the eleventh capacitor, the second end of the first resistor and the fourth end of the SWD port of the STM32F030 chip are grounded.

4. The adjustable digital DC power supply of claim 1, wherein, The relay module comprises a first optocoupler, a first port of the first optocoupler is electrically connected with a first end of a third resistor, a second end of the third resistor is electrically connected with a 3.3V power supply, a second port of the first optocoupler is electrically connected with a PB0 port of the STM32F030 chip, a fourth port of the first optocoupler is electrically connected with a first end of a second inductor, a second end of the second inductor is electrically connected with a first port of a first relay and a positive electrode of a first zener diode respectively, a negative electrode of the first zener diode is electrically connected with a first end of a third inductor and a fourth port of the first relay respectively, a second end of the third inductor and a third port of the first relay are electrically connected with a 5V power supply, a second port of the first relay is electrically connected with a second port of a second relay, a second port of a third relay and a third port of a fourth relay respectively, a third port of the second relay is electrically connected with a 12V power supply, a first port of the second relay is electrically connected with a first end of a fourth inductor and a positive electrode of a second zener diode respectively, a negative electrode of the second zener diode is electrically connected with a first end of a fifth inductor and a fourth port of the second relay respectively, a second end of the fifth inductor is electrically connected with a 5V power supply, a second end of the fourth inductor is electrically connected with a fourth port of a second optocoupler, a first port of the second optocoupler is electrically connected with a first end of a fourth resistor, a second end of the fourth resistor is electrically connected with a 3.3V power supply, a second port of the second optocoupler is electrically connected with a PB1 port of the STM32F030 chip, a third port of the third relay is electrically connected with a 24V power supply, a first port of the third relay is electrically connected with a first end of a sixth inductor and a positive electrode of a third zener diode respectively, a negative electrode of the third zener diode is electrically connected with a first end of a seventh inductor and a fourth port of the third relay respectively, a second end of the seventh inductor is electrically connected with a 5V power supply, a second end of the sixth inductor is electrically connected with a fourth port of a third optocoupler, a first port of the third optocoupler is electrically connected with a first end of a fifth resistor, a second end of the fifth resistor is electrically connected with a 3.3V power supply, a second port of the third optocoupler is electrically connected with a PB2 port of the STM32F030 chip, a first port of the fourth relay is electrically connected with a first end of an eighth inductor and a positive electrode of a fourth zener diode respectively, a second port of the fourth relay is electrically connected with a + terminal of a power output port P2, a negative electrode of the fourth zener diode is electrically connected with a first end of a ninth inductor and a fourth port of the fourth relay respectively, a second end of the ninth inductor is electrically connected with a 5V power supply, a second end of the eighth inductor is electrically connected with a fourth port of a fourth optocoupler, a first port of the fourth optocoupler is electrically connected with a first end of a sixth resistor, a second end of the sixth resistor is electrically connected with a 3.3V power supply is connected, the second port of the fourth optoelectronic coupler is connected with the PB3 port of the STM32F030 chip, and the third port of the first optoelectronic coupler, the third port of the second optoelectronic coupler, the third port of the third optoelectronic coupler and the third port of the fourth optoelectronic coupler are grounded.

5. The adjustable digital DC power supply of claim 1, wherein, The key module comprises a fifth optoelectronic coupler and a sixth optoelectronic coupler, the first port of the fifth optoelectronic coupler is electrically connected with the first end of a seventh resistor, the second port of the fifth optoelectronic coupler is electrically connected with the first end of a first button, the third port of the fifth optoelectronic coupler is electrically connected with the first end of an eighth resistor, the first end of a twelfth capacitor and the PA2 port of the STM32F030 chip respectively, the first port of the sixth optoelectronic coupler is electrically connected with the first end of a ninth resistor, the second port of the sixth optoelectronic coupler is electrically connected with the first end of a second button, the third port of the sixth optoelectronic coupler is electrically connected with the first end of a tenth resistor, the first end of a thirteenth capacitor and the PA3 port of the STM32F030 chip respectively, the fourth port of the fifth optoelectronic coupler and the fourth port of the sixth optoelectronic coupler are electrically connected with a 3.3V power supply, the second end of the seventh resistor and the second end of the ninth resistor are electrically connected with a 5V power supply, the second end of the first button, the second end of the eighth resistor, the second end of the twelfth capacitor, the second end of the second button, the second end of the tenth resistor and the second end of the thirteenth capacitor are grounded.

6. The adjustable digital DC power supply of claim 1, wherein, The output and indication alarm module includes a buzzer module, an indication module and a current detection module, the buzzer module includes a buzzer, the first end of the buzzer is electrically connected with a 5V power supply, the second end of the buzzer is electrically connected with the collector of a first triode, the base of the first triode is electrically connected with the first end of an eleventh resistor and the first end of a twelfth resistor respectively, the second end of the eleventh resistor is electrically connected with the PB4 port of the STM32F030 chip, the emitter of the first triode and the second end of the twelfth resistor are grounded.

7. The adjustable digital DC power supply of claim 6, wherein, The indication module includes a three-color light LED, the positive electrode of the three-color light LED is electrically connected with the first end of a thirteenth resistor, the first end of a fourteenth resistor and the first end of a fifteenth resistor respectively, the second end of the thirteenth resistor is electrically connected with the PB5 port of the STM32F030 chip, the second end of the fourteenth resistor is electrically connected with the PB6 port of the STM32F030 chip, the second end of the fifteenth resistor is electrically connected with the PB7 port of the STM32F030 chip, the negative electrode of the three-color light LED and the negative electrode of a first light emitting diode are grounded, the positive electrode of the first light emitting diode is electrically connected with the first end of a sixteenth resistor, the second end of the sixteenth resistor is electrically connected with the PA4 port of the STM32F030 chip.

8. The adjustable digital DC power supply of claim 6, wherein, The current detection module includes a first operational amplifier, the positive input end of the first operational amplifier is electrically connected with the first end of a seventeenth resistor and the first end of an eighteenth resistor respectively, the negative input end of the first operational amplifier is electrically connected with the first end of a nineteenth resistor and the first end of a twentieth resistor respectively, the second end of the seventeenth resistor is electrically connected with the I+ port of a voltage and current meter head and the - terminal of a power output port P2 respectively, the second end of the twentieth resistor is electrically connected with the output end of the first operational amplifier and the PA0 port of the STM32F030 chip respectively, the V+ port of the voltage and current meter head is electrically connected with the + terminal of the power output port P2 and the first end of a twenty-first resistor respectively, the second end of the twenty-first resistor is electrically connected with the first end of a twenty-second resistor and the first end of a twenty-third resistor respectively, the second end of the twenty-second resistor is electrically connected with the positive input end of a second operational amplifier, the negative input end of the second operational amplifier is electrically connected with the first end of a twenty-fourth resistor and the first end of a twenty-fifth resistor respectively, the second end of the twenty-fifth resistor is electrically connected with the output end of the second operational amplifier and the PA1 port of the STM32F030 chip respectively, the second end of the eighteenth resistor, the second end of the nineteenth resistor, the I- port of the voltage and current meter head, the V- port of the voltage and current meter head are grounded, and the second end of the twenty-third resistor and the second end of the twenty-fourth resistor are grounded.