System Design

From Arduino Prototype to Custom PCB: A Step-by-Step Guide

How to turn an Arduino prototype into a custom PCB: choosing the MCU, the minimal ATmega328P circuit, modules, power, layout, ordering boards and bring-up.

On this page
  1. Do you actually need a custom PCB?
  2. Step 1: Freeze and document the prototype
  3. Step 2: Decide which microcontroller to use
  4. Step 3: Design the core microcontroller circuit
  5. Step 4: Turn shields and modules into schematic blocks
  6. Step 5: Design the power supply
  7. Step 6: Choose a PCB design tool
  8. Step 7: Lay out the PCB
  9. Step 8: Check the design and generate manufacturing files
  10. Step 9: Order prototype boards
  11. Step 10: Bring up the first boards
  12. Step 11: Port and harden the firmware
  13. Step 12: Iterate, then plan for production
  14. Common first-PCB mistakes

Do you actually need a custom PCB?

An Arduino and a breadboard are a great way to prove an idea works. But a tangle of jumper wires isn’t reliable, doesn’t fit in an enclosure, and costs more per unit than a dedicated board. A custom printed circuit board (PCB) makes sense when you want to:

  • Build more than a handful of units.
  • Fit the electronics into a specific enclosure.
  • Make the device robust against vibration, loose wires and handling.
  • Reduce power consumption or cost.
  • Sell the product.

There are also in-between options. You can design a simple “carrier” board that an Arduino Nano, a Raspberry Pi Pico or a wireless module plugs into. This removes the wiring problems without designing the microcontroller circuit yourself, and is a reasonable first step for low-volume projects.

Step 1: Freeze and document the prototype

Before opening any design software, make sure you know exactly what you’re building:

  • Draw a block diagram of every part: the microcontroller, sensors, displays, motors, buttons, power source.
  • Record every connection from the breadboard: which Arduino pin goes where, and any resistors, capacitors or transistors in between.
  • List the components with exact part numbers, especially for breakout modules.
  • Measure the current draw of the whole prototype in each operating mode.
  • Note what you’d change. A prototype often reveals missing features, such as a reset button, a status LED or a spare connector for expansion.

Getting this right now prevents expensive board respins later.

Step 2: Decide which microcontroller to use

Keep the ATmega328P

If your prototype runs on an Arduino Uno or Nano, the simplest path is to keep the same chip, the ATmega328P. Your code and libraries will work unchanged, and the Arduino board designs are open source, so you can study their schematics for reference.

Move to a different MCU or module

Moving to another part can make sense if you need more memory, lower power, built-in Wi-Fi or Bluetooth, or a lower price at volume. Popular options include the RP2040 (as on the Raspberry Pi Pico), STM32 parts, and ESP32 modules for wireless products. Many of these can still be programmed with the Arduino framework, which makes porting easier, though you’ll need to check that your libraries support the new chip. Our guide on how to choose a microcontroller walks through the decision.

For wireless designs, using a pre-certified module rather than a bare chip is usually much easier: the module includes the radio, antenna design and often the crystal, and it carries its own radio certification, which can simplify regulatory testing of the final product.

Step 3: Design the core microcontroller circuit

Minimal ATmega328P circuit

An Arduino Uno contains a lot more than you need. A minimal standalone ATmega328P circuit running at 16 MHz typically needs:

  • The ATmega328P itself, in a through-hole DIP, TQFP or QFN package.
  • A 16 MHz crystal with two load capacitors (often around 22 pF, but check the crystal’s datasheet), or a ceramic resonator. You can skip this and use the internal 8 MHz oscillator if your timing needs are relaxed, but you’ll need to set the chip’s fuses and bootloader to match.
  • A pull-up resistor on the RESET pin, commonly 10 kΩ to VCC, plus an optional reset button to ground.
  • Decoupling capacitors: a 100 nF ceramic capacitor close to each VCC and AVCC pin, plus a larger bulk capacitor on the supply.
  • AVCC connected to VCC, even if you don’t use the ADC; the datasheet recommends filtering it, for example with a small inductor or resistor and capacitor, when you do use analog inputs.
  • A 100 nF capacitor from AREF to ground if you use the internal reference.

Always confirm values against the current datasheet. Our article on power supply and decoupling design explains why the decoupling capacitors matter and where to place them.

Programming and USB options

You need a way to get firmware onto the chip:

  • ISP header: a 6-pin in-system programming header (MISO, SCK, MOSI, RESET, VCC, GND) lets you program the chip with a USBasp, an AVR programmer, or another Arduino running the “Arduino as ISP” sketch. You’ll also use this to burn the bootloader onto new, blank chips.
  • Serial bootloader: once the Arduino bootloader is installed, you can upload sketches over a serial connection as usual. Add a header for an external USB-to-serial adapter, and connect the adapter’s DTR line to RESET through a 100 nF capacitor so the board resets automatically for uploads, as on the Arduino.
  • On-board USB: if users will plug the device into a computer, add a USB-to-serial chip such as a CH340, CP2102 or FT232. The Uno uses an ATmega16U2 for this, but a dedicated bridge chip is simpler.

Remember that TX on the microcontroller connects to RX on the serial adapter, and vice versa. Swapped serial lines are one of the most common first-board mistakes.

Step 4: Turn shields and modules into schematic blocks

Most prototypes use breakout boards: a sensor on a small blue PCB, a motor driver shield, a display module. For each one you have two choices:

  1. Keep the module and add a header or footprint for it on your board. This is quick and low-risk, but adds height, cost and a connector that can work loose.
  2. Put the chip directly on your board. This is smaller and cheaper at volume, but you must reproduce the support circuitry.

If you put the chip on your board, find the module’s schematic, which many vendors publish, and look for:

  • Voltage regulators: many modules include a regulator so they accept 5 V. If your board runs at 3.3 V, you may not need it.
  • Level shifters: modules sometimes translate between 5 V and 3.3 V logic.
  • Pull-up resistors: I2C modules usually include pull-ups. If you combine several modules on one bus, they can add up to an unexpectedly strong pull-up; on your own board, fit one set.
  • Decoupling and filtering components recommended in the chip’s datasheet.

Check the chip’s datasheet for a recommended application circuit and layout guidance; this is usually the most reliable starting point.

Step 5: Design the power supply

The Arduino’s USB connection or barrel jack has been powering your prototype. Your board needs its own supply design:

  • Input source: USB, a wall adapter, batteries or a wider-range industrial supply.
  • Regulation: a linear regulator (LDO) is simple and quiet for small currents and small voltage drops; a switching regulator is more efficient when stepping down from a higher voltage or supplying larger currents.
  • Separate high-current loads: motors, solenoids and LED strips should have their own supply path so their current spikes don’t reset the microcontroller. Add flyback diodes across inductive loads such as relay coils.
  • Protection: consider a fuse or polyfuse, reverse-polarity protection and, for external connectors, ESD protection.

For battery-powered designs, the regulator’s quiescent current and the board’s sleep current become critical; see our guide to low-power embedded design.

Step 6: Choose a PCB design tool

Common choices include:

  • KiCad: free, open source and widely used, with a large library and many tutorials. A good default for most hobbyists and small companies.
  • EasyEDA: browser-based and tightly linked to JLCPCB’s ordering and parts library, which makes ordering assembled boards straightforward.
  • Altium Designer, OrCAD and similar professional tools: powerful but expensive, more common in companies.

Whichever you choose, the workflow is the same: draw the schematic, assign a footprint to every component, then lay out the board.

Step 7: Lay out the PCB

Some practical layout guidelines for a first board:

  • Start with mechanical constraints: board outline, mounting holes, connector positions and enclosure clearances.
  • Place parts before routing. Put the microcontroller near the centre, connectors on the edges, and decoupling capacitors right next to the pins they serve.
  • Use a ground plane. On a two-layer board, dedicate as much of one layer as possible to a continuous ground pour. Four-layer boards with dedicated ground and power planes are more expensive but make layout easier and reduce noise.
  • Keep high-current and noisy paths short, and keep them away from sensitive analog signals and the crystal.
  • Place the crystal close to the MCU with short traces.
  • Make power traces wide enough for their current; online trace-width calculators can help.
  • Follow module layout rules, especially antenna keep-out areas on wireless modules, where copper should not be placed nearby.
  • Add test points for power rails and key signals, and label connectors and pins on the silkscreen.

