Problem With 220 VAC Halogen Lamp Dimming


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Problem With 220 VAC Halogen Lamp Dimming

    You need to post the schematic and the code, if you want some real help.

    Cheers

    Al.
    All progress began with an idea

  2. #2
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Problem With 220 VAC Halogen Lamp Dimming

    Having looked into Halogen lamps I noticed that there are Dimmable versions and was wondering what can be the difference between standard Halogen lamps and dimmable Halogen lamps?

  3. #3
    Join Date
    Jul 2008
    Location
    TURKIYE-KONYA
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Re: Problem With 220 VAC Halogen Lamp Dimming

    Quote Originally Posted by aratti View Post
    You need to post the schematic and the code, if you want some real help.

    Cheers

    Al.
    Hi aratti,

    This is the test code that i have used always for many projects. The microcontroller is PIC16F876A. PORTB.0 is Zero Cross Detect Input. PORTB.7 is fire triac output.

    Code:
    INCLUDE "DT_INTS-14.bas"     ' Base Interrupt System
    
        
        TRIAC       VAR PORTB.7
        
        TIMEX       VAR WORD
        TIMEX_L     VAR TIMEX.LOWBYTE
        TIMEX_H     VAR TIMEX.HIGHBYTE
    
        OUTPUT  TRIAC
        INPUT   PORTB.0
        
        TRISC   = 255
        TRISA   = %111111
        
        
        ADCON1  = 7
        
        T1CON = 0
        CCP1CON = %00001010
        TMR1L   = 0
        TMR1H   = 0
        OPTION_REG  = %11000000
        
        
        FLAG  = 0
        TIMEX = 9000
        
        CCPR1L      = TIMEX.LOWBYTE
        CCPR1H      = TIMEX.HIGHBYTE
        
        
        LOW TRIAC
        
        
        PAUSE 100
        
        ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
        INT_Handler   INT_INT  ,  INT_GEL_1,   ASM,  yes
        INT_Handler   CCP1_INT   ,  INT_GEL_2,   ASM,  yes
            ;INT_Handler   TMR0_INT  ,  TMR0INT,   ASM,  yes
        endm
        INT_CREATE               
        ENDASM
    
    @ INT_ENABLE  INT_INT
    @ INT_ENABLE  CCP1_INT
    
       MAIN :
        
        
        
        TIMEX = TIMEX + 1
        
        
        IF TIMEX >= 9600 THEN
            FLAG = 0
            low TRIAC
        ELSE
            FLAG = 1
        ENDIF
        
        PAUSE 1
    
    
        
        GOTO MAIN
        
        ASM
    INT_GEL_1
        
        BCF _TRIAC
        BSF T1CON,0
        
        INT_RETURN 
        ENDASM
        
        ASM
    INT_GEL_2
        
        BTFSC _FLAG , 0
        BSF _TRIAC
        BCF T1CON , 0
        CLRF TMR1H
        CLRF TMR1L
        
        
        
        MOVF    _TIMEX_H , W
        MOVWF   CCPR1H
        
        MOVF    _TIMEX_L , W
        MOVWF   CCPR1L
        
         
        
        INT_RETURN 
        ENDASM
    
    END

Similar Threads

  1. PIC to AC 220 V switch
    By boban in forum Schematics
    Replies: 9
    Last Post: - 3rd April 2008, 19:38
  2. help w/ lamp dimming using Pic12f675
    By DUDONG in forum General
    Replies: 3
    Last Post: - 18th October 2007, 13:40
  3. need help with lamp dimming using Pic12f675
    By DUDONG in forum mel PIC BASIC
    Replies: 0
    Last Post: - 17th October 2007, 10:44
  4. Switchmode halogen transformer question
    By George in forum Off Topic
    Replies: 2
    Last Post: - 11th February 2007, 10:13
  5. 220 to 110 to 24 volts DC
    By Ron Marcus in forum Off Topic
    Replies: 1
    Last Post: - 18th October 2006, 17:15

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts