PWM pin getting fail in pic18f45k50 when iam trying control the Ceiling Fan .

Discussion in 'Embedded Systems and Microcontrollers' started by Nanda Kumar 1, Aug 27, 2016.

  1. Nanda Kumar 1

    Thread Starter Member

    Aug 25, 2016
    37
    0
    Hi every one,
    Recently i did the project called ceiling fan control using PIC18F45K50 . When I am trying to control the fan PWM pin coming from the microcontroller getting failed .For fan controlling I am using a NXP application notes(http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3471.pdf). Here i attached my schematic. Is there any mistake in my circuit? Aand i given a isolation MOC3021. circuit.jpg
     
  2. DickCappels

    Moderator

    Aug 21, 2008
    2,664
    634
    What is "microcontroller PWM"? Is it synchronized with the zero crossings
    of the mains per the application note?

    While at it, can you expand on wht you mean by "fail"? Do you mean the fan does not even turn on?
     
  3. bertus

    Administrator

    Apr 5, 2008
    15,650
    2,348
    Hello,

    Also what is the output voltage of the MCU?
    If it is 3.3 Volts, the led will get to less current.
    It is recommended to use a drive current of 15 mA for the led in the MOC.
    Also you may try to add a snubber circuit as in the application circuit:

    MOC_application_circuit.png

    Bertus
     
  4. Nanda Kumar 1

    Thread Starter Member

    Aug 25, 2016
    37
    0
    Thank you for u r reply DickCappels .
    1) "Microcontroller pwm" is the signal coming from the micro controller to the MOC3021.
    2) No iam not using the zero crossing.
    3)fan is running with respect to the pwm duty cycle but after some time that particuler pwm pin coming from the microcontroller pin going fail .That pin is not doing any functionality.
     
    Last edited: Aug 28, 2016
  5. Nanda Kumar 1

    Thread Starter Member

    Aug 25, 2016
    37
    0
    m
    Thank you for u r reply.
    1) My micro controller output is 4.9v .
    2) Iam using the snubber RC as 2.2kohms and 0.1 uf.( I uploaded my schematic in above).
     
  6. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,381
    Read the Fairchild APP note AN-3006 for using a method of detecting zero crossing when using a method other than simple RC phase detection, i.e. using a micro etc.
    Max.
     
    Nanda Kumar 1 likes this.
  7. bertus

    Administrator

    Apr 5, 2008
    15,650
    2,348
    Hello,

    In the schematic I posted, the 39 Ohm and 10 nF are for snubbing the triac.
    It will reduce the dV/dt.
    See the attached application note for more info.

    Bertus
     
    Nanda Kumar 1 likes this.
  8. Nanda Kumar 1

    Thread Starter Member

    Aug 25, 2016
    37
    0
    tnq MaxHeadRoom i will try that one
     
  9. Nanda Kumar 1

    Thread Starter Member

    Aug 25, 2016
    37
    0
    Thank you Bertus.
    I will try today and what about the traic .can i use any type traic or is there any particuler traic ?.And what about my schematic ? is there any wrong in that because i did as per NXP AN3471 application note.
     
  10. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,381
    The PWM circuit is only going to fire the triac once per AC cycle, and will also vary the point it fires on the AC supply.
    IOW it is not sync'ed to the incoming frequency.
    Max.
     
    Nanda Kumar 1 likes this.
Loading...