| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
Simple Method Drive Triac With ST52x420 Directly From Main Author
Top Searches for this datasheetAN1221 APPLICATION NOTE Simple Method Drive Triac With ST52x420 Directly From Main Authors: Cucuccio, Presti INTRODUCTION this application note provide user with simple method obtain cheap circuitry driving Triac directly from mains using ST52x420 microcontroller VB409 VIPower device acting 5.2V power supply. particular, will describe possible solution drive load Phase Angle Partialization mode. this case following configuration: Figure Application Block Diagram Vcc=5V Zero cros VB409 Zero Cros T52xx 230V~ TRIAC Firing puls Here, have following blocks: ST52x420: member ST52 microcontroller family VB409: VIPower device obtain 5.2V power supply directly from mains Zero Crossing: simple circuit detect zero crossing mains voltage Triac: device working fourth quadrant switch load Load: generic resistive inductive load phase angle Triac controlled each period main voltage. power transferred load proportional Current Flow Angle This kind triac control suitable drive triac with inductive load (i.e. Universal monophase motors) Fig. shown relation between Phase Angle current flow angle target control Phase Angle equivalently time (see Fig. When motor controlled using this method speed changed increasing decreasing phase angle. Phase Angle must synchronized with main must kept constant during main semi-periods. This means that, when main voltage frequency phase angle changed each mSec. February 2000 1/12 AN1221 APPLICAT NOTE Figure Phase Angle Partialization Mode Angle Current Flow Angle main voltage frequency equal then (see following Figure) equal mSec. order avoid problems triac firing, when load inductive, several pulses must generated. example different pulses used. This characteristic imposes limit Phase Angle time Infact when close Tr/2 triac fired second half period main voltage. example time T1max fixed mSec. considering 50Hz main voltage frequency. Figure Phase Angle Partialization Mode Mains Volta Tr/2 T1max 2/12 AN1221 APPLICATION NOTE ELECTRIC SCHEMATIC have complete idea connections between various devices refer following schematic: Figure Electric schematic 3/12 AN1221 APPLICAT NOTE previous schematic have used micropower voltage supervisor TS831 that acts power-on reset generator microcontroller power failure detector. zero crossing circuit realized with only resistors diodes: limit current, pull-up zero crossing signal, half-wave signal diode) clamp ground zero crossing signal when goes under ground. VB409 fully protected positive voltage regulator. device well suited applications powered from mains requiring 5.2V regulated output voltage without galvanic isolation. DEVICES CONFIGURATION Following will find detailed information devices configuration used this application. ST52x420 Microcontroller fuzzy microcontroller used simply drive triac phase angle partialization mode. ST52x420 reads Phase Angle used, internal converter external potentiometer. synchronization with main obtained using ST52x420 external Interrupt (PC0/INT). time fixed timer PWM/Timer pulses generated software routine using lines obtain gate current needed triac during switch phase. following steps implemented ST52x420 (for more detailed information attached assembler code): Step ST52x420 configuration; Timer configured have output with square waveform. period this signal fixed prescaler value Timer counter value. duty cycle 50%. interrupts programmed generated falling edge Timer output. Step main program, wait external interrupt generated main voltage zero crossing. Step When external interrupt occurs (voltage zero crossing), inside external interrupt routine, desired phase angle read potentiometer Channel This value stored register desired value saturated, example fixed 170. flag `0'. register used load Timer counter. Then Timer starts count. micro waits first PWM/Timer1 Interrupt. calculated using following formula: (Timer 1_Counter escaler Tclk clock master period; Prescaler value prescaler PWM/Timer1. example Tclk=200nSec Prescaler=512. Timer1_Counter value read potentiometer stored register maximum value T1max=8.7mSec. Step When Timer Interrupt occurs, inside Timer interrupt routines, pulses triac firing generated. Considering that T1max 8.7mSec, maximum length pulses must less than mSec. flag Timer reloaded count mSec. flag `1'. system waits next Timer Interrupt. 4/12 AN1221 APPLICATION NOTE Step When Timer Interrupt occurs, firing pulses generated. Then system waits External interrupt. algorithm restarts from point previous steps implemented assembler. code with detailed description shown appendix Fig. shows program flow chart. important configure correctly Timer interrupts. more information ST52x420 data sheet. figure shows Timer1 output relative interrupt generation. Figure Program Flow Chart itializa tion Ext. terru Ext. tart tore value onRAMReg1 saturated Timer start counting Reg1 Flag=0 Time Flag=0 Stop Timer1 Stop Timer1 StrTim1 =10mS Flag=1 Wait rrup ulses generated 5/12 AN1221 APPLICAT NOTE Figure Waveforms Interrupts Main Ext. Int. (0.5) Timer1 Ext. Int. Time Int. Timer1 Int. Output Triac Pulses Start count Flag='0' Start count Flag='1' Stop timer wait Ext.Int. (1.5) Power Supply VB409 this section will describe VB409 obtain stabilized power supply syste.The VB409 positive voltage regulator supplied STMicroelectronics. VB409 provides 70mA output current (internally limited) device well suited applications powered from mains requiring regulated output voltage. theoretical maximum current device source, derived considering that minimum voltage pin, half-period which mains rectified, must least Vout(5V)+Vdropout(2V). maximum voltage changed internally 12.8 VB409. During this time there discharge external capacitor constant current voltage variation linear. Thus, theoretical maximum current device source Imax=CVcapmax/(T/2) this case T/2=10ms,Vcapmax=12.8-7=5.8V, C=47µF then Imax=27mA. Considering current required drive linear part device, possible that Imax=23mA. With this configuration have measured maximum temperature device (without heatsink) lower than consider external electrolytic 100µF maximum theoretical current about Imax=55mA, practice only 40mA must considered because this current value thermal shutdown acts. software tool help with thermal dimensioning VB409 properly choosing external capacitor resistive divider values available. requested electronic mail following address: VIPer.support@st.com. further information VB409, please refer relative data sheet. 6/12 AN1221 APPLICATION NOTE Triac With power supply configuration used application, necessary standard Triac order fire fourth quadrant applying positive pulse with respect ground (and therefore with respect Triac pin). CONCLUSION this application note propose immediate solution member ST52 family microcontrollers without adding additional component realize circuitry power supply Triac Driver. suggest simple zero crossing circuit partialization angle phase load required. 7/12 AN1221 APPLICAT NOTE APPENDIX PROGRAM: un_mot.asm PURPOSE: Universal motor drive DATE: 12/1/2000 This program drives universal motor ;***************** interrupt vector ************************* TIMER_1 EXT_interrupt ;***** Start program testing configurations **** Start: ldrc ldcr ldrc ldcr ldrc ldcr ldrc ldcr interrupt mask configuration disabled (default) interrupt priority configuration from top: ADC, PWM0, PWM1, PWM2 watchdog configuration 62.6ms count configuration Group Chan 0,1, clock divided, power down, continuous, stop conversion Port configuration pins input ldrc ldcr 8/12 AN1221 APPLICATION NOTE ldrc ldcr ldrc ldcr ldrc ldcr ldrc ldcr PWM-Timer configuration default settings PWM-Timer configuration default settings PWM-Timer configuration default settings PWM-Timer configuration Timer mode, interrupt falling TIMEOUT edges, start reset edge, resetted, stopped PWM-Timer configuration square waveform, fclock/512 PWM-Timer configuration Timer mode, interrupt falling TIMEOUT edges, start reset edge, resetted, stopped ldrc ldcr ldrc ldcr ldrc ldcr ldrc ldcr ldrc ldcr ldrc ldcr ldrc ldcr ldrc ldcr PWM-Timer configuration square waveform, fclock/512 Port mode configuration port Port direction configuration pins input Port mode configuration analog Port direction configuration PC0=EXT_INT, PC1-PC3=output pins Port mode configuration loading from ;********* configuration register ******************** 9/12 AN1221 APPLICAT NOTE ldrc ldpr port_C ldrc ldcr ldrc ldcr Enable interrupt ext., timer1 configuration Group Chan clock divided, power continuous, stop conversion configuration Group Chan clock divided, power continuous, start conversion ldrc ldcr ;********* Main Program ************************* Wait: waiti End: Wait EXT_interrupt: ldri ldrc jpns no_sat ldrc no_tim1 no_sat: ldpr ldrc ldcr Load register1 value timer1 counter reg. PWM-Timer configuration Timer mode, interrupt falling TIMEOUT edges, start reset edge, setted, started Read converter store register1 Saturation value=170 enable timer wait next external interrupt 10/12 AN1221 APPLICATION NOTE ldrc flag know first half wave second halfwave no_tim1: reti TIMER_1: ldrc f_t: ldrc First halfwave Check flag ldrc ldcr PWM-Timer configuration Timer mode, interrupt falling TIMEOUT edges, start reset edge, resetted, stopped Load timer counter1 count 10mS ldrc ldpr ldrc ldcr p_tr PWM-Timer configuration Timer mode, interrupt falling TIMEOUT edges, start reset edge, setted, started s_t: ldrc ldcr p_tr: ldrc Second halfwave PWM-Timer configuration Timer mode, interrupt falling TIMEOUT edges, start reset edge, resetted, stopped Send pulses triac 11/12 AN1221 APPLICAT NOTE n_pul1: ldrc ldpr ldrc rit_1: jpnz rit_1 ldrc ldpr ldrc rit_1a: jpnz rit_1a port_C port_C high pulses lenght (high value) pulses lenght (low value) jpnz n_pul1 reti Information furnished believed accurate reliable. However, STMicroelectronics assumes responsibility consequences such information infringement patents other rights third parties which result from use. license granted implication otherwise under patent patent rights STMicroelectronics. Specification mentioned this publication subject change without notice. This publication supersedes replaces information previously supplied. STMicroelectronics products authorized critical components life support devices systems without express written approval STMicroelectronics. logo trademark STMicroelectronics 2000 STMicroelectronics Printed Italy Rights Reserved FUZZYSTUDIOis registered trademark STMicroelectronics STMicroelectronics GROUP COMPANIES http://www.st.com Australia Brazil China Finland France Germany Hong Kong India Italy Japan Malaysia Malta Morocco Singapore Spain Sweden Switzerland United Kingdom U.S.A. 12/12 Other recent searchesXPC2LUY32D - XPC2LUY32D XPC2LUY32D Datasheet PSD913F2 - PSD913F2 PSD913F2 Datasheet NP110N04PUJ - NP110N04PUJ NP110N04PUJ Datasheet BVM-R36TT8 - BVM-R36TT8 BVM-R36TT8 Datasheet 74LVTH162373 - 74LVTH162373 74LVTH162373 Datasheet 2SB764 - 2SB764 2SB764 Datasheet 2SD863 - 2SD863 2SD863 Datasheet 2SA1327 - 2SA1327 2SA1327 Datasheet
Privacy Policy | Disclaimer |