0

I'm using arduino atmega 328p and currently using on custom PCB I programmed using the arduino board and take the IC and migrated to my custom PCB currently the program run well on the arduino board but after i tried to run it in my custom PCB and i found it didn't worked im using along with 16000 mhz oscillator with 22n capacitor

enter image description here

as shown this is my schematic for my PCB

enter image description here

this is my trace for my PCB board

so is this problem caused by my schematics or i didn't upload the bootloader?

  • 3
    You have no decoupling capacitors. Your crystal layout is abysmal. – Majenko Sep 21 '18 at 15:28
  • what do you mean by abysmal and decoupling capacitors? – Asrul Asyraff Sep 21 '18 at 15:31
  • By abysmal I mean: crystal is too far from the chip pins. The capacitors are poorly grounded. The traces are too angular. There is no guard ring or ground pour. If you don't know what decoupling capacitors are then you need to go and learn the basics of digital circuit design. – Majenko Sep 21 '18 at 15:32
  • 1
    Did you use 22nF with the crystal? You need 22pF. 16 MHz = 16 x 10^6 = 16,000,000 Hz (not hz). 16000mhz is not correct, that's like 16000 x 10^-3 = 16 Hz. M = Mega = 1 million. m = milli = 1/1000. u = micro = 1/1000000. – CrossRoads Sep 21 '18 at 15:38
  • I like to give folks the benefit of the doubt, and correct when needed. Must be the engineer/coach in me, and plenty of non-native English/American/engineer interactions. – CrossRoads Sep 21 '18 at 15:42
4

Schematic corrections:

Missing 0.1uF caps on VCC, AREF pins.

AREF pin connected to 5V - don't do that. It will connect internally using the ADC Mux if used.

C1, C6 need to be 22pF as noted earlier.

Xtal and C1, C6 should be right next to the chip as noted, with no traces going under the xtal.

Board should have Gnd plane anywhere there is not a trace.

Use Vias to connect top & bottom Gnd planes.

Do not use traces to connect all the Gnds - have pins connect to the Gnd planes instead.

Add a 1uF or 10uF electrolytic capacitor where power comes into the board, especially if the power leads will be long.

  • can i have a full schematic drawing include the components as u listed? – Asrul Asyraff Sep 21 '18 at 16:11
  • 2
    Sure, arduino.cc/en/uploads/Main/Arduino-Pro-Mini-schematic.pdf This has a resonator instead of the crystal and caps, and also shows a voltage regulator. – CrossRoads Sep 21 '18 at 16:14
  • i currently using atmega 328p ... is this usable for atmega328p instead atmega328? – Asrul Asyraff Sep 21 '18 at 17:25
  • 1
    i just looked at my custom board that i just make. i found out that the pin 20 doesnt have any trace connected anywhere. is this can be a problem that causes my arduino didn't work? – Asrul Asyraff Sep 21 '18 at 18:53
  • 1
    Yes! The chip needs power to work. VCC and AVCC both need to connect to 5V, both should have a 0.1uF cap connected to them also. – CrossRoads Sep 22 '18 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.