Measurement circuit for power supply

A measurement circuit includes a switch unit with a number of keys selectively pressed to output different resistance regulating signals. A resistance setting circuit receives the resistance regulating signals and connects different resistances to a control circuit. The control circuit obtains a voltage according to the chosen resistance by the resistance setting circuit and compares the voltage with a preset voltage. If the voltage is greater than the preset voltage, the control circuit outputs a high level signal to a control pin of a pulse width modulation (PWM) controller, to control a voltage unit to output a voltage. If the voltage is less than the preset voltage, the control circuit outputs a low level signal to the control pin of the PWM controller, to control the voltage unit to not output a voltage. A display unit displays the chosen resistance.

BACKGROUND

1. Field of the Invention

The present disclosure relates to measurement circuits, and particularly to a measurement circuit providing over-temperature protection to a power supply.

2. Description of Related Art

Over-temperature protection in a power supply is provided by connecting different resistors to the power supply manually, to generate optimal resistance for over-temperature protection. However, the resistors must be individually soldered to corresponding locations, which is inconvenient and time-consuming.

DETAILED DESCRIPTION

The disclosure, including the drawings, is illustrated by way of example and not by limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.

Referring toFIG. 1toFIG. 3, a measurement circuit100is configured to provide over-temperature protection for a power supply (not shown). The measurement circuit100in accordance with an exemplary embodiment includes a switch unit110, a resistance setting circuit120, a control circuit130, and a display unit140. The switch unit110is configured to output resistance regulating signals to the resistance setting circuit120. The resistance setting circuit120is configured to connect different resistances to the control circuit130according to the received resistance regulating signals. The control circuit130is configured to output control signals to a pulse width modulation (PWM) controller200according to the different resistances, to make the PWM controller200control work states of a voltage unit300of the power supply. The resistance setting circuit120controls the display unit140to display the resistances.

The resistance setting circuit120includes a microcontroller U1, a digital regulation resistance U2, a resistor R4, capacitors C1-C5, and a crystal oscillator X1. A voltage pin VDD of the microcontroller U1is connected to a power source VCC and also grounded through the resistor R4and the capacitor C2connected in series. A voltage pin MP of the microcontroller U1is connected to a node between the resistor R4and the capacitor C2. The capacitor C1is connected between the power source VCC and ground. A clock pin OCS1of the microcontroller U1is grounded through the capacitor C3. A clock pin OCS2of the microcontroller U1is grounded through the capacitor C4. The crystal oscillator X1is connected between the clock pins OCS1and OCS2of the microcontroller U1. Output pins RB7-RB4of the microcontroller U1are respectively connected to input pins A0-A3of the digital regulation resistance U2. An output pin RB3of the microcontroller U1is connected to a clock pin SCL of the digital regulation resistance U2. An output pin RB2of the microcontroller U1is connected to a data pin SDA of the digital regulation resistance U2. A voltage pin VCC of the digital regulation resistance U2is connected to a power source P5V0and also grounded through the capacitor C5. Output pins VW1, VL1, VW0, VL0of the digital regulation resistance U2are connected to the control circuit130. Output pins RA2-RA5and RC0-RC2of the microcontroller U1are connected to the display unit140. In one embodiment, the microcontroller U1is a PIC16F73 microcontroller, and the digital regulation resistance U2is an X9241 digital regulation resistance.

The control circuit130includes a comparator U3, a diode D1, a thermal resistor RT, resistors R5-R7, and capacitors C6and C7. A non-inverting input terminal of the comparator U3is connected to the output pins VL1and VW0of the digital regulation resistance U2. The resistor R6is connected between the non-inverting input terminal of the comparator U3and ground. An inverting input terminal of the comparator U3is connected to all of a detecting pin RA1of the microcontroller U1, the output pin VW1of the digital regulation resistance U2, and a power source +12V through the thermal resistor RT. The resistor R7is connected between the inverting input terminal of the comparator U3and ground. A voltage terminal of the comparator U3is grounded through the capacitor C6and also connected to the power source +12V. An output terminal of the comparator U3is connected to the output pin VL0of the digital regulation resistance U2and also connected to a cathode of the diode D1. An anode of the diode D1is connected to a control pin SS of the PWM controller200through the resistor R5. The capacitor C7is connected between the control pin SS of the PWM controller200and ground. An output pin SYNC of the PWM controller200is connected to the voltage unit300, to control work states of the voltage unit300. In one embodiment, the thermal resistor RT is a negative coefficient thermal resistor.

The switch unit110includes a plurality of keys, such as keys K1-K12, and resistors R1-R3. The keys K1-K12are arranged in a 4*3 matrix. The keys K1-K8are configured to output resistance regulating signals to the microcontroller U1. The keys K10-K12are configured to be used to setting functions, such as “enter”, “delete”, and “start”. The key K9is inactive. The resistance setting circuit120receives the resistance regulating signals when the key K10is pressed. The key K11can be pressed to cancel operation after the keys K1-K8are pressed. The switch unit110can be started when the key K12is pressed.

