Electronics Design


Group assignment

Individual assignment

Learning outcomes:

Have you:

Week workflow

Weekly assignment → introduction to Eagle → Edit Schematic/Board → Mill the board → solder components → debug → edit and publish website


Group Assignment

Go to the group assignment page

Tools used


Software Used


Design files of hello board


  1. Using the test equipment in our lab
  2. I started by watching SparkFun's YouTube video on the oscilloscope

    I learned:
    • That an oscilloscope measures voltage over time: getting amplitude, frequency, transient signals
    • The important buttons...

      Our lab's oscilloscope Our lab's oscilloscope

    • Calibrating the probe/Adjusting the compensation capacitor

      Oscilloscope probe Oscilloscope probe

      1. On the probe, select X10
      2. Connect the probe to the channel one plug
      3. Connect the probe to the 1kHz 5V square wave generator
      4. Turn on the oscilloscope
      5. Make sure only channel one is on: click the CH2 button until it's off, and the other way around with the CH1 button
      6. Select DC coupling with the F1 key
      7. Press button F4 to select 10X on probe mode
      8. Press the trig/menu button and select type "edge" and source CH1
      9. Select slope as "Rise"
      10. Adjust the vertical and horizontal knobs until you see the wave
      11. If the wave is moving, adjust the trig knob until it stops
      12. To calibrate the probe, adjust the screw on the base of the probe until the wave is square

        Picture of the wave before and after adjustment Picture of the wave before and after adjustment


  3. Eagle introduction:
    1. I started by watching the video tutorials below, then I had a look through the Eagle tutorial for week 6. Following it, I downloaded and installed the Fab library for Eagle.

    Printed Circuit Board Layout

  4. Reverse engineering Neil's board

    Neil's Hello Board Neil's Hello Board

    1. I started by having a look at the Electronics Design - Eagle tutorial. With the above schematics in hand, I started redrawing it in Eagle
  5. Schematics step by step:
    1. Under projects → right-click on Eagle → click on new project → name the project

      Creating a new project in Eagle

    2. Right-click on the project name → new → Schematic

      Creating a new schematic in Eagle

    3. Type "add" → search for each part

      Adding parts in Eagle

    4. Place the part with a left click → repeat until all parts of the same kind are added → press ESC to add the next part → search for the next part or press ESC to go back to the schematic

      Placing parts in Eagle

    5. Type "rotate" and left click on the part origin to turn the part to the desired position
    6. Type "net" to connect parts to each other
    7. Type "name" and left click on top of a part to name it
    8. Type "label" and left click on a wire to connect one to the other without having to draw a net
    9. Type "value" and left click on the part origin to set the part "value"
    10. Type "move" to position the part as needed
    11. Save the file

    Eagle schematics

    In the schematic above, you can see that most components are not connected with a line (the "net" command), except for the crystal (XTAL1). The rest of the components are connected virtually with the "label" command, as explained in letter "h" above.


  6. Drawing the Board
    To position the components on the PCB, use the same commands as on the schematic:
    1. Left click on file → type "board" → accept the warning and left click yes to create the board and start designing the PCB from the previously created schematic

      Creating a board in Eagle

    2. All components will be displayed to the left of the board → drag them one by one with the command "move" + left click and drag to position them inside the board
    3. Type "rotate" to turn the components the same way as in the schematic
    4. After everything is positioned → resize the board by dragging the sides of the original board with the command "move"
    5. Type "polygon", select the top layer and draw a square around the board limits in order to create the top layer of the PCB
    6. Type "ratsnest" → to start the autorouter, type "auto". This command is very convenient, as it gives an initial idea of how you can route the board, but it doesn't replace manual routing

      Using autorouter in Eagle

    7. Select start

      Starting autorouter in Eagle

    8. Adjust traces if needed with the command "ripup" to remove placed paths
    9. Place new paths with the commands "route" and "move" to position them better
    10. Type the command "info" + left click in order to fine tune the position of the paths as well as their thickness

    You can watch how I did it here. Pump up the volume for some Cash!

    In case it doesn't play, watch it on YouTube!


  7. Adding the LED and Button
    1. In order to add the LED and the button, I went back to the schematic
    2. In the schematic, type "add" to add two resistors, one LED and the button
    3. The first resistor limits the current that goes to the LED. It goes in series with it (on either side of it). In order to dimension the resistor, I first checked the LED datasheet. There I looked for the DC forward current, in this case 30 mA, and the forward voltage, in this case 2.1 V
    4. With those two values plus my input voltage (5 V) in hand, I entered the values on the website LED center in order to calculate the correct resistor, in this case 100 Ohms. On the board I used the 500 Ohm resistor from the schematic (499 Ohms in the Fab inventory), which keeps the LED well below its 30 mA limit.

      LED resistor calculation

    5. As for the switch, I used a 10K resistor as a pull-up resistor
    6. Like before, I used the commands move, rotate, label, name and copy to put all components in place

  8. Make the BOM (Bill of Materials)
    1. Left click on the design link → left click on Schematic

      Creating BOM in Eagle

    2. Wait for the program to display the part → type a new search string in case the desired part does not appear → left click manual search → choose the desired part → left click select

      Selecting parts for BOM in Eagle

    3. Repeat the previous process until all parts are found
    4. Left click export and save the BOM file

      Exporting BOM in Eagle

    After some editing, here it is:

    Qty Location Digikey or Mouser Part number Manufacturer Part # Description
    1 U1 ATTINY44 ATTINY44 IC 4KB FLASH
    2 R1 311-10.0KFRCT-ND RC1206FR-0710KL RES SMD 10K OHM 1% 1/4W 1206
    1 R2 311-499FRCT-ND RC1206FR-07499RL RES SMD 499 OHM 1% 1/4W 1206
    1 D3 160-1169-1-ND LTST-C150GKT LED GREEN CLEAR 1206 SMD
    1 C1 445-1423-1-ND C3216X7R1H105K160AB CAP CER 1UF 50V X7R 1206
    1 FTDI 6 pin header
    1 RESONATOR XC1109CT-ND ECS-CR2-20.00-B-TR CER RES 20.0000MHZ 15PF SMD
    1 450-2058-1-ND FSM6JSMATR SWITCH TACTILE SPST-NO 0.05A 24V
    1 ISP 649-95278-101A06LF 71600-006LF Headers & Wire Housings 2X3P UNSHRD HDR 30 micro inch gold

  9. Exporting the image for Fab Modules
    1. Go to Options, Set, Misc and deselect Display pad names, signal and via lengths. This will prevent undesired text from appearing on the exported image
    2. On the layers toolbar, select only the top layer

      Selecting top layer in Eagle

    3. Next, type "export" → select image and monochrome → and in resolution type 500
    4. Save to the desired location

      Exporting image in Eagle

    5. The result is a black and white image

  10. Edit in Gimp
    1. With the exported Eagle image in hand, open it in Gimp
    2. In Gimp, I decided to add some wording. This was easy by selecting the text tool, then the font size, and rotating the wording to an ideal location
    3. I also removed unnecessary black areas with the bucket tool
    4. To create the outline, I selected the area I wanted to keep and covered it with the bucket tool
    5. In the end you should have two images, one for the PCB and one for the outline

    PCB image ready for Fab Modules PCB image ready for Fab Modules

    PCB outline ready for Fab Modules PCB outline ready for Fab Modules


  11. Fab Modules and milling

    The Fab Modules and milling process is already outlined in the week 4 assignment, so I will only keep an image of the result here

    Milled PCB Milled PCB, polished with toothpaste for the best appearance


  12. Soldering/Populating the PCB and Debugging

    The result

    As before, populating and debugging are already outlined in the week 4 assignment, so I will only keep an image of the result here

    Populated PCB Populated PCB ready for burning the firmware

  13. Burn firmware

    Disclaimer

    I actually did this activity in the embedded programming week. I only put it here to fulfill the Fab Academy requirements.

    With that, here follows the test of my board.

    1. Identify example code:

      - There is this code from Prof. Neil

    2. Identify commands to compile and burn the firmware

      - With all files previously downloaded into one directory, in Linux I rename the file to makefile and run the script to create the firmware (I will repeat this step every time I want to modify the code):

      mv hello.ftdi.44.echo.c.make makefile
      make

      Renaming to makefile and compiling Renaming to makefile and compiling

    3. Compile source code

      - Done in the previous step

    4. Adapting the makefile to work with my programmer

      Editing makefile I had to edit the makefile to work with my programmer. That was done by replacing the entry usbtiny with USBasp 2 times, once for burning the firmware and once for burning the fuses

    5. Burn firmware

      Run:

      make program-usbasp

      Burning firmware Burning firmware

    6. Identify what fuses to burn

      - That was already done in the makefile

    7. Burn fuses

      Run:

      make program-usbasp-fuses

      Burning fuses Burning fuses