Step 8: Check the design and generate manufacturing files

Before ordering:

  • Run the electrical rules check (ERC) on the schematic and the design rules check (DRC) on the layout, using your manufacturer’s minimum trace width, spacing and drill sizes.
  • Print the layout at 1:1 scale and place real components on it to check footprints.
  • Double-check pinouts of every connector, regulator and transistor, comparing footprints with datasheets.
  • Review the design with someone else if possible.

Then generate:

  • Gerber files for each copper, solder mask, silkscreen and outline layer, plus drill files.
  • A bill of materials (BOM) with manufacturer part numbers.
  • A pick-and-place (centroid) file if the board will be machine assembled.

Step 9: Order prototype boards

You can order bare boards and solder them yourself, or have the manufacturer assemble them. Many PCB services, such as JLCPCB, PCBWay and OSH Park, offer low-cost prototype runs, and some offer assembly using their own parts libraries. Assembly is especially worthwhile for fine-pitch or QFN parts that are hard to solder by hand.

Order a few more boards than you think you need. You’ll likely damage one during testing, and spares are useful for side-by-side comparisons.

Step 10: Bring up the first boards

Bring-up is the careful process of powering a new board for the first time. A sensible sequence:

  1. Inspect the board under magnification for solder bridges, missing parts and rotated components.
  2. Check for shorts between power and ground with a multimeter before applying power.
  3. Power up with a current-limited bench supply, starting with a low current limit. If the current jumps immediately, switch off and investigate.
  4. Measure every supply rail at the test points.
  5. Program the microcontroller. For a blank ATmega328P, burn the bootloader through the ISP header first.
  6. Run a blink test to confirm the clock and basic I/O work.
  7. Test each subsystem one at a time: serial communication, then each sensor, then each output.

Keep notes of every problem and fix. They become the change list for the next revision. This process is a hands-on version of the integration stage covered in our article on hardware-software co-design and integration.

Step 11: Port and harden the firmware

If you kept the ATmega328P with the Arduino bootloader, your sketch may run unchanged, although pin assignments may differ from the prototype. If you changed microcontroller, you’ll need to port the code and check every library.

This is also the time to make the firmware product-ready:

  • Remove debugging delays and excessive serial output.
  • Handle sensor and communication failures gracefully instead of hanging.
  • Add a watchdog timer to recover from unexpected lock-ups.
  • Consider how firmware will be updated in the field.
  • Test the firmware properly; our article on what embedded testing means gives an overview.

Step 12: Iterate, then plan for production

Most first boards need at least one revision. Fix the problems you found, update the design, and order again. Once the design is stable:

  • Design for manufacture: choose readily available parts, minimise the number of unique components, and design a way to test each board on the production line.
  • Plan programming: decide how firmware will be loaded during manufacture.
  • Consider certification: products sold to the public generally have to meet electromagnetic compatibility and safety rules in the markets where they are sold, such as FCC rules in the United States or CE marking in the European Union. The requirements depend on the product, so check them early; pre-certified radio modules can reduce, but not remove, this work.
  • Check component availability for the quantities you plan to build.

Common first-PCB mistakes

  • Swapped TX and RX serial lines.
  • Wrong footprint or pin numbering for a regulator, transistor or connector.
  • Missing pull-up on the RESET pin, causing random resets.
  • Decoupling capacitors placed far from the chip.
  • No programming header, or one that’s blocked by other components.
  • Motors or relays sharing the MCU’s supply without enough decoupling, causing brown-outs.
  • Copper under a module’s antenna, reducing wireless range.
  • No test points, making debugging much harder.
  • Mounting holes in the wrong place for the enclosure.

Moving from a development board to a custom PCB is a big step in the embedded system design flow, and each revision makes the next one easier.

The complete guide to system design

Introduction to Embedded System Design: The Design Flow
Read the guide

Keep exploring

Guides from other topics

All topics →