Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a...

13
Design and Implementation of High Efficient Microcontroller Based Switch Mode Power Supply and Temperature Controller for a Gel Electrophoresis Unit Giritharan Narayan ME081517, 830611146379 Faculty of Electrical Engineering University of Technology Malaysia 81310 Skudai, Johor, Malaysia Abstract: Main focus of this paper shall be on designing a switch mode power supply and temperature controller for an electrochemical process named electrophoresis. Electrophoresis is defined as movement of particles through solvent under external electric field influence. There are several kinds of electrophoresis test and some of them require a DC power supply with some special characteristics. In this case, electric field is achieved by a Switched Mode power supply with characteristics like: Wide range in output voltage (0- 300v), output current reaching 10Amp, good voltage regulation and user friendly interfaces. I. INTRODUCTION Introduction The trend and demand these days are to develop systems that are reliable and intelligent. People need products that are reliable and do not require constant supervision. From the manufacturer point of view, they require a product that is highly reliable and does not damage if the parameters run out of specifications or even on mishandling by the user. To increase the market base of their products the manufacturer tries to put enough intelligence in the system so that it is capable of functioning by itself. Embedded system’s is one such area, which fits well in these situations. The microcontroller based switch mode power supply is developed with a view to make a flexible and an intelligent power supply controlled by a microcontroller of PIC18XXXX family and to eliminate the drawbacks or limitations of the existing systems. Most of the existing systems are hardwired and expensive, which increases the production and procurement cost. The PCBs are larger and complex because of low component integration. In this paper, we will be illustrating the microcontroller based switch mode power supply design , 1

Transcript of Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a...

Page 1: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

Design and Implementation of High Efficient Microcontroller Based Switch Mode Power Supply and Temperature Controller for a Gel

Electrophoresis Unit

Giritharan NarayanME081517, 830611146379

Faculty of Electrical EngineeringUniversity of Technology Malaysia

81310 Skudai, Johor, Malaysia

Abstract: Main focus of this paper shall be on designing a switch mode power supply and temperature controller for an electrochemical process named electrophoresis. Electrophoresis is defined as movement of particles through solvent under external electric field influence. There are several kinds of electrophoresis test and some of them require a DC power supply with some special characteristics. In this case, electric field is achieved by a Switched Mode power supply with characteristics like: Wide range in output voltage (0-300v), output current reaching 10Amp, good voltage regulation and user friendly interfaces.

I. INTRODUCTION

Introduction

The trend and demand these days are to develop systems that are reliable and intelligent. People need products that are reliable and do not require constant supervision. From the manufacturer point of view, they require a product that is highly reliable and does not damage if the parameters run out of specifications or even on mishandling by the user. To increase the market base of their products the manufacturer tries to put enough intelligence in the system so that it is capable of functioning by itself. Embedded system’s is one such area, which fits well in these situations.The microcontroller based switch mode power supply is developed with a view to make a flexible and an intelligent power supply controlled by a microcontroller of PIC18XXXX family and to eliminate the drawbacks or limitations of the existing systems. Most of the existing systems are hardwired and expensive, which increases the production and procurement cost. The PCBs

are larger and complex because of low component integration.

In this paper, we will be illustrating the microcontroller based switch mode power supply design , temperature controller for electrophoresis and the modification done on the electrophoresis apparatus to fit in well with the electronic gadgets implemented.

II. ELECTROPHORESIS

Theory of operation

Gel electrophoresis is a technique used for the separation of deoxyribonucleic acid (DNA), ribonucleic acid (RNA), or protein molecules using an electric current applied to a gel matrix. DNA Gel electrophoresis is generally only used after amplification of DNA via PCR. It is usually performed for analytical purposes, but may be used as a preparative technique prior to use of other methods such as mass spectrometry, RFLP, PCR, cloning, DNA sequencing, or Southern blotting for further characterization

