HW4 - ndm736/ME433_2023 GitHub Wiki

Once you have designed and tested a circuit in a breadboard you should transfer it to a permanent, soldered solution to prevent wires from falling out. A PCB, or printed circuit board, is designed in software and ordered from a "board house". Depending on complexity, PCBs can be made for a few tens of dollars and delivered within a week (shipping is most of the cost!). I will order enough of the PCBs that I have designed so that you can use mine, but if you want you can order the PCB that you will design for your own custom board.

I will order from PCBway, other common board houses are OSHPARK, JLCPCB, and SeeedStudio (I have a sneaking suspicion that all of them are manufactured in the same factory). There are also some manufacturers closer to Chicago, like Twisted Traces over by O'Hare and Advanced Circuits in Colorado, but they tend to be more expensive.

A PCB is designed in several steps in a 2d CAD software. We will use the open source Kicad.

Other software include the free version of Eagle. Industry tends to use Cadence but it only runs on Windows.

The steps to PCB design are:

  1. Collect datasheets for all the components and make a library of parts
  2. Draw the circuit diagram (netlist)
  3. Draw the layout (the actual wires)
  4. Generate the files (Gerber files) and send to the board house

Using Kicad, we will make a library, then a schematic, then the layout, and finally the gerber files zipped up. We will double check the gerber files, and another good check is to print the design on paper and put the chips on the paper to make sure that they fit. Kicad has good error checking to prevent short circuits, but there is plenty of opportunity for us to introduce design errors by flipping pins or designing parts upside down.

A PCB is made of FR4 (a type of fiberglass), with copper on either side etched to form wires, solder mask on top of the copper (to protect the copper from shorts and oxidation), and silkscreen print for labels. Plated holes called vias connect the copper through the FR4.

Here is the list of components that will go on the board:

  • PIC32MX170F256B
  • AP7381 3.3V linear regulator
  • Slide switch
  • 3mm LEDs
  • 1/4W resistors
  • 0.1uF and 1uF capacitors
  • Pushbuttons
  • Adafruit CP2102 Friend

We will use the slide switch to change between the CP2102 power source and a battery.

In a few weeks I will give you another PCB that holds an h-bridge, a Raspberry Pi Pico, and some other goodies. Your PCB must be able to communicate with this PCB, so you must have header pins on the side of your board in a specific place and order, copy the information from my board layout below.

Here is my circuit diagram:
PIC32MX 2023 circuit diagram

Here is my board layout:
PIC32MX 2023 board layout

The board will plug into a hat that contains an h-bridge and breadboarding space:

And another board will hold a camera and TFT LCD, attached by 4 wires:

Follow along with the following videos to make your library, schematic, and board layout:

Digikey Kicad videos

Make a folder called HW4 in your git repo and add your Kicad files, including an image of the schematic and an image of the board layout. Submit a link to the folder in Canvas. If you want to order you board, message me so I can do a quick check before you place the order