+ Post New Thread
Results 1 to 10 of 10
  1. #1
    Junior Member level 1
    Points: 230, Level: 2

    Join Date
    Apr 2018
    Posts
    17
    Helped
    0 / 0
    Points
    230
    Level
    2

    How to resolve Malfunction of MCU operated ckt from appliances switches open/close

    Click image for larger version. 

Name:	circuit diagram.jpg 
Views:	9 
Size:	491.2 KB 
ID:	150531

    With the circuit attached, all are mounted on BREADBOARD and power supply(PHASE and Neutral, 230v/50hz)) taken out from a SWITCH BOARD (230v/50hz) through a EXTENSION BOARD(230v/50hz) and all are exercise on BREADBOARD and EXTENSION BOARD.
    All are working as EXPECTED, But

    Problems are,
    whenever any Switch/s (connected at appliances, like FAN and Fluorescent Tube Light with magnetic choke coil) from SWITCH BOARD is turn ON/OFF then, the BREADBOARD output(ie, Triac Output, Output1/Output2 connected with Incandescent Bulbs ) gets Flicker Once on every pressing of Switches from the SWITCH BOARD. And

    It also notice that the BREADBOARD output/s gets turn ON/OFF SOMETIMES on pressing of switch from SWITCH BOARD to turn off and on the connected load of SWITCH BOARD.

    Briefly, it can be said, BREADBOARD circuit get response on opening/closing of switches from SWITCHBOARD.

    Could you please let me know HOW to resolve this malfunction??

    many thanks all of you...

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 76,149, Level: 67
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,451
    Helped
    4147 / 4147
    Points
    76,149
    Level
    67

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    The cure is in the layout. There is no circuit or wiring fault but signals will be inductively or capacitively coupled between the load and the PIC, particularly through the AC power wiring. What to try:

    1. ensure none of the other PIC pins are floating, if they are they will pick up interference.
    2. run two ground wires instead of one to reduce ground impedances.
    3. ensure the crystal loading capacitor are returned as close to the VSS pin as possible.
    4. try removing R11 and use the PIC internal reset circuit instead.
    5. try a capacitor (100nF) across the secondary of the power transformer.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  3. #3
    Super Moderator
    Points: 28,186, Level: 40
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,408
    Helped
    1064 / 1064
    Points
    28,186
    Level
    40
    Blog Entries
    6

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    Breadboards are prone to catch noises of any sort, so it is expected to minimize switching effects with a good layout, according to best practices on PCB design. In addition to the above tips, the lack of a ceramic capacitor at the MCLR pin is another candidate of the issues you are facing, I would bet your 5v bus is not too clean, so adding a filter at this line (eg. a Capacitor-Resistor-Capacitor arrangement ) could give some noise imunity.

    - - - Updated - - -

    BTW, from where comes the signal "Zero crossing" drawn at above schematic?
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



    •   AltAdvertisment

        
       

  4. #4
    Advanced Member level 5
    Points: 38,026, Level: 47

    Join Date
    Mar 2008
    Location
    USA
    Posts
    6,143
    Helped
    1784 / 1784
    Points
    38,026
    Level
    47

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    The three possibilities are:
    1) Conducted EMI (power supply and ground noise)
    2) Radiated EMI (pickup on long high impedance wires)
    3) Spurious signaling (control wires being bounced at
    the source)

    1) and 3) can be traced methodically with an oscilloscope.
    2) is tougher, just attaching a probe to a suspect node
    may alter its Z0 to the point that behavior changes. This
    is itself a "datum". A "sniffer coil" to look for spurious
    emitters, and a coil driven hard to look for sensitive features,
    may be useful (but this is M, not EM, and may be better for
    detecting sensitive -loops- than simple "antennae"



    •   AltAdvertisment

        
       

  5. #5
    Junior Member level 1
    Points: 230, Level: 2

    Join Date
    Apr 2018
    Posts
    17
    Helped
    0 / 0
    Points
    230
    Level
    2

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    Thanks all of you for your suggestions.
    I will get you update once try your each points. But let me update for the points as mentioned by,
    Betwixt::
    4. try removing R11 and use the PIC internal reset circuit instead.
    As my config is,

    //__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_OFF & MCLRE_ON & BOREN_ON & LVP_OFF & CPD_ON & CP_ON);

    Should i use config as below ,

    //__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_ON & MCLRE_OFF & BOREN_ON & LVP_OFF & CPD_ON & CP_ON);

    And then MCLR pin becomes digital i/p and MCLR internally disabled.

    Is my concept clear about removing of R11 means..Pl update me if wrong..

    andre_teprom::
    adding a filter at this line (eg. a Capacitor-Resistor-Capacitor arrangement ) could give some noise imunity.
    Could you share a link for considering design for the filter...

    dick_freebird::
    Actually I have no scope to catch right now. I am thinking to buy one. Could you suggest a DSO brand/model name for that work.

    TNX ONCE AGAIN FOR ALL OF YOUR REPLY..
    Last edited by BradtheRad; 12th January 2019 at 07:36. Reason: Changed code tags to quote tags



  6. #6
    Super Moderator
    Points: 76,149, Level: 67
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,451
    Helped
    4147 / 4147
    Points
    76,149
    Level
    67

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    Should i use config as below ,
    //__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_ON & MCLRE_OFF & BOREN_ON & LVP_OFF & CPD_ON & CP_ON);
    PWRTE just enables a clock pulse counter that holds the internal reset condition until the oscillator has stabilized, once running it has no further use so it's up to you how you configure it, changing it will not fix your problem. The MCLRE is what matters, it decides whether the MCLR pin is the reset input or whether the PIC generates its own reset signal. If noise is getting in through the pin, using the internal reset may work better. If you do use 'MCLRE_OFF', connect the pin to ground so it isn't left floating. Any pin left to float is a potential cause of your problem.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  7. #7
    Junior Member level 1
    Points: 230, Level: 2

    Join Date
    Apr 2018
    Posts
    17
    Helped
    0 / 0
    Points
    230
    Level
    2

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    update....
    1) there are no floating pin all the pins put them as digital output with resistor-LED.>> AND ALL OF THEM WORKING CORRECTLY AS EXPECTED.
    2) r11 removed and 'MCLRE_OFF' and this pin has been connected directly to ground>> with this, the problems getting BEARDBOARD O/P ON/OFF on switching ON of the AC POWER WIRING SWITCH has eliminated but the problems on switching OFF of AC POWER WIRING still influencing the o/p of BEASBOARD O/P.
    3) 100nf ceramics and polyster film(100nf, 400v) also incorporated>> but no improvement found here.
    4) ground wire also been considered with separate, one for mcu ckt and other for output pin for driving the mcu o/p for load, each drawn from power supply unit.

    Basically it is found that, main problems coming on Switching_OFF of AC POWER LINE WIRING WHICH IS WITH Fluorescent tube light with magnetic iron core choke coil with starter connected.

    So, how it may be prevent of this choke coil..
    please suggest..
    tnx



  8. #8
    Super Moderator
    Points: 68,694, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,017
    Helped
    3209 / 3209
    Points
    68,694
    Level
    63

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    Hi,

    First response, first sentence:
    The cure is in the layout.
    I agree with this.

    A breadboard simply is not suitable to generate EMC compliant circuits.
    That's why one designs PCB with a solid GND plane.

    Read about EMI, EMC and how to design such layouts.
    There are many discussiins here and in the internet, and in many datasheets, application notes, tutorials, videos...
    All information is still available, you just have to learn and use it..

    There is no simple 5 minutes forum solution...

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  9. #9
    Junior Member level 1
    Points: 230, Level: 2

    Join Date
    Apr 2018
    Posts
    17
    Helped
    0 / 0
    Points
    230
    Level
    2

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    ok..
    could u please leave out those link if possible..
    tnx for help



  10. #10
    Junior Member level 1
    Points: 230, Level: 2

    Join Date
    Apr 2018
    Posts
    17
    Helped
    0 / 0
    Points
    230
    Level
    2

    Re: How to resolve Malfunction of MCU operated ckt from appliances switches open/clos

    As I told that my mcu is 16f628A, working on HitechC, and command is given from tv ir nec remote to operate led/s as o/p..
    Why MCU GETTING RESET sometimes and somtimes not?
    I have taken all pins as o/p (there are no unconnected) and connected with led with resistor as o/p.

    the pin are connected as follows:
    RA0 to RA4 >> as o/p pin.
    PORT A::::
    RA5/MCLR/VPP>> pin, if either uses as internal reset with the config>>//__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_OFF & MCLRE_OFF & BOREN_ON & LVP_OFF & CPD_ON & CP_ON); and connected with gnd directly. >> no improvement from getting reset of the mcu.
    or uses as external reset with //__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_OFF & MCLRE_ON & BOREN_ON & LVP_OFF & CPD_ON & CP_ON); with extrnal pull up resistor.
    RA6-RA7>>Xtal

    PORT B::::

    RB0>> using as zc interrupt.
    RB1 to RB6>> as o/p with led.
    RB7>> IR SENSOR

    It is able to keep turn on sometimes ANY 8 nos o/p and then gets reset. sometimes ANY 6, 5, 4...and 2 nos out of all 9 nos o/p without any h/w modification.


    what is the problems can u suggest.
    tnx



--[[ ]]--