The term gel in this instance refers to the matrix used to contain, then separate the target molecules. In most cases, the gel is a crosslinked polymer whose composition and porosity is chosen based on the specific weight and composition of the target to be analyzed. When separating proteins or small nucleic acids (DNA, RNA, or oligonucleotides) the gel is usually composed of different concentrations of acrylamide and a cross-linker, producing different sized mesh networks of polyacrylamide. When separating larger nucleic acids (greater than a few hundred bases), the preferred matrix is purified agarose. In both cases, the gel forms a solid, yet porous matrix. Acrylamide, in contrast to polyacrylamide, is a neurotoxin and must be handled using appropriate safety precautions to avoid poisoning. Agarose is composed of long unbranched chains of uncharged carbohydrate

1

Page 2: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

without cross links resulting in a gel with large pores allowing for the separation of macromolecules and macromolecular complexes

Electrophoresis refers to the electromotive force (EMF) that is used to move the molecules through the gel matrix. By placing the molecules in wells in the gel and applying an electric current, the molecules will move through the matrix at different rates, determined largely by their mass when the charge to mass ratio (Z) of all species is uniform, toward the anode if negatively charged or toward the cathode if positively charged. Electrophoresis process can be explained with figure 1 where particles of sample will move according its polarity and the distance traveled will depend directly of the time and voltage.

Figure 1. Electrophoresis process

Some kind of electrophoresis tests employ gel as the solvent in which particles will move when electric field is applied, some examples of that are shown in table 1 as below.

Table 1. Electrophoresis test data for various types

Effects of voltage and temperature

Electrophoresis velocities are directly proportional to the field strength, so the use of the highest voltages possible will result in the shortest times for the separation. Theory predicts that short separation times will give the highest efficiencies since diffusion is the most important feature contributing to band broadening. The limiting factor here is Joule heating. The electrophoresis mobility (Eq. 1)

and the electro osmotic flow (Eq. 2) expressions both contain a viscosity term in the denominator. Viscosity is a function of temperature; therefore, precise temperature control is important. As the temperature increases, the viscosity decreases;thus, the electrophoresis mobility increases as well. This will results in change of characteristic of the separation process.

(1)

where q is the net charge, R is the aparatus radius, and is the viscosity.

(2)

where is the dielectric constant, is the viscosity of the buffer, and is the zeta potential measured at the plane of shear close to the liquid-solid interface. Most separations are performed at 25C (i.e., near room temperature). For the process to have a table temperature, new modification had been implemented in changing the off the shelf electrophoresis apparatus to a temperature controllable universal tank.

Temperature sustaining electrophoresis tank.

Currently the electrophoresis apparatus in market is not designed to control the temperature for optimum process result. Figure 2 below illustrates the current electrophoresis apparatus.

Figure 2. Electrophoresis apparatus

2

Page 3: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

Adaption of the of the temperature controller need to come first from the electrophoresis apparatus itself. With having the same structure of the as the current market electrophoresis set, few simple yet important modification had been made. A dc Fan and heat sink fin had been added to the tank for air circulation purpose. This will be supported by the heart of the temperature controller, a LCD display PIC 18xx controlled gadget. The prototype of the modified electrophoresis apparatus is as shown in figure 3 below.

Figure 3. Electrophoresis Temperature Controller

This newly designed electrophoresis apparatus will act as the universal pad for the actual electrophoresis set in the market. It is highly capable of controlling the temperature of the electrophoresis process which will induce thermal heat with supplied voltage. The control switched is designed to set the temperature to the desired level and monitor the temperature through the LCD screen. The Fan speed is proportional to the temperature rise. The microcontroller will be the master controlling the sense and feedbacks.

II. TEMPERATURE CONTROLLER

Hardware description

As been explained earlier, the electrophoresis characteristic is being changed by the thermal introduction by continues current supplied. Along with the electrophoresis apparatus modification, the temperature controller is introduced to control the thermal heat. Perhaps the simplest form of thermal management is forced convection, example increasing the dissipation of heat by moving the air inside and around the heat

