+ Post New Thread
Results 1 to 17 of 17
  1. #1
    Full Member level 5
    Points: 2,933, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    313
    Helped
    0 / 0
    Points
    2,933
    Level
    12

    solve the problem of noise

    i use external interrupt pin on atmega 8(INT1) to do action, but there is a relay and motor in my circuit which activated the interrupt and execute the action. i used switch debounce but no vain how to solve this problem?

  2. #2
    Super Moderator
    Points: 78,524, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,936
    Helped
    3612 / 3612
    Points
    78,524
    Level
    68

    Re: solve the problem of noise

    Hi,

    Most probably a PCB layout problem or schematic problem (EMC).
    But you don't show schematic and PCB layout. So - how can we help?

    Also there is a chance to find a software solution.
    But then we need your code and more details about load, relay ... and we need scope pictures.

    Currently the only thing we know is "ATmega8 INT" ... but this is not the problem.

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



  3. #3
    Full Member level 5
    Points: 2,933, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    313
    Helped
    0 / 0
    Points
    2,933
    Level
    12

    Re: solve the problem of noise

    i have gnd plane and power plane and i put capacitor 100nf across each switch also relay board is separated from MCU board.the relay board drive small ac motor(grill motor), i tried to use snubber rc circuit 100nf,47 ohm (100ohm) but there was leakage and the relay was always on. the code is too long , should i post it?



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 78,524, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,936
    Helped
    3612 / 3612
    Points
    78,524
    Level
    68

    Re: solve the problem of noise

    Hi,

    read through these similar threads and follow the given recommendations
    * https://www.edaboard.com/showthread....th-drive-relay
    * https://www.edaboard.com/showthread....-led-and-relay

    It problem still is the same: it is called EMC and can be solved by using a solid GND plane (and other minor modifications like properly using decoupling capacitors, filters...)

    I hope you agree, that it makes not much sense to repeat all the posts of the previous threads ... while you ignore the recommendations.

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



  5. #5
    Full Member level 5
    Points: 2,933, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    313
    Helped
    0 / 0
    Points
    2,933
    Level
    12

    Re: solve the problem of noise

    I have followed your recommendations, i did separate gnd plane on double layer pcb and used capacitors. please look at the new MCU board and you will find your recommendations. the problem is still existed



    •   AltAdvertisement

        
       

  6. #6
    Super Moderator
    Points: 78,524, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,936
    Helped
    3612 / 3612
    Points
    78,524
    Level
    68

    Re: solve the problem of noise

    Hi,

    Please review your attachments. I canīt find a double layer PCB layout.

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



    •   AltAdvertisement

        
       

  7. #7
    Full Member level 5
    Points: 2,933, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    313
    Helped
    0 / 0
    Points
    2,933
    Level
    12

    Re: solve the problem of noise

    sorry,MCU board double layer attached



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

    Join Date
    Apr 2014
    Posts
    15,936
    Helped
    3612 / 3612
    Points
    78,524
    Level
    68

    Re: solve the problem of noise

    Hi,

    Some EAGLE hints:
    * please go through some EAGLE tutorials. (Iīve already recommended this in the past)
    Even the schematic is horrible.
    Just see the junction dots. Only the minor count is correct.
    Many junction dots are missing (more that the correct ones)
    Many junction dots are useless (more than the correct ones)
    (A junction dot is just needed where three or more wires are joined)
    I also work with EAGLE. I usually donīt need to add(place) junction dots and I usually donīt need to delete or move junction dots. EAGLE usually does all this for you without extra effort.
    --> You loose time, you get wrong schematics,

    PCB layout.
    * why the big "isolate" value at polygons? It is too high even for hand made PCBs. It makes it impossible for EAGLE to automatically generate GND connections, thus you spend more time to route them manually.
    With your layout I donīt see a single GND connection that needs to be routed manually. --> Itīs EAGLEīs job. No time four you.
    You routed GND signals on the non_GND side. Why?

    * Signals overlap other signals and/or pads. This may cause problems. Example: AVR_pin6 - pusbutton_case

    * you added VIAs where they are not necessary. Example: next to R

    ****
    Please post EAGLE board and schematic and your DRC setup. Maybe packed in a ZIP.

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



  9. #9
    Full Member level 5
    Points: 2,933, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    313
    Helped
    0 / 0
    Points
    2,933
    Level
    12

    Re: solve the problem of noise

    Quote Originally Posted by KlausST View Post
    It makes it impossible for EAGLE to automatically generate GND connections, thus you spend more time to route them manually.
    With your layout I donīt see a single GND connection that needs to be routed manually

    Klaus
    is this a contradiction? should i do it manually on not?
    i attached eagle



  10. #10
    Super Moderator
    Points: 78,524, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,936
    Helped
    3612 / 3612
    Points
    78,524
    Level
    68

    Re: solve the problem of noise

    Hi,

    is this a contradiction? should i do it manually on not?
    Why spend the time to route them manually,
    when EAGLE does it without effort in a better way?

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



  11. #11
    Full Member level 5
    Points: 2,933, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    313
    Helped
    0 / 0
    Points
    2,933
    Level
    12

    Re: solve the problem of noise

    i didn't rout the gnd plane manually eagle did. i rout the signals which eagle can't do it



  12. #12
    Super Moderator
    Points: 78,524, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,936
    Helped
    3612 / 3612
    Points
    78,524
    Level
    68

    Re: solve the problem of noise

    Hi,

    please open the board as in your attachment.

    Then try this:
    please copy line by line in the EAGLE command line and press ENTER
    "//" means informations for you. No need to copy them into the command line.

    Code:
    dis none top bot dim via pad unr tpla tnam
    grid mil 25 2
    group all
    ch wi 24 
    // then right click with the mouse somewhere
    rip gnd
    // all your handmade GND connections are open
    rip vcc
    // all your handmade VCC connections are open
    ch isol 24 
    // then left click with the mouse on the GND polygon (red dotted line)
    // then left click with the mouse on the VCC polygon (blue dotted line)
    rat
    // now all VCC and GND connetions are made by EAGLE
    dis -top -dim
    mov (2550 2600) (3650 2600)
    set wire_bend 1
    split (3650 4000) (3200 1200) (3200 500);
    rip 12V
    ch orphans off
    ch lay bot
    set wire_bend 0
    poly '12V' (2700 3650) (3575 1800) (2700 3650);
    rat
    Iīm in hurry now. Iīll be back in some hours. Good luck.

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



  13. #13
    Full Member level 5
    Points: 2,933, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    313
    Helped
    0 / 0
    Points
    2,933
    Level
    12

    Re: solve the problem of noise

    I executed line by line , the gnd plane disappeared. why did you break the power plane into two polygons?



  14. #14
    Super Moderator
    Points: 78,524, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,936
    Helped
    3612 / 3612
    Points
    78,524
    Level
    68

    Re: solve the problem of noise

    Hi,

    The ground plane should not disappear, it's just not displayed. This was necessary to select the 5V polygone.
    You may use "dis top" to show the top layer.

    The power plane on the left side was useless, because there are no connections.
    But 12V carries most current of all nodes, thus it makes sens to draw a polygone.

    The little example is just to show you how simple and how fast it is to let EAGLE draw the GND connections.
    It is by far not not a good PCB layout, yet....just a couple of steps in the right direction.

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



  15. #15
    Full Member level 5
    Points: 2,933, Level: 12
    Achievements:
    7 years registered

    Join Date
    May 2010
    Location
    usa
    Posts
    313
    Helped
    0 / 0
    Points
    2,933
    Level
    12

    Re: solve the problem of noise

    I don,t know what happened using those lines ? So please explain what you did.you keep telling let eagle draw gnd connections,however i already let him draw gnd i didnt interfere his job as it was easy.will these modificatioņs reduce relay emi



    •   AltAdvertisement

        
       

  16. #16
    Super Moderator
    Points: 78,524, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,936
    Helped
    3612 / 3612
    Points
    78,524
    Level
    68

    Re: solve the problem of noise

    Hi,

    Line by line ..you can see what happens....and if you like you may use the "undo" and "redo" functions.

    In the initial version of your board there were at least 20 hand drawn GND connections. They were necessary because of your too big ISOLATE value of the POLYGINEs. Thus I RIPped up all your hand drawn GND connections, reduced the ISOLATE value and then EAGLE was able to connect GND to all devices automatically.
    This results in less GND impedance and avoided GND loops (areas not filled with GND. They act as antennes for EMI and EMC).

    This is only one step to improve your design regarding EMC.
    There is no simple "modify this item and everything is fine" solution.

    ******
    There are a couple if signals leaving/entering the board. All these should be filtered/protected against EMI, EMC and ESD.
    I see a lot of external signals directly connected to the microcontroller...thus you need to expect problems.

    I'm not sure whether the "external relay board" brings an improvement. (I personally would use one common PCB).
    If the source of noise is "radiated noise" it may bring a benefit, but with the lenghy wiring (they all act as receiving antennas) you may pick up noise while you not necessarily reduce "conducted noise".

    There are many sources of noise that may cause problems.
    * motor, relay, wiring, power supply,

    You need to perform a couple of tests to find the source of noise:
    Beginning from the loads connected to the relays:
    * disconnect the return wire of one load (the wire switched by the relay still is connected) and check whether gives an improvement
    * if not, do the same with the next load ... and check..
    * then disconnect the switched wires of the loads, load by load and check
    * then disconnect the relays at all
    Find out which load, or which load wire causes the problem

    You say that the "interrupt pin" picks up noise and causes the problems. Did you verify this by disabling the interrupt of the pin in question?

    *****
    Other questions/recommendations:
    * the pushbuttons have a metallic case. I recommend to connect it to the GND plane to reduce noise pickup.
    * place filter capacitors close to the pin of the microcontroller with direct connection to the GND plane.
    * in case you have no plated pads/vias holes: directly solder GND connections from TOP GND plane. Especially at the IC socket and the ceramics capacitors.
    * why is the placement of the pushbuttons that random? One is in front of the other that makes it almost impossible to press it.
    * one capacitor at power input is marked 1000uF, but the size is too small...

    Please post some photos of the complete wiring, including PCBs, power supply, loads...

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



  17. #17
    Advanced Member level 4
    Points: 6,247, Level: 18
    kripacharya's Avatar
    Join Date
    Dec 2012
    Location
    New Delhi
    Posts
    1,209
    Helped
    182 / 182
    Points
    6,247
    Level
    18

    Re: solve the problem of noise

    Quote Originally Posted by mshh View Post
    i use external interrupt pin on atmega 8(INT1) to do action, but there is a relay and motor in my circuit which activated the interrupt and execute the action. i used switch debounce but no vain how to solve this problem?
    You are assuming that relay switching etc is causing your interrupt to occur.

    This assumption itself is probably wrong.

    Please give details of your INT1 setup. Is it edge triggered? Positive or negative? Is it level triggered? etc etc.

    You may find that your INT setup itself is wrong. For example, if you setup for level trigger High, and level is usually high, then interrupt will occur immediately.

    Hope you understand?

    If this is so, then endless changing of pcb and adding capacitors will achieve nothing.



--[[ ]]--