How to make your own Arduino UNO PCB – ATMega328p

1,464 views

The Arduino uses the ATMega328p chip. We can get that in an SMD format (ATMega328p-AU) or the DIP format for trough hole soldering (ATMega328p-PU). But, the chip by itself can’t work. It needs a few more components and altogether is called the bare minimum configuration of this chip. So In this tutorial, we are going to design our own custom-made “Arduino UNO PCB” using an ATMega328p chip.

JLCPCB is the foremost PCB prototype & manufacturing company in China, providing us with the best service we have ever experienced regarding (Quality, Price Service & Time).

Hardware Table

You will require the following components to make your own Arduino UNO.

Name ValueQTY
ATMega328pIC1
FTDI ModuleR2321
Crystal Oscillator16MHz1
Capacitor100nF,22pf1
Resistor10k,2201
Pin Header

Step 1 – The Simple ATMega328p Circuit

Below we have the schematic for this configuration. As you can see we need a supply of 5 volts. This supply has to be very well regulated with no voltage spikes. For that and an extra 10uF capacitor between 5V and GND. Also, the reset pin is negatively enabled. So, in order to have it disabled, we need to apply 5V to it. For that, a 10k ohms resistor is placed between RESET and Vcc.

ATMega328P-Circuit -Diagram -Schematic
Also, the ATMega328 usually works at 16MHz. For that, between pins 9 and 10 we place a 16MHz crystal. But this crystal, in order to oscillate needs two capacitors of exactly 22pF connected to GND. In the figure above, you have all the pins of the chip. Right now, if the microcontroller has a bootloader, we could upload a code. But let’s imagine it doesn’t have a bootloader.

Step 2 – Burn Bootloader

Now, let’s imagine the chip doesn’t have the bootloader (virgin chip). For that, you have to make the next connections from an Arduino UNO. These are the SPI pins, CLOCK, MISO, and MOSI.

Burn-Bootleader-Atmega328p-Arduino-Uno-Circuit-Diagram-Schematic

Now connect the Arduino to your PC. Open Arduino IDE and go to File → Examples → Arduino ISP and open that example. Select the com of the Arduino UNO board, select the boar as Arduino UNO and upload this code.

Arduino_boot_1

Now make the connections in the past schematic and is time to burn the bootloader. Go to Tools → programmer → Arduino as ISP. By that, we change the programmer to ISP.

Arduino_boot_2

Finally, go to Tools → Burn bootloader. Now the LEDs of the Arduino will blink a lot. Once you get the message of bootloader burned we are good to go.

Arduino_boot_3

Step 3 – Upload a Test code

Before Uploading a test code you first need to Install FTDI Module Drivers. Download FTDI 232 Driver and Install It according to your operating system.

Now, we have the bootloader so we can communicate with the RX and TX pins and upload a code. For that, we need an FTDI module. Make the next connections and Upload this code to our designed Arduino board. If LED is blinking so it means you have successfully designed your own custom Arduino board.

Test Code


void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}


void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}