source. This is most conveniently done using fans, which are powered by Brushless DC (BLDC) motors as shown in figure 4. BLDC motors are commutated electronically, eliminating problems such as mechanical wear of brushes, but also reducing EMI (Electro-Magnetic Interference). The most straightforward fan designs simply spin the fan rotor at full speed based on the temperature sensed and connected to a master, PIC 16F873.

Figure 4. Rotor of BLDC fan

The temperature controller consists of two partitions. One is the controller board and another is the DC board. The controller board reads the sensor, updates the LCD display, and switches the outputs mean while the DC board have the outputs connected to BLDC. The LCD display shows current temperature, and changes periodically from Celsius to Fahrenheit. The pushbuttons allow the user to change the low- and full-speed temperature thresholds for the fan.

Position Sensor

The BLDC motors typically use digital sensors for commutation information, in this case SHT11 . The sensor tells the controller when to activate the coils. Digital-sensors come in two flavors which is non-buffered and buffered. Non-buffered sensors have two output wires, which carry the differential voltage proportional to the currently present magnetic field. The buffered sensor has only one output, and only two possible output states: high andlow. The buffered digital-sensor requires only one wire and allows a more compact design, and is therefore the choice of sensor in this project.A basic design for a fan controller can be very simple, provided that the only requirement is to rotate the fan, basically two transistors controlled by a digital-sensor will do. But in most cases there are requirements to monitor and adjust the rotating speed, either autonomously by the fan itself or by remote control via a serial interface. In addition, an intelligent fan should be able to handle

Ctrl Switches

LCD

Fan

Heat sink

Air Circulator

Temperature Sensor

3

Page 4: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

situations like rotor lock, overcurrent and overheating.

Fan speed control

There are many advantages for being able to control the speed of the rotor; acousticnoise and power consumption are reduced and the expected lifetime of mechanicalconstructs is improved. In order for the microcontroller to be able to control the rotary motion it needs to know in which phase the rotor is. For this purpose a buffered digital sensor is used. The signal from the sensor toggles between logical high and low according to the rotational phase of the rotor, as illustrated in the figure 5 below. The sensor signal toggles four times per revolution of the rotor.

Figure 5. Signal from SHT11 in a Rotating Fan.

PWM-Controlled Speed

The in elaborate way to turn a rotor is to wire the sensor signal directly to a coildriving circuitry. This results in the rotor constantly trying to increase its speed ofrotation until it reaches its mechanical limits. The result is a fan persistently rotating atfull speed and producing the highest amount of noise. A more elaborate method of speed control is implemented by chopping the drivingsignal. This means that the stator coils are still activated according to the signal fromthe sensor, but rather than constantly powering the coil for the entire quarter-cycle thedrive signal toggles between active and inactive at a high frequency. The rotational speed of the fan is then directly proportional to the average voltage of the drive signal. The most efficient method to obtain a chopped drive signal is to use a hardware timer/counter with Pulse-Width Modulation (PWM) outputs. The PIC 16F873, is equipped with a high-speed PWM waveform generator suitable for this purpose. The average voltage of the driving signal is directly proportional to the duty cycle of the PWM output. This means the software can easily control the speed of the fan

by simply adjusting the duty cycle of the PWM outputs.

Implementation of Temperature Controller

The Controller board consists of no more than a Microchip PIC 16F873, integral pushbutton and of course the SHT sensor. The Sensirion sensor requires two pins from the PIC, one for bidirectional data and the other for the clock signal. In parallel with the three trip outputs are indicator LED's to show which output is active. The pushbutton is used to select menus. Connector JP3 is for in-circuit programming, D1 isolates the 13V programming voltage from the 5V circuitry during programming, resistor R5 keeps the PIC out of reset during normal operation. A reset button had been added between D1 and ground. R1-3 are the pulldown resistors for the encoder, the encoder pulling the PIC pins high as they are activated. JP1 the LCD header connects to a standard LCD with VR1 the backlight control. JP2 is brought out to a header and is spare. JP4 carries the switched outputs signal. The power supply is standard with a 12V take off point that could be used for the DC controller board. The schematic for controller board is shown in figure 6 below.