Programmer FabISP and USBasp

Here I show how I used the programmers in Output Devices. For another method without the Arduino IDE, check Embedded Programming

USBaspUSBasp

Programming an ATtiny44 board with Arduino using a FabTinyISP or USBtinyISP that I made.

FabISPFabISP

Programming an ATtiny44 board with Arduino using a FabTinyISP or USBtinyISP that I made was fine. There is only the inconvenience of having to power the target board.

Start by opening the Arduino IDE, then in Tools choose the board, in my case ATtiny24/44/84. Next, in Processor, I chose ATtiny44.

Programming ATtiny44 with Arduino

Next, choose the clock. As I'm not using an external crystal, I chose "Internal 8MHz". (These steps come from the Output Devices board. This board has a 20 MHz resonator, so here the right choice is "External 20 MHz".)

Choosing clock in Arduino

Next, go to Programmer: "USBasp", or "USBtiny" for the FabISP.

Choosing programmer in Arduino

In the video below I show the process of programming with the FabISP.

For a full resolution video, check YouTube

In this video I show the process of programming with the USBasp.

For a full resolution video, check YouTube


First test

Burning Neil's code "hello.ftdi.44.echo.c"

Here, instead of using the terminal and avrdude, I used the Arduino IDE, as it has a built-in serial monitor.

The results are as follows in the video


I really enjoyed learning this new tool. I had used Eagle before to view PCBs, but never actually designed one. I feel it opens my mind to a lot of new things to come!

To see how I programmed this board, check the Embedded Programming week.

← (Mar 04) 3D Scanning and Printing · all weeks · Computer-controlled Machining (Mar 18) →