0% found this document useful (0 votes)
41 views

TB085

A new class of microcontroller friendly PWM generators has been developed. The MCP1630 contains the main elements for designing a switching power supply as a peripheral to a microcontroller. The power supply design presented is a proportional-feedback continuous inductor current, current-mode, boost power supply generating 15V out at. Amps from a 9 VDC input.

Uploaded by

rrebollar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

TB085

A new class of microcontroller friendly PWM generators has been developed. The MCP1630 contains the main elements for designing a switching power supply as a peripheral to a microcontroller. The power supply design presented is a proportional-feedback continuous inductor current, current-mode, boost power supply generating 15V out at. Amps from a 9 VDC input.

Uploaded by

rrebollar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

TB085

A Simple Circuit for Driving Microcontroller Friendly PWM Generators


Author: Keith Curtis Microchip Technology Inc. Because the MCP1630 does not contain an on-chip oscillator, its application in non-intelligent or dumb power supply designs, is limited. However, marrying the MCP1630 with a small pin-count microcontroller solves the oscillator problem and opens up possibilities for other features such as: Variable pulse frequency soft-start External shutdown control Under-voltage lockout Over temperature shutdown

INTRODUCTION
The recent interest in intelligent power supplies has driven the development of a new class of microcontroller friendly PWM generators. These PWM generators are the mixed signal control blocks for Switch mode power supplies. One such device is the MCP1630. The MCP1630 contains the 3 main elements for designing a switching power supply as a peripheral to a microcontroller: a set/reset flip-flop, a high-speed voltage comparator and an op amp to implement the error amplifier (see Figure 1). The microcontroller controls the MCP1630 through its clock input. The frequency of the clock determines the pulse frequency of the PWM output, and the duty cycle of the clock limits the maximum PWM duty cycle of the output. Control of the duty cycle between 0 and the maximum set by the clock input is determined by the current feedback to the comparator and the output of the error amplifier (see Figure 2).

THEORY OF OPERATION
This technical brief will examine a design which combines the PIC10F206, a 6-pin SOT-23 microcontroller, with the MCP1630. The power supply design presented is a full proportional-feedback continuous inductor current, current-mode, boost power supply generating 15V out at .25 amps from a 9 VDC input. The PIC10F206 generates the clock for the MCP1630 and through that control, implements the previous list of features.

FIGURE 1:
Vsupply

TYPICAL SWITCH MODE POWER SUPPLY BLOCK DIAGRAM

MCP1630 Flip-Flop Clock Input


R S Q Q

Voutput

Op Amp
+

Reference

Comparator Microcontroller

2004 Microchip Technology Inc.

DS91085A-page 1

TB085
FIGURE 2: MCP1630 HIGH-SPEED PWM
VIN 0.1 A UVLO OSC IN VIN S Q VEXT Overtemperature VIN

GND 100 k

CS COMP VIN VREF EA + FB + Comp -

Latch Truth Table S 2R R 2.7V Clamp 0 0 1 1 R 0 1 0 1 Q Qn 1 0 1

HARDWARE
The PIC10F206 is well suited for this function. It has an on-chip voltage comparator for the under-voltage detect and it has sufficient I/O to control the MCP1630 and monitor the external inputs. The microcontroller monitors the inputs and generates the 250 kHz clock, all in software. Because the controls are simple, the control circuit only needs the microcontroller and a few components to implement all the control functions. Figure 3 shows the resulting schematic. Microcontroller inputs are connected to a divided supply voltage, a digital temperature sensor and the shutdown input. The remaining output is the output driving the MCP1630 clock input. For under-voltage detection, the divided supply voltage is routed to the non-inverting input of the comparator. The inverting input is tied internally to the on-chip 0.6V reference. The software then monitors the comparator output to detect an under-voltage condition.

The temperature sensor is implemented using a digital output device that pulls its output low when the threshold temperature is exceeded. The software monitors the input to detect an over-temperature condition and shuts down the pulse output if the temperature goes to high. When the temperature falls back below the threshold temperature, the sensor output returns high and the software soft-starts the pulse output. Hysteresis built in the temperature sensor prevents chattering and the sensors trip temperature is preset when the sensor is manufactured. The shutdown input, GP1, is tied to whatever remote start-up logic is desired. The software polls the input to determine if a shutdown is requested and terminates the pulse output if the input is low. Raising the input restarts the supply.

DS91085A-page 2

2004 Microchip Technology Inc.

FIGURE 3:

+9V

U5 LM3480-5 +5V C5 0.1 F +9V +C17 22 F 1 F C13 Out In Com 3 C6 0.1 F

2004 Microchip Technology Inc.


L1 +5V C1 0.1 F C7 0.1 F J2 U2 MCP1630 7 VDD DRVR 1 R9 100 C12 1500 pF 6 3 CFB 2 VFB R8 0.56 R6 2.4K 1 C14 1.0 F C15 1.0 F C16 1000 pF 2 3 4 15 VDC Output +5V U1 5 PIC10F206 VDD 1 4 GP0/C+ GP2/T0CKI/CO 3 GP3/MCLR 6 GP1/CVSS 4 OSC 8 VREF 1 COMP VSS 5 2 D1 B230 3 Q1 IRLML2502 2 +5V C11 R10 100K .1 F .033 F +5V C8 0.1 F C3 100 pF 220 F C10 R7 510 U4 4 TC6501 5 Tovr GND 1 GND 2 VDD Hyst 3 2 C9 1 F 1 VIN VOUT VSS 3 U3 MCP1525

