TB053, Generating High Voltage Using the PIC16C781/782
Total Page:16
File Type:pdf, Size:1020Kb
M TB053 Generating High Voltage Using the PIC16C781/782 EQUATION 1: Author: Ross Fosler Microchip Technology Inc. di IN L → V VIN = L1 t = iL dt L1 INTRODUCTION The peak current is achieved the moment before Q1 turns off. Equation 2 shows the peak current, where D th The Nixie tube is a device born out of the middle 20 is the duty cycle and T is the period for pulse width century, used to display digital information in a human modulation. readable format. Basically, it is a high voltage numerical display. Today, the Nixie tube has been replaced by EQUATION 2: more efficient, more durable, and longer lasting devices, such as LED displays and LCDs. However, for VIN this Technical Brief, the Nixie tube serves as an excel- DT = IPEAK L lent visual feedback of the PIC16C782’s ability to gen- 1 erate high voltage from a low voltage source. This Technical Brief introduces the boost converter The current in an inductor cannot change instanta- topology operating in Discontinuous mode. As an neously. When Q1 is switched off, the current in L1 con- example, a simple 9V to 170V DC-DC converter is tinues to flow through D1 to the storage capacitor, C1, designed based on this topology, and is used to provide and the load, RL. Thus, the current in the inductor power to a three-digit Nixie tube display. The decreases linearly in time from the peak current. In dis- PIC16C782 is used to control the DC-DC converter and continuous operation, the inductor current actually falls provides data decoding for the display. To make the dis- to zero. Equation 3 shows this relationship. play useful, the PICmicro® MCU samples a tempera- ture sensor and displays the results. EQUATION 3: THE BASIC BOOST TOPOLOGY diL VIN – VOUT → VIN – VOUT = iL = t + IPEAK (DISCONTINUOUS MODE) dt L1 L1 FIGURE 1: BOOST CONVERTER TOPOLOGY During this linear decrease in current, the energy stored in the inductor is transferred to C1. The result is a simple relationship between input and output voltage VIN L1 D1 VOUT shown in Equation 4. This equation is derived from the simple concept: power in equals the power out. Refer C1 RL to the publications listed in the References section for Q1 more details. Controller VVFB EQUATION 4: RLDT VOUT = VIN 2L1 In the basic boost topology shown in Figure 1, the input voltage (VIN) is always less than the output voltage (VOUT). Initially, energy is stored in inductor L1 when Q1 is turned on. From the electrical characteristics of the inductor, the current ramps up linearly according to Equation 1 (assuming inductor series resistance and switch on resistance are negligible). 2002 Microchip Technology Inc. Preliminary DS91053A-page 1 TB053 A HIGH VOLTAGE DISPLAY EXAMPLE The inductor has current flowing through it for a total of 25.34 µs. The period T is 32 µs, which is much larger The Nixie tubes used in this design require 170 VDC, at than the total time the current is flowing. Thus, the sup- a peak operating current of approximately 4 mA or ply is sure to stay in Discontinuous mode for the given 0.68 Watts per tube. For a three-digit display, the peak input and load conditions. operating power is slightly over 2 Watts. The input to the supply is 9 VDC. Thus, the desired power supply CLOSING THE LOOP WITH THE design is a 9V to 170V DC-DC converter, with a maxi- PIC16C781/782 mum output operating power of 2 Watts. The programmable functions of the PIC16C781/782 are The control loop is closed with the PIC16C781/782. considered together with the design of the boost power Figure 2 shows the configuration within the circuit. The following options in the PIC16C781/782 are PIC16C781/782. Essentially, the voltage feedback is selected, which affect the DC-DC converter operation: compared to a fixed voltage. The Digital-to-Analog Converter provides the fixed voltage reference. When • Internal 4 MHz oscillator is selected the feedback voltage crosses the voltage reference, • PWM clock set to FOSC/128 the Programmable Switch Mode Controller (PSMC) • Maximum duty cycle set to 75% output is reset. Thus, changing the reference voltage provided by the Digital-to-Analog (DAC) changes Essentially, this means the on-time of the MOSFET, output voltage, VOUT. Q1, is about 24 µs. Using Equation 4, a function for power in terms of inductance is easily derived. FIGURE 2: PIC16C781/782 CONTROL LOOP CONFIGURATION (170 Volts)2 24 µS (P)Watts (24 µS)(9 Volts)2 170 = 9 → P = 2L1 2L1 PIC16C781/782 The desired peak output power of the DC-DC converter PSMC is 2 Watts. To achieve this, the output power must be greater to overcome losses in the voltage conversion. PWM PWM DAC Therefore, an inductor size must be chosen to achieve R VVFB a power output of 2 Watts, plus some power loss. The inductor chosen for this design is 330 µH. This means the maximum power is 2.945 Watts, assuming no power loss. With power loss, the lowest allowable effi- ciency for the chosen inductor is 67.9%. Efficiency in the 70% region is a reasonable assumption for this design and should not be a problem. This feedback method is unusual for this topology. The peak current, from Equation 2, for the 330 µH Energy is transferred from the inductor when the Pulse inductor is: Width Modulation (PWM) is in its negative (low output) 9 portion of the duty cycle. However, the PSMC has act- 24 µS = IPEAK = 0.655 Amps ing feedback control only during the positive portion of 2L1 the duty cycle. Thus, energy is transferred to the output on the cycle prior to the control portion. The net result µ Power inductors, in the range of 330 H @ 0.655A, are is a pseudo pulse-skip operation, while the common and readily available. PIC16C781/782 PSMC is in the PWM mode. Refer to This design is intended to run in Discontinuous mode the PIC16C781/782 Data Sheet (DS41171) for informa- and should stay in Discontinuous mode throughout the tion about the PSMC and its standard modes of opera- load range. Therefore, the rise and fall time of the cur- tion. To smooth the output ripple due to pulse skipping, rent in the inductor for maximum load is compared with the minimum pulse width in the PIC16C781/782 is set the switching period. The rise time of the inductor cur- to 25%. rent is already known to be 24 µs. The fall time is cal- culated using Equation 3. (9 – 170) Volts 0 = t + 0.655 Amps → t = 1.34 µs 330 µH fall fall DS91053A-page 2 Preliminary 2002 Microchip Technology Inc. TB053 Soft-start is provided in the software. By slowly increas- CONCLUSION ing the voltage reference, the output voltage ramps up linearly over several hundred milliseconds (Figure 3). Nixie Tubes are very much out of date in terms of tech- Gradually ramping up controls the current drawn during nology and have passed into history. However, there start-up. This prevents saturating the inductor, thus, are some applications that still require high voltage, for preventing excessive current through the switch. As a example, EL backlighting and low current fluorescent result, a smaller FET can be used safely. lighting. This application demonstrates the ability of the PIC16C781/782 to perform a simple DC-DC voltage FIGURE 3: VOLTAGE OUTPUT REFERENCE boost and have additional control for other system functions. VREF REFERENCES 1. Ross, J. N., The Essence of Power Electronics, + Prentice Hall, New York, 1997. 2. Pressman, Abraham I., Switching Power Supply +170 VOUT Design, McGraw-Hill, New York, 1998. + 2002 Microchip Technology Inc. Preliminary DS91053A-page 3 TB053 APPENDIX A: SCHEMATICS FIGURE A-1: HIGH VOLTAGE DRIVER DISPLAY CONTROL 330 µH +9 VDC +170 VDC (to Display) +5V µ +5V 10 F 7805 350V PIC16C781/782 470 kΩ .1 µF.1 µF.1 µF.1 µF IRF620 µ 100 F RB6 AN4 TC4427 AN0 6.8 kΩ +5V Temperature to Display Sensor LM34 9 bits FIGURE A-2: NIXIE TUBE DISPLAY +170 VDC 10 k 10 k 10 k Nixie Tubes 2.2 k FMMT497TA from Microcontroller 2.2 k CD4028 FMMT497TA x10 2.2 k CD4028 FMMT497TA x10 DS91053A-page 4 Preliminary 2002 Microchip Technology Inc. Note the following details of the code protection feature on PICmicro® MCUs. • The PICmicro family meets the specifications contained in the Microchip Data Sheet. • Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowl- edge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet. The person doing so may be engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable”. • Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our product. If you have any further questions about this matter, please contact the local sales office nearest to you. Information contained in this publication regarding device Trademarks applications and the like is intended through suggestion only and may be superseded by updates.