Week 7 : Electronics design

Eagle

Download data

Eagle

Image

Resources

Electronis design tools
Kicad (open source)
Eagle (Autodesk license)

Tutorials
Introduction to Eagle (Fabacademy tutorial)
Tamiya-san archive : Electronics design
Tamiya-san archive : Programming

Mentioned in Lecture
Drawing PCB by hand

Assignment

Hands on circuit design Prep

Install libraries

Download Library from Fabacademy page (Fabacademy week7)

Place your library file in Apps > EAGLE-8.6.3 > lbr.
enter image description here

note

When buying SMD chip, be careful for chip size!
Size / Dimension : 0.122" L x 0.063" W (3.10mm x 1.60mm)

Reference

Set paths

Option > directory
Set path for “Library” and “Projects” if you want.
enter image description here

Designing circuit on Eagle

Placing and wiring components on schematic

Make new project (File > New > Project), then
Refer to board design diagram in Fabacademy week7 pagediagram

  1. Add components
    use add command.
    select the components from the library, place it, then hit Esc.
    enter image description here
    enter image description here
  2. Draw wire from the components
    use net command and click pin on the component to draw wires.
    enter image description here
  3. Connect the components by naming wire
    use name command to declare which wire connect each other.
    Click wire and name it.
  4. Label wire to visualize what it is named.
    use label command and click the wire you named.
    enter image description here
  5. Insert value
    use value command to insert value to component
  6. Run Electrical Rule Check
    use erc command to run check.
    Solve errors and warnings. You may ignore warning.

Design

  1. hit generate / switch to board
    enter image description here
  2. show grid in 0.05 inch in grid dialog which could be accessed from the button in upper left corner.
    enter image description here
  3. put components in order
    enter image description here
  4. From change function, change “width” to 0.016.
    enter image description here
  5. Run ratsnest command to simplify airwires.
  6. Use route command to draw pattern, ripup command to delete pattern. Right click
    enter image description here
  7. Push layer button in the menu, select layer48, draw outline of the circuit board with Polygon, then move and scale flame to fit the outline.
    enter image description here
  8. Push layer button in the menu, select top layer (trace) and go to
    File > Export > Image
    Selecet PNG / monochrome / 800dpi and export.
    Do the same for the document layer (outline) too.
    enter image description here
    top layer (trace)
    enter image description here
    document layer (outline)
    enter image description here
    Export image

In the end, run DRC (Design Rule Check) to check whether your board design millable with your machine. (Tool > DRC)
As we use 1/64 inch bit, there should be more than 0.4mm clearance between each pattern. Change all clearance value in the dialog to 0.4mm and hit “check”.
enter image description here

Basic rules

Mods, SRM, Soldering

I used SRM-20 for milling circuit, and made path data with Mods.
Refer to Week5 : Electronics production for detail how to’s.

Here is the results for milling,
enter image description here

and after soldering.
enter image description here

Troubles

Eagle keep exporting wrong size

When exporting image from Eagle, despite of the the setting we had (Image size : 1011 x 1030), the exported png data had different image size (1028 x 1064).
We couldn’t figure out to fix this problem, so we changed the dpi after exporting data with preinstalled preview app in mac (enlarged 800 to 1600dpi).
enter image description here

Mods doesn’t draw path between 0.4mm clearance

Although we checked the clearance with DRC, Mods couldn’t draw path between some gaps.
enter image description here
I solved this by setting milling bit diameter bit smaller then actual size.

Programming

Reference

Tamiya-san’s fabacademy page

Procedures

Preperations

Now, you will be able to install pyserial by doing…

$ sudo pip install pyserial

Connecting boards

enter image description here
enter image description here
enter image description here

Program your board

Then follow the instruction in programming. You may find the link in week 8 class page too.

Go to directory you placed the files.
then run following command on terminal to compile program and write it to the board.

$ make -f hello.ftdi.44.echo.c.make  
$ sudo make -f hello.ftdi.44.echo.c.make program-usbtiny-fuses  
$ sudo make -f hello.ftdi.44.echo.c.make program-usbtiny

By doing this, you will get .hex and .out file in your folder.

If you want to progaram your board with other programmer such as AVRISP, replace usbtiny with avrisp2 like this…

$ make -f hello.ftdi.44.echo.c.make  
$ sudo make -f hello.ftdi.44.echo.c.make program-avrisp2-fuses  
$ sudo make -f hello.ftdi.44.echo.c.make program-avrisp2

You may find the term you need to replace, by checking hello.ftdi.44.echo.c.make file.

Communicate with your board

Now, try run term.py program to communicate your board.
First get serial port information

$ ls /dev | grep usb  
or
$ ls /dev/tty.*

Run term.py

$ python term.py /dev/tty.usbserial-AI02RJUC 115200

cf) $ python [file name] [serial port][speed]

enter image description here

hello.ftdi.44.echo DEMO from kai naito on Vimeo.

Serial communication via ArduinoIDE

You may also use ArduinoIDE Serial monitor to communicate with your board once your board is programmed.

  1. Open Arduino IDE
  2. Tool > Serial port
    Select the port which the board is connected.
  3. Open serial monitor by hitting button in the upper right corner.
  4. Type in some thing…

enter image description here