Figure 6. Temperature controller board

Moving to the Dc board, tansistor T1(T4) and associated components are only fitted because AC is not in use. While all three MOSFET outputs look the same, there is a subtle difference in the way that the humidity and over temperature control act in respect of the fan output. The fan control is a plain on off switch. The other two outputs feature a 'soft-start' control. They manage this by being controlled by a PWM signal, starting with a zero duty cycle rising to 100 % over a period of 1 second and at switch off performing in reverse. As a basic unit only MOSFETS T1-3 need be fitted, and with the transistors 

4

Page 5: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

specified upto 10A can be switched. More than this would require T4-T6. The flyback diodes D5-6, are required if they are switching an inductive load. If using a resistive load such as underground heating wire or similar then the diodes are not absolutely necessary. The 100 ohm gate resistors are to help protect the Pic pins against excessive current and also helps to minimise the heat dissipation that might occur while the MOSFET is switching due to the inherent gate capacitance of MOSFETS. The 10K resistors from gate to ground are to ensure that the MOSFETS stay off when the Pic is being powered up. The PWM frequency is 20KHz and with loads up to 4.5A the MOSFETS should not require heatsinks. The below figure 7 configures the schematic for DC board.

Figure 7. Temperature DC board

III. SWITCH MODE POWER SUPPLY (SMPS)

SMPS topology

Before designing any SMPS, the most essential element to be decided is indeed the mode of topology. The first criteria that will be faced is whether to have input to output transformer isolation. Non-isolated switching power supplies are typically used for board-level regulation where a dielectric barrier is provided elsewhere within the system. Non-isolated topologies should also be used where the possibility of a failure does not connect the input power source to the fragile load circuitry. Transformer isolation should be used in all

other situations. Associated with that is the need for multiple output voltages. Transformers provide an easy method for adding additional output voltages to the switching power supply. The remainder of the factors involve how much stress the power semiconductors are being subjected to. With all the requirement set, design goal for SMPS had been set.The electrical specifications for the design shall be :• 240 VDC input• 300 VDC output at 10A• <100 mV Ripple at the output• Isolated half bridge topology• Current mode configuration• Continuous inductor current operation• Synchronous switching for increased efficiency• Ambient temperature sensor

Hardware theory of application

To better understand how the on-chip peripherals in the microcontroller work in the traditional analog feedback control of a SMPS design, an examination of the operation of the SMPS power section is needed. Specifically,how the various peripherals are used, and whatcontrol the microcontroller can exert over theiroperation. A block diagram of the switching regulator is shown in Figure 8. There are two feedback paths, an inner current loop, and the outer voltage loop.

Figure 8. Switching regulator

The inner current feedback path consists of a single channel of the on-chip analog PWM generator, the MOSFET driver U4, the two MOSFETs Q1 and Q2, the inductor L1, and the current transformer (T1) as in figure 9 below.

5

Page 6: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

Figure 9. Current feedback loop

The phase counter internal to the analog PWM module, initiates the PWM pulse by setting the PHA flip-flop. This sets the PHA output, which sets the DRVH output of the MOSFET driver U7, which turns on MOSFET Q1. While Q1 remains on, L1 is electrically connectedbetween 240V and the output. The voltage difference between the 240V input and the SMPS output causes the current in L1 to ramp up, with the inductor current flowing from the 240V input, through the inductor L1, to the output capacitors C1 and C9. The ramping inductor current continues until the feedback from the current transformer T1, reaches the desired level. When this happens, on-chip voltage comparator C2 resets the PHA flip-flop, which terminates the PWM pulse, and pulls the PHA output low. The DRVH output of U7 then goes low, and Q1 begins to turns off. Diagram for the waveform will be presented as soon as lan testing is underway.

