Skip to content

Task 2: Develop Your Own Custom Dev Kit Board

This week’s challenge:

  • Use an EDA tool to design a development board
  • interact and communicate with an embedded microcontroller
  • produce it
  • test it

Design a development board

For this week’s assignment - the recommended application to use is Kicad to design custom PCB. KiCad is a free software suite for electronic design automation. It facilitates the design and simulation of electronic hardware for PCB manufacturing. It features an integrated environment for schematic capture, PCB layout and many more.

Electronic Design is an alien concept to me. I never had any experience designing custom PCB before. So I have zero idea on what I wanted to design for this week. After consulting to Rico - he suggested to make a “Elaine-duino”. Basing the design custom dev-kit on XIAORP2040 - Rico suggested that the important pins to have in the dev board are:

  • More VCC Pins
  • More Ground Pins
  • Analog & Digital Pins
  • FTDI Pins
  • I2C PINS
  • ISP Pins (MISO, MOSI, SCK)
  • A Switch Button and LED Diode for troubleshooting

Kicad

Since I am new to Kicad - I watch several tutorials to get used to the software. I found this to be extremely friendly for beginners and lets you get the hang of the software without any convuluted steps.

FAB Library

The Fab Academy team has provided library that contains components that would be relevant based on the inventory that are popularly used within the course. Download the FAB Library from here

To set up go to Preferences : alt text - Manage Symbol Libraries > Add Existing Files>fab.kicad_sym alt textalt text - Manage Footprint Library> Add Exsiting Files> fab.pretty

For more details you can also check Fab Lab Barcelona’s Kicad documentation

Schematic

alt text

Make sure that you download the Kicad Library by the Fab Academy Team. Firstly we start by creating a schematics. The schematic serves as the blueprint, listing the detail and the connections for each components that needed to be considered when designing a PCB.

To add symbol press (A) or find this icon

alt text

Then insert the necessary components that would be required for the custom board. I have decided to use mainly female headers for the pins - just like in Arduinos. alt text

Referring to the RP2040 pins below and the pins to have in Elaineduino alt text

I decided the following

  • VCC (4 pins = 3 5V + 1 3.3V)
  • Ground (4 pins)
  • Analog (4 pins, A0-A3)
  • Digital (10 Pins D0-D10)
  • I2C (2 Pins)
  • ISP (3 Pins)
  • FTDI (6 Pins)
  • Extra UART Pins
  • LED + Switch for Trouble Shooting (I based the values from Quentorres Board)

Add RP2040 as the MCU and Add Global Labels. To make it neat and understandable I suggest having the label convention PIN_PIN_PIN (if 1 PIN serves different functions) and make sure to label your group of components - by pressing (E) to rename the component.

alt text alt text

Good practices:

  • Any unconnected pins add the No Connection Flag
    alt text
  • Run the Electronic Rules Checker to see if there are any errors. Make sure you want to move on to the next step without errors. alt text
  • If you receive errors regarding power lines - you will need to use Power Flags. Kicad mentions that some components have power pins that are invisible. Hidden power pins get automatically connected if VCC and GND naming is respected. Generally speaking, you should try not to make hidden power pins. It is now necessary to add a ‘Power Flag’ to indicate to KiCad that power comes in from somewhere Source

Overall the schematics for Elaine-duino looks like this alt text

PCB Editor

Switch to PCB Editor –> Update PCB from Schematics

alt text alt text

And you will see the footprint corresponding to the schematics all mushed up in 1 position.

alt text

Design Rules

Before we start moving around - make sure that you configure the following settings first. Go to Board Setup –> Design Rules –> Net Classes

alt text alt text

Put 2 entries and set the track width to ‘Power’ (0.8mm) & ‘Signal’ (0.4mm). In the Net Class assignment section, assign any VCC & GRND pins with the ‘Power’ Net Class. Why do we set the Signal track width at 0.4mm? Because a 1/64” End Mill is equivalent 0.39687mm so the minimum distance between the traces and pads shouldn’t be less than 0.4mm wide. While power we keep at 0.8mm because they carry more current so a wider track would be ideal.

Once set, it’s time to arrange your footprints and let the game of maze (connecting wires) begin.

The first version of Elaineduino looks like this - I realised design wise that it is not neat, and this could pose a problem with the milling as tracks will be too close to each other. alt text

To avoid these, we should set some Constraints. This was the recommended costraint considering the 1/64” end-mill alt text

This is how the final Elaine-duino looks like. I spaced out the traces to avoid any possibility of error when milling. I placed all the analog and digital pins on one the left side; while PWR, GND, FTDI pins on the right side. This way it is neater and structured. In terms of usability - it will be easier for me to recognise the side of the pins. The design was inspired by a hotel card. alt text

we may feel confident with the results at this point..... but we can only truly feel safe when we run the Design Rule Checker and it comes with 0 errors. alt text alt text

Export the files by ‘Plot’ and make sure the relevant layers are chosen. For mine it would have to be ‘F.Cu’ (copper layer) and ‘Edge Cut’(pcb outline). I made graphics in the silk screen layer however they are useless as we don’t have the capacity to make a silk screen for the board. alt text

Produce It

To produce I use the same process and settings as I did in Electronic Production Week alt text alt text alt text alt text alt text alt text alt text alt text

Surprisingly.... I didn’t run into trouble producing this board.... I was able to mill and stuff everything in one try.

Test It

Running blink test.

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/

// the setup function runs once when you press reset or power the board
int ledPin = D9;

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

// the loop function runs over and over again forever
void loop() {
  digitalWrite(ledPin, HIGH);  // LED on Elaine-duino is D9
  delay(1000);                     
  digitalWrite(ledPin, LOW); 
  delay(1000);                    
}

Files