PCB design problem in 18F4520

Discussion in 'Embedded Systems and Microcontrollers' started by andrea, Nov 19, 2006.

  1. andrea

    Thread Starter New Member

    Sep 6, 2006

    I used PIC18F4520 in my project, I had a problem in pcb design.My code work line in developmnet board but when I moved it to my own pcb the noise occured (In single side pcb with polygon as ground). The push button sometimes has good respon, sometimes not, it often contacted it self although I don,t press it.
    I will use double layer to reduce the noise. Could you help me how to design a good pcb with little noise? Which one is better ground plane on top or bottom layer?
    thank you.

  2. hgmjr


    Jan 28, 2005
    Without a schematic of your circuit it is difficult to say what might be the source of the noise that is causing your circuit to misbehave.

    Did you use a liberal number of power supply decoupling capacitors located as close as possible to the integrated circuits?

    The use of a ground plane can help to some degree but since you are limited to a double layer PCB, the ground plane is not going to be as effective since it will need to be divided up to make way for your signal traces.

    If you can post a schematic of your circuit, it may be possible to identify techniques that can help improve the susceptability of your circuit to noise.

  3. mrmeval

    Distinguished Member

    Jun 30, 2006
    We'd also need a layout of the PCB as that can cause noise as well.
  4. beenthere

    Retired Moderator

    Apr 20, 2004

    Your problem may be related more to button contact bounce than anything else. The solution is simple in hardware, or elaborate in software. Try placing an R-S latch to handle the button input.
  5. andrea

    Thread Starter New Member

    Sep 6, 2006
    The layout is in attachment, sorry... because file size is greater than max size in gif format. What's wrong with my layout? Next time I will connect JP1, pins 2 and 8 to a microswitch with 2m shielded cable.I have been to use 100n capasitor to reduce S1 bounce but no effect.I used ground planes on top layer. Please help me.
    Thank you,

  6. andrea

    Thread Starter New Member

    Sep 6, 2006
    I'm sorry...just to add that I used 10K resistor as pull down resistor for S1...not seen in the schematics and layout.
    Thank you.

  7. n9352527

    AAC Fanatic!

    Oct 14, 2005
    This might not be an issue with PCB design, but one of circuit design. Looking at your schematic, input pin 15 for S1 is not connected to anything when S1 is open. The voltage level, then, might drift or float to any value when S1 is open, causing your problem.

    Try connecting a resistor from pin 15 to ground, so that when S1 is open pin 15 is at ground potential. Make sure you disable the internal weak pull-up as well.