The desired current flow in L1, from figure 7, is set by the output of the error amplifier/loop filter in the voltage feedback loop. The voltage feedback loop consists of the all the elements in the current feedback loop, plus the output capacitors C1 and C9, the error amplifier/loop filter (using the on-chip opa2 in the PIC16F785), and a voltage reference generated by the timer-based CCP PWM function in the microcontroller as in figure 10The current flow in L1 is designed to be continuous, it supplies all of the output current during the cycle, with the output capacitors storing the extra current from the high side of the charge cycle, for discharge during the low side.

Figure 10. Voltage Feedback

The challenge in a continuous current configuration is to make sure that the feedback process starts with the error amplifierand loop filter sampling the output voltage. The error amplifier portion of the circuit (OPA2) compares the output voltage to its reference voltage (C19), generating an error voltage. The error voltage is then passed to the voltage comparator (C2) in the current loop, whichcharges the inductor current up to the level of the error amplifier output. This keeps the current level in the inductor sufficient to maintain the charge in the output capacitors, and supply the necessary output current without overcharging the output capacitors and creating an output over voltage condition. There are two hidden challenges in a continuous current design. One, the negative feedback of the voltageloop, and the phase delay of the various components, can create a condition in which the loop can go unstable and oscillate. Two, using a simple subtraction in the error amplifier will result is a constant error between thereference voltage and the feedback voltage.It is the loop filter that acts to counteract the potential instability.

So, the operation of the voltage feedback system is nearly identical to any purely analog SMPS design. In fact, the use of the CCP base PWM to generate a referencevoltage for the error amplifier is commonly usedin intelligent SMPS designs. However, there are also some important features that makes selected microcontroller PIC16F785 significantly more flexible which is the analog multiplexers on the inputs to the comparators allow the software to switch between two or more loop filters, giving the system the ability to change its response

6

Page 7: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

characteristics. Adding to this the analog multiplexers on the inputs to the comparators, and the systems able to reconfigure which comparators are used for the PWM feedback, allow the system to switch between a fully proportional feedback for continuous inductor current, and a hysteretic feedback for discontinuous inductor current on the fly as illustrated in figure 11 below.

Figure 11. Continuous and discontinuous switching.

The expected circuit of switch mode power supply is as below in figure 14

Figure 12. 300V/10Amp SMPSSoftware theory of operation

The basic software construct that will be used is a simple infinite loop as shown in Figure 13.

Figure 13. Software flow.

First in the flowchart is the INIT section, which contains all of the initial setting for the variables and peripherals that will be used by the system. The next section, located within the main loop, is the GET_INPUTS block, which is charged with measuring the various signals monitored by the microcontroller, and gathering the various communications and control inputs. The third section, DECISIONS, makes decisions based on the inputs to the system. The results from the DECISIONS block are then passed to the DO_OUTPUTS section which makes the appropriate adjustments to the controls, whether they are controls over the switch mode power supply operation or communication outputs. The final section is the TIMER section which regulates the timing of the infinite loop. Here the rate at which inputs are gathered, decisions are made, and controls are adjusted, is regulated to provide predictable sampling and control ratechanges.

Deterministic functions.

To suite the electrophoresis process with high efficiency, few deterministic functions is proposed and added to the switch mode power supply design:• Delayed start-up for sequencing• Soft start• Under voltage lockout• Slew rate limiting on all VOUT changes• Hysteretic over temp error• Shorted output fault detection with limited restart

7

Page 8: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

• Over current alarm• Four programmable VOUT presetsThe Delayed start-up indicates that there is a DELAY state needed between the SHUTDN and ACTIVE states. Soft start function indicates that there will also be a RAMP state in which the output will be ramp up from 0 to the final output voltage. Under voltage lockout does not seem to indicate an additional state, rather it is just a condition that would force the transition from ACTIVE to SHUTDN, or SHUTDN to DELAY.Slew rate limiting on all VOUT changes indicates that are additional states for ramping the output up and down is required. However, if a single RAMP state is created to ramp up or down, a separate state will not be needed.

