Fan regulator - Any advise


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by Jerson View Post
    1. Get triggered by the external interrupt pin on a mains zero crossing
    2. When this happens, the TMR0 timer is loaded with the delay time to fire the triac. Think of this as a phase lag triggering like the triac dimmer you use in your lamps.
    3. The 67 and 155 are limiting values for the delay time, so when you increase the value it should not increase beyond 155 and when you decrease it should not go below 67. If these conditions are not met, you will have weird behaviour on the triac dimmer
    4. The load_value is the delay time I talk of here. The +/-8 is the step for the dimmer value
    Thanks Jason, my name is Damien. Your explanation has showed me light at the end of a looong tunnel. Few questions have risen again:

    1) Does this code wait for any command to start the light/fan or as soon as the circuit is connected it fires the triac?
    2) What is "Nop, Nop..." & why it is repeated many times?

    Thanks again (Getting there)

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default

    Hi Damien

    The code starts right away. It uses the DIM_UP and DIM_DOWN buttons to change the dimming value.
    the NOP commands are repeated as a means of attaining a small delay time between the GPIO.0 on and GPIO.0 off commands. Meaning, make a tiny pulse to fire the triac.

    A tiny warning, the PBPro compiler doesn't support the CONTEXT RESTORE command. You should also read up on Darrel Taylor's instant interrupts to get this working smoothly under PBPro. The interrupts supported by PBPro are too primitive to achieve anything time critical.

    Alain, I think the circuit should be good for a ceiling fan too. The triac rating should help to decide that.

  3. #3


    Did you find this post helpful? Yes | No

    Smile

    [QUOTE=Jerson;77773]
    A tiny warning, the PBPro compiler doesn't support the CONTEXT RESTORE command. You should also read up on Darrel Taylor's instant interrupts to get this working smoothly under PBPro. The interrupts supported by PBPro are too primitive to achieve anything time critical.
    [QUOTE]

    Thanks Jerson (sorry to call you Jason before), where can I read about Darrel Taylor's instant interrupts? & can you advise me of what will be the replacement code for CONTEXT RESTORE (what does it do?))

    Thanks

    P.S: I know that it may be too much to ask, but can someone please make important corrections to this code according to PBPro, I think I will be able to adjust the rest according to my need (atleast I hope)

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink KISS Method

    Hi,

    Looking at this interrupt stubb ... it seems translating it into pure ASM interrupt is fairly easy ... as all commands have their straight asm equivalent !!!

    BTW ... I do not see DT Interrupts fitting into a '629 ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5


    Did you find this post helpful? Yes | No

    Smile PIC Option

    Quote Originally Posted by Acetronics View Post
    BTW ... I do not see DT Interrupts fitting into a '629 ...
    I have 12F635 as well, if that helps

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default

    Am I missing something? I looked up microchip site for 16F629 ... nothing. Is it a 639 and a 635 you talk about?

    As to whether DT instant interrupts fits in a 628 or equivalent, I'm not sure, but I've used assembly language interrupts on a 628. It's very easy once you know.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking

    Hi, Jerson

    You should have a strong coffee ...


    DEVICE 12F629
    CONFIG INTRC_OSC_NOCLKOUT, WDT_OFF, PWRTE_ON, BODEN_OFF, CP_OFF, MCLRE_OFF
    ...
    ...
    lol ...

    For DT interrupts ... the problem is the RAM size, not the Program size ...

    So, a 12Fxxx with enough RAM ( 12F683 i.e. ) is Ok

    It won't fit into a 16F84 nor ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Proportional fan control. I suck at math!
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 3rd January 2010, 23:10
  2. 12f635 & fan regulator
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th August 2009, 22:10
  3. Transistor selection, PWM fan control
    By 124C41 in forum Schematics
    Replies: 5
    Last Post: - 22nd December 2008, 15:33
  4. help with fan controller X10
    By iova in forum General
    Replies: 2
    Last Post: - 11th August 2006, 00:37
  5. Replies: 9
    Last Post: - 30th August 2005, 06:33

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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