Cold start inrush limiter.

Status
Not open for further replies.
I have just come up with a design for a inrush limiter.
It uses a PIC micro to control a triac.
The PIC increases the phase angle the triac is on until reaches full power.
If the mains disappears it holds the triac off until it reappears then goes through power up phase again.

I have added a resistor across the output to ensure triac holding current is always met even on small loads.

I have snubbered the triac to help control it.
An externally hosted image should be here but it was not working when we last tested it.
 
Last edited:
PCB's arrived OK.
Built one up.
It works fine with a mains lamp. I can see the lamp getting brighter over 2 seconds then it stays on full brightness.
Tried it with a 250VA transformer on an amplifier and after the initial phase ramp up
period the transformer rattles as the triac doesn't latch with gate pulses.
I looked up my triac datasheet and its holding current is 50mA.
This means the mains voltage has to reach 120V before the triac will latch properly.

I have ordered some more mains triacs but with 15mA holding current.
Should be here in a day or two.
 
Got some triacs with lower latching current but the transformer still rattles on full power.

So I have changed the software from give a 1ms triac pulse to giving continuous 15uS pulses until the end of the current mains phase. The circuit now works a treat.

I have tested the circuit with a 2000watt heater and it ramps up and works fine.
I have also tested it wit ha 250 watt amplifier and it behaves very well.
An externally hosted image should be here but it was not working when we last tested it.
 
Last edited:
Hi, glad you got it sorted ! Why not replace the 3k3 7W dropper resistors etc with a simple reactive PS :bulb:

I converted the pic to a white background 😉
 

Attachments

  • Zero D coldstart.png
    Zero D coldstart.png
    224.4 KB · Views: 159
Final PIC code.

;INTH0.ASM
;**********
;INTERNAL OSC, INTERNAL MCLR, POWER UP TIMER ON

;
;ON POWER UP WAIT ONE SECOND
;IF MAINS IS THER RAMP UP PHASE ANGLE UNTIL FULLY ON AND KEEP ON UNTIL MAISN FAILS



LIST R=DEC
LIST P=PIC12F508
;INCLUDE REGISTER DEFINITIONS
INCLUDE P12F508.INC



;_MCLRE_ON EQU H'0FFF'
;_MCLRE_OFF EQU H'0FEF'

;_CP_ON EQU H'0FF7'
;_CP_OFF EQU H'0FFF'

;_WDT_ON EQU H'0FFF'
;_WDT_OFF EQU H'0FFB'

;_LP_OSC EQU H'0FFC'
;_XT_OSC EQU H'0FFD'
;_IntRC_OSC EQU H'0FFE'
;_ExtRC_OSC EQU H'0FFF'



__CONFIG _MCLRE_OFF & _WDT_OFF & _CP_OFF & _IntRC_OSC

INCLUDE MACRO.ASM

;ACCESSES REGISTER BANK BIT
#DEFINE RB0 STATUS,5
;
#DEFINE TRIAC GPIO,0
#DEFINE SWITCH GPIO,1 ;
#DEFINE MAINS GPIO,2 ;
#DEFINE LED GPIO,5 ;


STATEA EQU 6
FIRSTA EQU 0


;***********************
FIRSTRAM EQU 7 ;JUST POINTER TO FIRST RAM LOCATION
DEL1 EQU 7
DEL2 EQU 8
WAITTIME EQU 9
LOOPCOUNT EQU 10
MAINSFLAG EQU 11
TIMEOUTL EQU 12
TIMEOUTH EQU 13
LASTMAINS EQU 14

LASTRAM EQU 1FH
;;;;;;;;;;;;;;;;;;;;;
ORG 0
MOVWF OSCCAL
MOVLW FIRSTA
MOVWF GPIO

CLRWDT

MOVLW STATEA
TRIS GPIO

MOVLW 0C0H ;WEAK PULL UPS OFF & WAKE UP ON PIN CHANGE OFF
OPTION


CALL WAIT1SEC ;LET POWER SUPPLY CAP CHARGE UP.

;;;;;;;;;;;;;;;;;;;;;;;


MLOOP BCF LED
BCF TRIAC

CALL WAITMAINSEDGETIMEOUT
BC MLOOP

MOVLW 8
MOVWF WAITTIME

LOOP1

CALL TOGGLELED

MOVLW 25
BTFSC SWITCH
MOVLW 50
MOVWF LOOPCOUNT

LOOP2
MOVF WAITTIME,W
CALL WAITWMS

CALL WAITMAINSEDGETIMEOUTZ ;WAIT MAINS EDGE WITH TIMEOUT WITH TRIAC ON
BC MLOOP

DECFSZ LOOPCOUNT,F
GOTO LOOP2

DECFSZ WAITTIME,F
GOTO LOOP1


RUNLOOP
BCF LED ;KEEP LED OFF TO SAVE POWER

CALL WAITMAINSEDGETIMEOUTZ ;WAIT MAINS EDGE WITH TIMEOUT WITH TRIAC ON
BNC RUNLOOP

GOTO MLOOP
;******************************
WAITMAINSEDGETIMEOUT
CLRF MAINSFLAG
MOVLW 4
BTFSC MAINS
MOVWF MAINSFLAG
;
MOVLW LOW 1071 ;15MS TIMEOUT
MOVWF TIMEOUTL
MOVLW HIGH 1071
MOVWF TIMEOUTH
WM1 MOVF GPIO,W ;14 US LOOP
ANDLW 4
XORWF MAINSFLAG,W
BNZ MAINSCHANGED

DEC16 TIMEOUTL ;(4US)
MOVF TIMEOUTL,W
IORWF TIMEOUTH,W
BNZ WM1

SETC
RETLW 0


MAINSCHANGED
CLRC

RETLW 0
;********************
;WAIT MAINS EDGE WITH TRIAC ON
WAITMAINSEDGETIMEOUTZ
CLRF MAINSFLAG
MOVLW 4
BTFSC MAINS
MOVWF MAINSFLAG
;
MOVLW LOW 1071 ;15MS TIMEOUT
MOVWF TIMEOUTL
MOVLW HIGH 1071
MOVWF TIMEOUTH
BSF TRIAC
WM1Z
MOVF GPIO,W ;14 US
ANDLW 4
XORWF MAINSFLAG,W
BNZ MAINSCHANGEDZ

DEC16 TIMEOUTL ;(4US)
MOVF TIMEOUTL,W
IORWF TIMEOUTH,W
BNZ WM1Z

BCF TRIAC
SETC
RETLW 0


MAINSCHANGEDZ
BCF TRIAC
CLRC
RETLW 0
;********************
WAIT1MS MOVLW 1
GOTO WAITWMS
MS250 MOVLW 250
;ALSO ENTERED HERE
WAITWMS MOVWF DEL1
MS MOVLW 249
MOVWF DEL2
DD NOP
DECFSZ DEL2,F
GOTO DD
DECFSZ DEL1,F
GOTO MS
RETLW 0
;***********************
WAIT1SEC
CALL MS250
CALL MS250
CALL MS250
GOTO MS250
;*************************
TEST
BSF RB0
MOVLW 0
MOVWF GPIO
BCF RB0

TEST1
CLRWDT
MOVLW 0
MOVWF GPIO
MOVLW 255
MOVWF GPIO
GOTO TEST1
;***********************
WAIT100US
MOVLW 25
MOVWF DEL2
DD100 NOP
DECFSZ DEL2,F
GOTO DD100
RETLW 0
;**********************
TOGGLELED BTFSC LED
GOTO WAS1
WAS0 BSF LED
RETLW 0
WAS1 BCF LED
RETLW 0
;**********************


END
 
Yes that's my mains reference for syncing the triac phase angle to.
Yes I know there should really be two resistors.

That was common practice in the 1990's for washing machines etc.

This is what mistake the programmers generally do. 🙂

They think everything around micro processor is perfect. If not, they simply put a 100nF accross IC supply pins and expect all problems solved.

Back to circuit, i would never connect any pin of a processor directly to the mains... You can use an optic isolator instead.

Real life is not as easy as on development boards.
 
Its standard practice to have a resistance from the mains into a PIC i/o pin.
If I remember correctly the safety rules say there should be two resistors in case one goes faulty.
I use 270K which is only about 1mA into the PIC.
PIC's are quite hardy compared to some other microcontrollers.
There are literally millions of white goods out there doing the same thing.
 
Status
Not open for further replies.