Using a development board such as the ESP32 or Raspberry Pi Pico makes it easy to start a microcontroller circuit. But if you attach the board to the perfboard the wrong way, the board is hard to remove, the antenna gets blocked and Wi-Fi weakens, or power enters from two places at once and ruins the board. This article covers how to mount a development board on perfboard with pin header sockets, checking the pin spacing, power connections, antenna position, and the wiring order.
Why use sockets
If you solder a development board's pins directly to the perfboard, it is hard to replace the board or reuse it in another project. If you solder female pin headers (sockets) to the board instead and plug the board in, you get these benefits.
- It is easy to replace when the board fails.
- You can take the board out to work on it for uploading firmware or rebooting.
- You can use the same board in several projects.
For sockets, use two single-row ones with the right pin count, such as 1×15 or 1×19, or a 2×N structure. You can also cut or join long single-row sockets that can be cut to length.
Check the spacing between the two rows
The spacing between the pin rows of development boards differs by model, so the two socket rows have to match exactly. If the row spacing is wrong, the board will not plug in.
| Board | Spacing between the two pin rows (approx.) | Perfboard hole spacing |
|---|---|---|
| Raspberry Pi Pico | 17.78 mm (0.7 inch) | 7 holes |
| Arduino Nano | 15.24 mm (0.6 inch) | 6 holes |
| ESP32 development board | About 23–26 mm depending on the model | 9–10 holes (check with the real board) |
The most accurate method is to put the real board on the sockets and check the spacing before soldering. Solder only one row of the sockets first, then solder the other row with the board plugged in, and the spacing fits exactly. The perfboard hole pitch is 2.54 mm, so if the spacing falls on a fraction, use the nearest hole and check that the board's pins do not bend.
Socket soldering order
- Insert one row of sockets into the holes and lightly solder just the end pins to fix it.
- Plug the board into the sockets, and put the second row of sockets on the board's opposite pins and set it on the perfboard.
- With the board plugged in, flip the board over and solder the ends of the second row.
- Remove the board and solder all the remaining pins (Soldering Basics).
- After soldering, check for shorts between neighboring pins with a continuity test.
Antenna position
Wireless boards such as the ESP32 and Pico W have an antenna (the meandering copper trace at the end of the board).
- Place it so the antenna section sticks out beyond the edge of the perfboard.
- Do not put copper wire, a metal case, a battery, or large parts within a few centimeters of the antenna. The signal weakens and the connection drops.
- Solder or wiring on the perfboard pads under the antenna reduces performance, so leave that area empty.
Power connections
- Only one power source: when you power over USB, connecting another 5 V supply to the board's 5V or VIN pin at the same time can make the two supplies fight. Separate the USB connection and the external power input with a Schottky diode, or connect only one at a time.
- Check the voltage: putting 5 V on the 3.3 V pin of a 3.3 V board ruins it. Check the pin names (5V, VIN, VSYS, 3V3).
- Current capability: the current the board's 3.3 V regulator can supply to surrounding parts is a few hundred mA or less. Supply several LEDs or a motor from a separate supply and only share ground (Power Rails, Grounding, and Decoupling Capacitor Placement).
- Current peaks of wireless boards: at the moment of Wi-Fi transmission, current can momentarily jump to several hundred mA. Put an electrolytic capacitor of 100 µF or more at the power entry; with a weak USB cable or port, reboots can happen.
Keep things accessible
- Let the USB connector be easy to plug in at the board edge.
- Do not cover the reset and boot buttons. Some boards need them pressed for uploading firmware.
- Leaving one header for briefly connecting debug serial pins is convenient.
Make a pin table
The pin names (labels) on a board often differ from the real GPIO numbers. Make a table of the pins you will use.
| Function | Board label | GPIO number | Connected to on the board |
|---|---|---|---|
| LED 1 | D2 | GPIO2 | R1 → LED |
| Button | D4 | GPIO4 | Pull-up resistor, switch |
| I2C SDA | D21 | GPIO21 | Sensor SDA |
Printing the table and wiring while checking line by line reduces mistakes. Pins that set the boot mode (GPIO0, GPIO2, GPIO12, and GPIO15 on the ESP32, and so on) must have fixed levels at startup, so check the board documentation before attaching pull-up or pull-down parts.
Wiring order
- Wire the power rails (3.3 V, 5 V, GND) first.
- Wire the signal inputs (switches, sensors). Do not forget pull-up and pull-down resistors (Tact Switches and Pull-Up/Pull-Down Resistors).
- Wire the outputs (LEDs, buzzers, drivers).
- Wire the communication lines (I2C, SPI) short (I2C Wiring Basics).
- Before plugging in the board, check the power rails for shorts and for voltage.
Summary
Mount the development board with pin header sockets, set the socket spacing by plugging in the real board, let the antenna stick out past the board, and connect only one power source. Wiring from a pin table greatly reduces mistakes. For choosing a board, see Arduino Uno vs. ESP32 vs. Raspberry Pi Pico, and for signal voltages, Connecting 3.3V and 5V Signals.