Design of Regulated Power Supply and Electric Leakage Protection Circuit with Low Dropout Regulator Function in Food Temperature System

In this study, STC12C5204AD MCU is used to sample and display the leakage current and the food temperature system output power. The power supply is also able to fulfill the leakage protection by cutting off the output power according to the amount of leakage current intelligently. ADC Linear regulated voltage power supply is designed to use C511 high powered PNP power adjustment tube, a voltage regulator module TL431 and other components which makes it have LDO function and is capable of accepting a wide range of voltage input, as well as high stable 5 V output voltage. Hall sensor is used to detect the current of electric leakage.


INTRODUCTION
With the wider deployment and development of portable electronic devices, there are higher and stricter demands for the design of DC regulated power supply.This food temperature system includes DC regulated power supply, electric leakage protection circuit, current sampler, load over-current protection circuit, STC12C5204AD MCU for real-time sampling of output voltage and current signals and detect electric leakage by using Hall sensor to detect the leaking current.Usually the portable electronic devices use high-quality regulated power supply chip in order to improve the efficiency of using batteries and prolong the battery life (Shi, 2014).Among the DC linear regulators, LDO linear regulator is more commonly used due to its advantages in stable output, reduced output ripple and noise.This study introduces a design of DC linear regulated power supply that has LDO function and leakage protection circuit.It uses STC12C5204AD MCU to display real-time current, voltage and power.The specification of the design is listed as below:  With a fixed load resistance at 5Ω, the adjustment in voltage is less than 0.2% when the DC input is within 5.5-27V and output voltage is at 5±0.05V. With a fixed DC input at 5.5V, the load regulation rate SL≤1% when the output current from DC regulated power supply is reduced from 1A to 0.01A.
 It is able to measure and display real-time power of the circuit on LCD.It also has leakage protection at 30mA.The design graph is shown in Fig. 1.

MATERIALS AND METHODS
Hardware circuit design: LDO DC linear regulated power supply: The input voltage for this food temperature system ranges from DC 5.5 to 27V.In order to display its feature with low voltage, the test was done with 5.5V input.The circuit design is shown as Fig. 2. It used TL431 as reference power supply, cathode and control node were connected and C511 was used as a high power PNP power supply regulation tube.Its output current can reach 3A.The regulated voltage was output through the collector of regulator tube with an extremely low voltage drop.The voltage difference can be 0.3V.When there was change in power supply or load, which brought change in output voltage (Li and Hu, 2014).Then the sampling circuit sent part of the output voltage back as feedback, which would be compared with reference voltage by the operational amplifier.The generated voltage error was amplified and controlled base electrode by the driver, automatically changed voltage between the tube and emitter and compensated the changes in output.Thus, it was able to maintain the output voltage.In the circuit, the regulated voltage of TL341 is 2.5V.Similarly, the voltage for LM358 operational amplifier also requires a voltage of ~2.5V.The resistance of R6 was chosen as 300Ω.Although according to the formula V0 = R1*2.5/300+2.5, the R1 should be 300Ω, however, considering the discretion of parameters, R1 was set to adjustable resistance in order to achieve an accurate output of 5V voltage.

Design of current detection and overload protection:
In order to test the load power of this food temperature system, besides testing the output voltage, the current during overloading is also necessary.As shown in Fig. 2, the P2.1 of MCU can provide direct sampling of output voltage.However, an additional resistance is required to convert the voltage into the current and feed it to the MCU.Therefore, this food temperature system add a series connected resistance R9 (0.1Ω) to the load circuit.Considering the minimum current is 1mA and the converted voltage is 0.1mV, the accuracy obtained by 8-bit MCU is not enough for detection.An additional 20* amplified operational amplifier by U2 was used and sampled voltage from the pin 7, the P2.0 port of MCU and then to calculate the load power for the test.Meanwhile, this circuit also protects overloading, as shown in Fig. 2, the in-phase input of the LM358 operational amplifier U2 samples the current at R9.When the output current increases, the voltage at pin 7 also increases.When the voltage at pin 7 is greater than that of pin 3, the output voltage starts to decrease and limits the output voltage.The limit of

Design of electric leakage protection:
It is difficult to protect electric leakage of DC signal when the current is very low.Usually, a series connection of two small resistances was used to detect the current and input current by the AD of MCU (Wang, 2012).However, this method requires high accuracy of AD transformation and the series connection of two resistances also influences the load itself.In this designed electronic leakage protection circuit, Hall sensor was used to detect the leakage current by the generated differences in voltages from its input and output current, as shown in Fig. 3, in which the pin 1 and pin 4 of Hall sensor were connected to input current and pin 6 and 3 to output current.When there is no electronic leakage, due to the balance of input and output current, the output voltage from the sensor was zero.But when there is leakage current, the imbalance occurred and induced a change in the output voltage of the Hall sensor (Gu, 2004).This change was further differentially amplified by the operational amplifier and then was sampled by the MCU.When the voltage reached to set limit, the MCU controlled the relay and protected the current leakage.
When the food temperature system is on, the normally closed switch of the relay is connected to 5V power supply to provide power to the load.The MCU measures the current of the load, the output voltage of the power supply and electronic leakage through internal A/D transformer.The MCU also display the output power voltage, power and leakage current in real-time by calculation.In order to achieve better testing accuracy, the AD continuously samples 10 times and calculates the average as the result.
The main Software design flow chart was shown in Fig. 4.

RESULTS AND DISCUSSION
 When the resistance of the load was 5Ω and the DC voltage input changed between 5.5V to 7V, the output voltage were as shown in Table 1.
The adjustment rate of voltage is: 2 1 1 5.0069 5.0013 100% 100% 0.1112% 5.0013 In the formula, Uo2 is the output voltage when the input is 27V, U01 is the output voltage when the input is 5.5V and the calculated result showed that the adjustment rate in voltage is better than the proposed 0.2%. When the DC input was 5.5v, the load was adjusted to reduce the output current from the DC regulated power supply from 1A to 0.01A, the output voltages were shown in Table 2.The adjustment rate of load is: The calculated result indicated that when the input power was 5.5V, the rate was far better than the proposed 1%. Electronic leakage protection test (Table 3).
After 3 tests, the result demonstrated that the error in current during the electronic leakage protection was less than 1mA and was better than the design requirement.

CONCLUSION
After multiple tests, the performance of this food temperature system was better than the design requirement.Especially, when the DC input was at 5.5V, the performance from LDO low-voltage output was very reliable.Meanwhile, the Hall sensor was used in the design to detect the electronic leakage, which is novel among similar designs and is very applicable.

Table 1 :
Adjust the actual output voltage when the input voltage is adjusted