The hysteretic over temp fault requires that the system declare a error at one temperature, but then clear the error at lower temperature. This will require an additional active state in which there is a error, but the output is still active. Let’s call this the ERROR state. A shorted output condition is an immediate fault, and a simple jump to the SHUTDN state, followed by a restart, should be sufficient to handle the fault. However, if the fault persists, it may be necessary to have a “Sticky” fault condition that requires intervention by the communications function to clear. So, for this design, it seems advisable to create a Fault state which can beentered in response to a persistent fault and requires user intervention to move to the SHUTDN state. The over current alarm is similar to the over temperature alarm, however, it doesn’t require hysteresis, so it can be handled as simple comparison. If an over current condition exists, and if the power supply has completed the start-up delay and soft start, then turn on the alarm LED. When and if the condition clears, then turn off the LED. So, because the condition does not require an additional historical information to operate, a separate state is not required.

The four programmable VOUT presets simply require the system to recognize the new output voltage request, and ramp up or down to the new voltage. So, like the under voltage lockout function, this is just a condition forcing a move to the RAMP state. Table 2 and figure 14. respectively shows the various states for the system and the state transition diagram.

Table 2. Various state for system

Figure 14. State transition diagram

IV. EXPECTED RESULTS

As the project still in early stage, test analysis to support the innovation is in progress. From the design , results are expected to show that the newly designed electrophoresis apparatus will sustain the temperature raise and optimize the electrophoresis process. The temperature controller circuit is expected to control the temperature and proportionally control the fan speed to accommodate the thermal management. The SMSP designed will efficiently supply constant voltage and current to support the electrophoresis process. Alongside with it, the power supply is programmable for various output voltage from 0-300v.

VI. CONCLUSION

It is a software controlled microcontroller based systems, which makes it intelligent, independent of operator

8

Page 9: Design and Implementation of High Efficient Micro Controller Based Switch Mode Power Supply for a Gel Electrophoresis Unit-2

supervision and can adapt to a restricted set of changed requirements without any hardware change. The newly proposed system will allow users to worry less about electrophoresis process accuracy. The designs of SMPS , temperature controller and electrophoresis apparatus will be having a big impact in the market due to its low cost and reduced size pack.

REFERENCES

1. Moksimovic, D., R. zane and R. Erickson, 2004. Impact of digital control in power electronics. IEEE Intl. Symp. on Power Semiconductor Devices and ICs. Kitakyushu, Japan, pp: 13-22.2. Mammano, B. and L. Bahra, 2005. Safetyconsiderations in power supply design. Unitrode(TI) Power Supply Design Seminar, SEM16002004/2005.3. Kenneth, J.A., 1993. The 8051 Microcontroller: Architecture, Programming and Applications. St. Paul: West Publishing Company.4. Abraham, I.P., 1998. Switching Power SupplyDesign. 2nd Edn. McGraw-Hill, New York.5. Power Supply Design by Jerrold Foutz6. Lloyd H. Dixon, Jr. Switching Power SupplyReview.7. Balogh, L., 2005. A practical introduction to digital power supply control. Unitrode (TI) Power Supply Design Seminar, SEM1600 2004/2005.8. Atmel, datasheet AT 89LS8252.10. National Semiconductor, datasheet ADC 0808 /ADC 0809.9. Analog Devices, datasheet DAC 8426 (Norwood, U.S.A. Revision C)10. R. Erickson and D. Moksimovic, “Fundamentals of Power Electronics”, Second Edition, Kluwer Academic Publishers, 2000, ISBNO-7923-7270-0.11. B.D. Hames & D. Rickwood, Gel Electrophoresis ofProteins: a Practical Approach, IRL Press, 1981.12. Irving Gottlieb, Regulated Power Supplies, 4th. editionTAB Books, 1992.13. George Chryssis, High-Frequency Switching Power Supplies, Mc. Graw Hill, 1994. 14. M. Rashid, Power Electronics. Circuits, Devices and Applications, Prentice Hall, 1993.

9