+9V

+5V

J1

R1 10K

R2 8.2K

Input

SWITCH MODE POWER SUPPLY SCHEMATIC

R3 1K

C2 1000 pF

DS91085A-page 3

TB085

TB085
SOFTWARE
The software monitors the inputs and generates the output pulse using a simple bit-set/bit-clear loop, expanded to interleave all the input testing. By keeping the bit-set to bit-set time to 4 cycles, the output duty cycle is locked to 25% for a 250 kHz clock. The latency time for a shutdown is 16 cycles. Figure 4 shows the code listing.

FIGURE 6:

CODE LISTING 2
;table of 32 ;set to last

FIGURE 4:
loop BSF BCF BTFSS GOTO BSF BCF BTFSS GOTO BSF BCF BTFSS GOTO BSF BCF GOTO

CODE LISTING 1
;generate a pulse ;test 4 low Vin ;if low shutdown ;generate a pulse ;test 4 hi temp ;if hi shutdown ;generate a pulse ;test 4 shutdown ;if shutdown ;generate a pulse ;infinate loop

PWM PWM CMPOUT Low_volt PWM PWM GP1 High_temmp PWM PWM GP3 shtdwn PWM PWM loop

The soft-start function is generated by ramping up the number of output pulses. At start-up, a single pulse is followed by a long delay. Next, 2 pulses are followed by a shorter delay, then 3, 4 and so on until the pulse chain is continuous. The soft-start code is implemented as a table of bit-set/ bit-clear/delay instructions, similar to code listing 1 with a delay and control section. Figure 5 shows the timing of soft-start and Figure 6 is an excerpt from the actual code.

Soft_Start MOVLW .32 MOVWF counter MOVLW Last-Table MOVWF pointer Loop MOVF counter,w MOVWF count Delay NOP DECFSZ count,f GOTO Delay MOVF pointer,w ADDWF PCL,f Table BSF PWM BCF PWM GOTO $+1 |-----------;29 copies BSF PWM BCF PWM GOTO $+1 Last BSF PWM BCF PWM GOTO $+1 DECF pointer,f DECF pointer,f DECF pointer,f DECFSZ counter,f GOTO Loop loop_forever

;reload delay ;generate delay ;decrement count ;repeat til done ;get pntr 4 jump ;jump

;32 pulse ;2 cycle delay of pulse + delay ;2nd pulse

;add a pulse

;decrease delay ;if 10, continue ;if 0, goto main

CONCLUSION
Using a combination of software and simple hardware, an efficient control for a PWM generator is implemented with many of the features found in more complex controllers. The result is a modular building-block style design with many advanced features that can be easily customized for a customers needs.

FIGURE 5:
PWM Clock

PWM CLOCK

TABLE 1:
GPR Program

MEMORY USAGE
3 bytes 153 words

2004 Microchip Technology Inc.

DS91085A-page 4

Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular Microchip Data Sheet. Microchip believes that its family of products is one of the most secure families 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 knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data Sheets. Most likely, the person doing so is 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 products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.

Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchips products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.

Trademarks The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC, and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel and Total Endurance are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. 2004, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper.

Microchip received ISO/TS-16949:2002 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona and Mountain View, California in October 2003. The Companys quality system processes and procedures are for its PICmicro 8-bit MCUs, KEELOQ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchips quality system for the design and manufacture of development systems is ISO 9001:2000 certified.

2004 Microchip Technology Inc.

DS91085A-page 5

WORLDWIDE SALES AND SERVICE


AMERICAS
Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Web Address: www.microchip.com Atlanta Alpharetta, GA Tel: 770-640-0034 Fax: 770-640-0307 Boston Westford, MA Tel: 978-692-3848 Fax: 978-692-3821 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, MI Tel: 248-538-2250 Fax: 248-538-2260 Kokomo Kokomo, IN Tel: 765-864-8360 Fax: 765-864-8387 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 San Jose Mountain View, CA Tel: 650-215-1444 Fax: 650-961-0286 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509

ASIA/PACIFIC
Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8676-6200 Fax: 86-28-8676-6599 China - Fuzhou Tel: 86-591-8750-3506 Fax: 86-591-8750-3521 China - Hong Kong SAR Tel: 852-2401-1200 Fax: 852-2401-3431 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 China - Shunde Tel: 86-757-2839-5507 Fax: 86-757-2839-5571 China - Qingdao Tel: 86-532-502-7355 Fax: 86-532-502-7205

ASIA/PACIFIC
India - Bangalore Tel: 91-80-2229-0061 Fax: 91-80-2229-0062 India - New Delhi Tel: 91-11-5160-8631 Fax: 91-11-5160-8632 Japan - Kanagawa Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Taiwan - Hsinchu Tel: 886-3-572-9526 Fax: 886-3-572-6459

EUROPE
Austria - Weis Tel: 43-7242-2244-399 Fax: 43-7242-2244-393 Denmark - Ballerup Tel: 45-4450-2828 Fax: 45-4485-2829 France - Massy Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Ismaning Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 England - Berkshire Tel: 44-118-921-5869 Fax: 44-118-921-5820

10/20/04

DS91085A-page 6

2004 Microchip Technology Inc.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy