Week 5

Electronics Design - The Central Board

← Back to home page

Overview

This week's task was to design a microcontroller board. I designed the central board for my final project, the Marble Musician. It controls the module boards that each run seven chimes and their motors. The central board mostly sends and receives information: it connects to a microphone for calibration, a screen and buttons for controls, and the seven module boards.

The connection to each module uses a heartbeat-style transmission that both checks for errors and confirms a module is connected before any control signals are sent. Each module receives 8 bits of data. Seven of these bits control the firing of the solenoids, and the presence of a "song" serves as the signal for the module to start its motor (that logic lives on the module boards).

I designed the board in KiCad and worked with AI (Claude) to first understand what I was looking at on the board itself, and then to work out the best layout for the different pins.

Choosing the Microcontroller and Pinout

I chose the Raspberry Pi Pico W from the inventory because it has the largest number of pins, which I need for seven modules plus the microphone, screen, and buttons. This is the pinout I worked from. I ended up using all of the available GP pins through planning

Raspberry Pi Pico W pinout diagram

I used Claude to walk me through how to read the pinout: what the colored boxes mean, which pins are general purpose, and which power pins to use or leave alone.

Explanation of the Pico pin types and power pins

I then worked with Claude to rearrange the pinout so each module's data pin sits right next to its presence pin, added four buttons to control the board (up, down, forward, and back), and completed various other optimizations in order to achieve the best pin arrangement while also planning for all the necessary functionality of the final product. This was stored in a netlist (shown later) for use in KiCad.

Table of data and presence pins for modules M1 to M7

In KiCad, I found the Pico W symbol and checked it against the Fab inventory to make sure it was the part available to me. and inserted it into the board field.

KiCad symbol search for the Pico next to the Fab inventory

Schematic

Next I picked the connectors: 6-pin horizontal headers for each of the seven modules, plus headers for the screen, buttons, and microphone.

KiCad symbol chooser with a 6-pin header selected

All of the parts placed in the schematic before wiring: the Pico, seven module headers, the screen, buttons, and microphone connectors, and the capacitors and resistor. Test points were added after as well. Though these are not in the fab inventory, they are not actual parts so I used the Universal library.

Unwired schematic with all parts placed

I kept a netlist spreadsheet to track every connection: the net name, which Pico pin it uses, and where it goes. I used this to complete the wiring in the schematic page.

Netlist spreadsheet of pins and connections

The wired schematic. Each module gets its own data and presence line, while the clock, latch, and enable lines are shared across all seven modules.

Fully wired schematic

A closer look at the power section: two capacitors smooth the 3.3V supply, and a resistor pulls the enable line to ground so the modules stay off until the board tells them otherwise.

Capacitors on the 3.3V line and the enable resistor

PCB Layout

For the board itself I used the hand-solder footprint of the Pico W so it can be surface mounted.

Pico W hand-solder footprint in KiCad

The first import into the PCB editor, with all of the parts and their connection lines still unrouted. This was going to be an issue, as the common lines for all of the module pinheaders was going to create massive amounts of hops.

Unrouted PCB with connection lines

I rearranged the parts so the seven module headers line up along one side and the screen, buttons, and microphone sit on the other. This allowed me to avoid any hops throughout the board.

Rearranged PCB layout before routing

I started routing the traces. .4mm width and .4mm clearance as recommended by the TA in our slack channel. With the headers laid out in a row, the shared clock, latch, and enable lines need to run straight through all of the module connectors.

Close-up of traces running through the module headers

The 3D view showed the problem with the horizontal pin headers: they lie flat and stick out the side, which doesn't work for thew connections that need to reach every contact.

3D view of the board with horizontal pin headers

To fix this, I switched to vertical pin headers. Instead of deleting the parts and rebuilding everything, I changed the footprints of the existing parts. With a bit of trial and error, this worked much better.

Routed traces with vertical pin headers

The fully routed board. I added holes for M3 mounting screws in the corners, which will work with the case I built last week with slight size adjustments. I also added 1mm circles of exposed copper near the surface-mounted contacts to make soldering easier.

Fully routed board with mounting holes in the corners

The final board in 3D with the vertical headers in place.

3D view of the final board

AI use notated in the html

← Back to home