Skip to content

6. Electronics Design

This week I designed my own board and program it!

Test & Observe (G.A.)

(Group Assignment with @Tobin) More about our groupwork, plz go to Tobin’s w6

Make My Own Board!

I’ve learned basic electronics, so this part is not hard for me.

Design my board

  1. EAGLE! We choose this education free software to design our borad. Learn more about how to design a board with EAGLE, you can go to Fab Academy Tutorial
    w06_eagle0

  2. File -> New -> Schematic to start a new design
    w06_eagle1

  3. Download attiny412 lib, fab lib, sparkfun lib from Saverio. Also in the Fab Academy Tutorial
    w06_eagle2

  4. These are the components I use.
    w06_eagle3
    w06_eagle4 w06_eagle5 w06_eagle6
    w06_eagle7
    w06_eagle8
    w06_eagle9

  5. Before start design, and also, in order to use my board as an Arduino board with Arduino IDE, I need a pinout diagram like this. (from Github_megaTinyCore)
    w06_eagle10.0

  6. To design a LED and a button on board, the basic electronic knowledge you should learn is pull-up and pull-down resistors, I recommend this one.

  7. Add the components with add part tool, and link them with net or name tool.
    w06_eagle10

  8. Finish the schematic.
    w06_eagle10.1

  9. Click this gray and green button, it means switch to designing a board from schematic.
    w06_eagle11

  10. Preset before design the board, But why it is 16mil? Because our tracing endmill is 1/64 inch (15.625 mil), so the gaps must be bigger than that – the endmill will never mill the gap smaller than 1/64.
    w06_eagle13.2
    w06_eagle12
    w06_eagle13
    w06_eagle14
    w06_eagle15
    w06_eagle16

  11. Use Route Airwire tool or Auto Router tool to make the net line become the ‘real wire
    w06_eagle17
    You can use Route Airwire to connect like this,
    w06_eagle18
    you also can use Auto Router like this.(Make sure we only need the top layer)
    w06_eagle19 w06_eagle20
    Remember: You must adjust the wire manually, to follow your CNC design rules.

  12. Finish the board design. w06_eagle20.1

  13. Before export the design as PNG, plz follow the setting below.

    1. Only display the Top and Pads layer.
    2. Only display the drills.
    3. The resolution is 1000dpi and click the mono checkbox.
    4. Remember the size.
      w06_eagle21
      w06_eagle22
      w06_eagle23
  14. Import the PNG you just export from EAGLE to Photoshop, check the image size, make sure it is the same as you remembered in the EAGLE, if not, shrink it with 50%
    w06_eagle24

  15. Photoshop workflow: Crop as you want, but never resize it. Save the image as _trace _hole, _outline file, and modified them.

    1. In the _trace file, delete the hole and name your board and write some note on it. Don’t forget follow your CNC rules. (such as, if the line of font is too thin?)
      w06_eagle28
    2. In the _hole file, delete all the black area except holes
      w06_eagle26.3
    3. In the _outline file, design the edge of your board. (You can make it as a animal or a map, but I don’t do that)
      w06_eagle26.1
  16. Transform the PNG to the rml file with fab mods, as we did in week04. In this step, don’t forget to check all the traces and fonts, to make sure they will be cut correctly.
    Here is a negative case: w06_eagle27

Mill and Solder my board

  1. Mill as I did in week04, so I get:
    w06_mill4
    This time I set the speed at 30% (72mm/min), so it looks good this time.

  2. Choose components.

    name value amount
    ATtiny412 - 1
    Capacity 1 uF 1
    Resistor 1k ohm 1
    Resistor 499 ohm 1
    Resistor 10k ohm 1
    LED Green 1
    LED Red 1
    Button - 1
    Pinhead 1*6 (90 degree) 1
    Pinhead 1*3 (90 degree) 1
    Pinhead 1*3 2

Here are the reference when I choose the value of resistor and capacity.

  1. Speak of how to solder it, you can check my week04 assignment.
    Here a funny thing is to solder the serried pinheads: I have to move the black part to the top, so that I can solder it ealier, then move it down.
    like this:
    w06_mill5

  2. Finish soldering
    w06_mill6

  3. Plug my board to my computer, power supply success!
    Ok I can program it. w06_mill8

Program my board

  1. Before programming with Arduino, it is neccessary to install the library in Arduino.
    I use the link which Adrian Torres mentioned in his assignment (Thanks!), and this link is also posted on Github megaTiny
    w06_program1 w06_program2 w06_program3

  2. Connect my board and set port and board to ATtiny412, set programmer to FDTI-UPDI like this
    w06_program4 w06_program5

  3. Echo test
    Copy code from Neil, and comment Serial.swap(1) because I use Pin PA6 and PA7 to do the FTDI serial communication.
    Download and test! Works well!
    w06_program6
    w06_program7

  4. LED test
    w06_program8
    w06_program8

  5. Button test with LED
    w06_program9 w06_program9

Links & Files

Last update: March 10, 2022