The resistors R1-R3are respectively connected between input pins RC7, RB0, and RB1of the microcontroller U1and the power source. First terminals of the keys K1-K3are connected to an input pin RC3of the microcontroller U1. Second terminals of the key K1-K3are respectively connected to the input pins RC7, RB0, and RB1of the microcontroller U1. First terminals of the keys K4-K6are connected to an input pin RC4of the microcontroller U1. Second terminals of the key K4-K6are respectively connected to the input pins RC7, RB0, and RB1of the microcontroller U1. First terminals of the keys K7-K9are connected to an input pin RC5of the microcontroller U1. Second terminals of the key K7-K9are respectively connected to the input pins RC7, RB0, RB1of the microcontroller U1. First terminals of the keys K10-K12are connected to an input pin RC6of the microcontroller U1. Second terminals of the keys K10-K12are respectively connected to the input terminals RC7, RB0, RB1of the microcontroller U1.

In use, the switch unit110is started when the key K12is pressed, and then the keys K1-K8are selectively pressed, to provide an eight-bit binary signal to the microcontroller U1. For example, if the over-temperature is set with 80 degrees, “11110000” is input to the microcontroller U1when the keys K1-K4are pressed and the keys K5-K8are not pressed. The microcontroller U1receives the signal “11110000” through pressing the key K10. The microcontroller U1controls the digital regulation resistance U2to connect a resistance between the non-inverting input terminal of the comparator U3and the power source +12V. If a voltage of the non-inverting input terminal of the comparator U3is greater than a voltage of the inverting input terminal of the comparator U3, the comparator U3outputs a high level signal through the diode D1to the control pin SS of the PWM controller200, to control the voltage unit300to output a voltage. The microcontroller U1controls the display unit140to display the resistance. At the same time, the microcontroller U1detects the resistance of the thermal resistor RT, compares the resistance with a preset resistance, and then obtains a temperature. The microcontroller U1controls the display unit140to display the temperature. Resistance of the thermal resistor RT is reduced when temperature is increased, if a voltage of the non-inverting input terminal of the comparator U3is less than a voltage of the inverting input terminal of the comparator U3, the comparator U3outputs a low level signal through the diode D1to the control pin SS of the PWM controller200, to control the voltage unit300to not output a voltage. Namely, the power supply is powered off. The microcontroller U1controls the display unit140to display the resistance, which is an optimal resistance of the over-temperature protection. At the same time, the microcontroller U1detects the resistance of the thermal resistor RT, compares the resistance with a preset resistance, and then obtains a temperature. The microcontroller U1controls the display unit140to display the temperature, which is an optimal temperature corresponding to the optimal resistance of the over-temperature protection. When temperature of the over-temperature protection needs to be changed, the resistance regulating signals are changed by selectively pressing the keys K1-K8, to make the microcontroller U1controls the digital regulation resistance U2to connect other resistances between the non-inverting input terminal of the comparator U3and the power source +12V, the theory is same as above.

When the power supply is powered off, the keys K1-K8are selectively pressed, to provide an eight-bit binary signal to the microcontroller U1. For example, a recovery temperature at which the voltage unit300recoveries to work is set with 20 degrees, “00001111” is input to the microcontroller U1when the keys K5-K8are pressed and the keys K1-K4are not pressed. The microcontroller U1receives the signal “00001111” through pressing the key K10. The microcontroller U1controls the digital regulation resistance U2to connect a resistance between the non-inverting input terminal and the output terminal of the comparator U3. If a voltage of the non-inverting input terminal of the comparator U3is greater than a voltage of the inverting input terminal of the comparator U3, the comparator U3outputs a high level signal through the diode D1to the control pin SS of the PWM controller200, to control the voltage unit300to output a voltage. Namely, the power supply returns to work. The microcontroller U1controls the display unit140to display the resistance, which is an optimal resistance. At the same time, the microcontroller U1detects the resistance of the thermal resistor RT, compares the resistance with a preset resistance, and then obtains a temperature. The microcontroller U1controls the display unit140to display the temperature, which is an optimal temperature corresponding to the optimal resistance. When temperature of the recovery temperature needs to be changed, the resistance regulating signals are changed by selectively pressing the keys K1-K8, to make the microcontroller U1controls the digital regulation resistance U2to connect other resistances between the non-inverting input terminal and the output terminal of the comparator U3, the theory is same as above.

The measurement circuit100can automatically connect different resistances to the over-temperature protection circuit, to obtain an optimal resistance of the over-temperature, and the measurement circuit100can also connect different resistances to the over-temperature protection circuit, to obtain an optimal resistance of the recovery temperature after the power supply is powered off, to control the power supply to return to work. The measurement circuit100is simple and time-saving.