Noise in a 2 layer PCB

Discussion in 'Embedded Systems and Microcontrollers' started by TCOP, Feb 18, 2013.

  1. TCOP

    Thread Starter Member

    Apr 27, 2011
    89
    0
    Hi all,
    I just made my first homebrew 2 layer PCB and things didn't work as expected.
    I tried to shrink an already working circuit of mine which utilizes a 2x16 lcd which is driven by a PCF8574 and I2C. The mcu used is 16F88 on 4mhz. So, first time everything went ok. Then my board did not work and all I was seing was garbage in my LCD. Then it worked again. Then it stopped again..and so on. I thought it might be a timing problem since i used a new HD44780 so i switched to my old LCD to verify it. Nothing happend. I've been desoldering and resoldering my board the last 2 days, trying to find what is wrong, but I can't find it. I've increased all my delay routines and went up to 50ms for sending data and chars to the LCD but I get no difference. I thint that noise is the cause but i can't explaing it since my board will work after 10-15 resets and the same code and circuit works 100% in a one layer PCB. Are there any guidelines about investigating the cause? I found that the PCF returned a wrong output so I decided to change it but nothing. Some times it works properly and sometime i doesn't and is driving me crazy.
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,421
    3,356
    Did you put 0.1μF and 10μF filter capacitors across the power and ground lines?
     
  3. TCOP

    Thread Starter Member

    Apr 27, 2011
    89
    0
    I've placed 0,1μF capacitor next to the mcus and an other one after the 7805.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    It might help if you post a complete schematic, and also a picture of the build.
     
  5. TCOP

    Thread Starter Member

    Apr 27, 2011
    89
    0
    ok...I've soldered the decoupling caps straight on the IC's pins to shorten their distance even more. The results are better so i'll change their position on the next prototype, but still not good enough to consider my board stable. Any other recomendations?
     
  6. TCOP

    Thread Starter Member

    Apr 27, 2011
    89
    0
    :)
    The complete schematic is 2 A4 pages. It is not a good idea to show it. I am sure my problem is noise and noise only.
     
  7. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Oh yes, if you want help post your schematic. And perhaps a picture of your PCB also
     
  8. TCOP

    Thread Starter Member

    Apr 27, 2011
    89
    0
    sorry for not replying but asking help shouldn't mean to make more effort than what it would need to solve the problem on my own.
    Problem fixed now. It turned out that I2C was very sensitive in such a condensed board. I changed the pull up resistors from 10k to 2,2k and everything went back to normal.
    This was quite strange though.
    What is the reccomended clearance for the ground plane?
     
  9. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I am glad you fixed your problem. But you should know that. As long we are not sitting beside on your work bench. We DO NEED as much information as we can get. And that will say schematics and other relevant information. It does not have to be a computer drawn schematic. You can use a pen and paper scan it, or take a snapshot. But some sort of schematic is essential then asking for help in any electronics forum.
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    The less effort you put into your questions, the less effort we put into our answers.

    Clearance from what? Water? Stray dogs? The undead?
     
  11. TCOP

    Thread Starter Member

    Apr 27, 2011
    89
    0
    :) I meant the isolation field in Eagle....Altough it is tempting to ask about the undead
     
Loading...