ArduinoTroubleshooting

Arduino Nano based home automation node

userHead Eva.Green 2026-03-14 15:46:33 14 Views1 Replies

Hi everyone,

I’m currently working on a small home automation node using an Arduino Nano. The prototype uses the Nano module with a DHT22 sensor (temperature/humidity), a relay module for switching a load, and an I²C OLED display for basic status information. The circuit works fine on a breadboard, so I’m now trying to design a custom PCB using the ATmega328P directly instead of the Arduino Nano module to make the board more compact and reduce extra headers.

While reviewing the Arduino Nano schematic and starting the PCB layout, I ran into a few questions:

Clock configuration – The Nano uses a 16 MHz crystal with the ATmega328P. Is it necessary to follow the exact crystal and capacitor values from the reference design, or is there some flexibility depending on the crystal used?

Bootloader and programming – If I want to keep the ability to upload sketches through USB like the Nano, do I need to include a USB-to-serial chip (like CH340/FT232), or are there simpler alternatives?

Power supply design – If the board is powered from a 5 V adapter, would using a simple 5 V to 3.3 V regulator for sensors be enough, while keeping the ATmega328P running at 5 V?

Reset circuit – The Nano has an auto-reset circuit connected to the USB-to-serial chip. Is it necessary to replicate this exactly for reliable programming?

Mounting hole design – I added mounting holes for the enclosure, but I’m not sure if these should be plated or non-plated holes. Is it okay to connect them to the ground plane?

Via drill sizes – For a standard 2-layer PCB from low-cost manufacturers, what via drill and pad sizes are typically considered safe to avoid manufacturing issues?

This is my first attempt at designing a custom Arduino-compatible PCB, so any advice on both the microcontroller setup and basic PCB design considerations would be really helpful.

Thanks!


 

2026-03-14 15:57:16

For your custom ATmega328P board, use a 16 MHz crystal with 2×22 pF capacitors, keeping traces short and close to the MCU.

 

To upload sketches via USB like a Nano, include a CH340, FT232, or CP2102 USB-to-serial chip, or just add a UART header for an external USB-TTL adapter. For driver installation etc, read this: https://support.arduino.cc/hc/en-us/articles/4733418441116-Upload-a-sketch-in-Arduino-IDE

 

Power the ATmega328P at 5 V and use a 3.3 V LDO for sensors if needed. Connect a 10 kΩ pull-up resistor on RESET, and optionally add a 100 nF capacitor from DTR to RESET for auto-reset during uploads.

 

Mounting holes can be non-plated for mechanical support or plated and connected to GND for shielding. For the PCB, use 0.3 mm drill vias with 0.6 mm pads, traces ≥0.2 mm, and clearance ≥0.2 mm. read this guide for vias: https://www.pcbway.com/blog/Engineering_Technical/PCB_vias.html

userHeadPic ahsrab.rifat