About three years ago, I built and manufactured a DIY Arduino board with a custom PCB design. I created the schematic and PCB layout myself and had it fabricated by NextPCB. They were generous enough to manufacture and provide the board free of charge.
After receiving it, I assembled the components onto the board, but unfortunately, it didn’t work. That was disappointing, and despite my efforts, I couldn’t identify the fault. I had always wanted to figure out what went wrong, but between being busy and uncertain whether repair was even possible, I left it aside. At the time, everything looked fine to me, yet the problem remained hidden.
This week, I finally had the chance to revisit the board. I investigated thoroughly, discovered the issues, and repaired it. Now, it works perfectly.
The problems were in my design—I had made a couple of mistakes in the schematic. NextPCB had manufactured the board exactly as I had designed and submitted the files, so the errors were entirely on my end. Actually, NexPCB did a fantastic job. Their tools were easy to use, process of uploading pcb design files, finding possible layout error was also fantastic. The NextPCB DFM tool, better known as HQDFM, is a free online Gerber viewer and Design for Manufacture (DFM) tool that helps analyze PCB production files. You can also download the HQDFM tool for free.
Actually, this time around, it did not take long to find and solve the problems on the PCB board. I began troubleshooting by checking all the pins of the ATmega328P to the headers with a continuity checker. There was nothing wrong with the connection between the IC pins to the header pins. This was a bit of a relief, but at the same time it was also scary since the problem could be far more serious, possibly beyond repair. I think I did this continuity check back when I first realized the board was not working.
There were several mistakes in my circuit and PCB design, and I wanted to record here my hands on experience repairing the board. The main problem was the power supply connection to the Vcc pin, incorrect use of one of the resistor value, used a capacitor which was not needed at all, connection to the Vref pin.
I will break the problem and explain individually how I repaired them.
1. Reset Pin 1 direct connection to Vcc pin 7
This was one of the main blunders. I connected the reset pin 1 directly to the Vcc pin 7. This was a fatal connection. The $V_{CC}$ pin 7 is connected to power supply +5V via the $R_1$ $10 k\Omega$ resistor. That is the $R_1$ $10 k\Omega$ resistor is sitting between the $V_{CC}$ pin 7 and +5V power supply. This is shown in the circuit schematic and on the PCB layout.
The fix:
To remedy this, I had to physically cutoff the trace between the reset pin 1 and $V_{CC}$ pin 7.
2. AVCC pin 20 was left unconnected.
Another blunder was that the $AV_{CC}$ pin 20 was left unconnected. It was just routed to the header pin as shown in the picture below. The thing is even if we aren't using the ADC, $AV_{CC}$ must be powered for the chip to function reliably. The ATmega328P uses this pin to power the internal ADC and some of the Port C I/O. If left floating, I might get erratic behavior on those pins.
The Fix:
I solved this by connecting the ($AV_{CC}$) pin 20 to $V_{CC}$ pin. That is, I added a small jumper wire between Pin 7 ($V_{CC}$) and Pin 20 ($AV_{CC}$).
3. Capacitor removed
A $0.1 \mu F$ capacitor ($C_6$) was connected from one end of the $R_3$ $10 k\Omega$ pullup resistor to the header pin. In Arduino-compatible designs, a $0.1\mu F$ capacitor is used for Auto-Reset.
When one adds in the Adjustment Pin Current (usually about $50\mu\text{A}$ to $100\mu\text{A}$) that flows through $R_2$, the voltage climbs even further. On the board, that current adds roughly another $0.2\text{V}$ to $0.3\text{V}$:













