Building the DIY UNO, Part 3: Testing and Programming Your Custom Board
This is the payoff. You will systematically test every connection on your hand-built board with a multimeter, fix the shorts and missed joints you find, then program the ATmega328P using another board as a programmer and upload the classic blink. When the onboard LED blinks, you have built and programmed a working microcontroller board from raw parts.
Test every pin, expect to find faults
Before powering anything meaningful, you verify every connection with the multimeter's continuity mode, working through the board pin by pin against your wiring diagram. On a hand-soldered board with dozens of crossing wires, you should expect to find several faults; that is normal, not failure. The two that recur constantly are a wire and a header both soldered to the perfboard but not soldered to each other, so they sit side by side without connecting, and an excess blob of solder bridging two neighboring pins. A methodical sweep catches both.
How to read a continuity result
For each connection the diagram promises, put one probe on the chip pin and one on the header or component it should reach; a beep confirms it. Just as important, probe the neighbors that should not connect: if a pin beeps to its neighbor, you have a solder bridge to clear. When testing chip pins, touch the chip's legs directly rather than the socket, so you are measuring the actual chip connection. Two silent points that should beep mean a missed joint; two beeping points that should be silent mean a short.
Programming with another board as ISP
Your bare chip is programmed using another board as an in-system programmer. You load the ISP sketch onto that board, then connect its programming lines, MOSI, MISO, SCK, and reset, to the matching pins on your chip, plus power and ground. In the editor you select the board as ISP as the programmer and use Upload Using Programmer rather than the normal upload button. This pushes the compiled blink directly onto your ATmega328P through those programming pins.
What the bootloader does
A store-bought Uno can be programmed over USB because a small program called the bootloader already lives on its chip and listens for new code at startup. Your freshly built board's chip may not have that, which is one reason you program it through the ISP path. Understanding this explains the difference between the two upload methods: the bootloader is the built-in receptionist that accepts uploads over serial, and ISP programming bypasses the receptionist to write the chip directly.
Working through it
Sweep the power and ground lines. Confirm the 5V header, the regulator output, and chip pins 7 and 20 all connect, and that the ground header and chip pins 8 and 22 connect. A missing beep usually means a header soldered to the board but not to its wire; add solder to join them.
Test the reset circuit. Verify the button, its resistor and diode reach 5V on one side and the reset pin (chip pin 1) on the other, and that the reset header itself is soldered to its wire. You will need reset working for ISP programming.
Map the digital and analog pins. Check each chip pin to its header: pins 2 to 6 and 11 to 19 for the digital pins, pins 23 to 28 for analog A0 to A5, and pin 19 to the onboard LED on pin 13. Probe neighbors to catch bridges, and note if a header row is flipped.
Clear any bridges you find. If two adjacent pins beep together, reheat and remove the excess solder until only the correct connection remains, then re-test.
Program the board. Wire the programmer's MOSI, MISO, SCK, and reset to the chip, open the blink example, select the board as ISP, and choose Upload Using Programmer. The onboard LED on pin 13 should start blinking.
Confirm other pins work. Move an external LED to another pin, change the pin in the code, and re-upload to prove the rest of the board is alive too.
Blink for the finished board (onboard LED on pin 13)
const int ledPin = 13; // the onboard LED you wired to chip pin 19
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
}
Because you wired the onboard LED to pin 13 just like a real Uno, the standard Blink example runs unchanged. Upload it with Upload Using Programmer, and a blinking LED means your hand-built board works.
Common mistakes and troubleshooting
A wire and header both soldered to the board but not to each other. They look connected but are not. Add solder to join the wire to the header pin, then re-test for the beep.
A pin beeps to its neighbor.