Skip to content

7. Electronics design

All this information is refered to Electronic Design class.

Assigment

  • Redraw the echo hello-world board, add a button and LED (with current-limiting resistor)
  • Check the design rules, make it, and test it.
  • Simulate its operation.

Group Assigment

  • Use the test equipment in your lab to observe the operation of a microcontroller circuit board.

Autodesk Eagle

EAGLE is a scriptable electronic design automation (EDA) application with schematic capture, printed circuit board (PCB) layout, auto-router and computer-aided manufacturing (CAM) features. EAGLE stands for Easily Applicable Graphical Layout Editor (German: Einfach Anzuwendender Grafischer Layout-Editor) and is developed by CadSoft Computer GmbH. The company was acquired by Autodesk Inc. in 2016.

Libraries

The first step to design a circuit is checking that you count with all the componentes you need. In case you don’t, just download their libraries.

In these specific case, I’ll use the Fab-Library. In case you need componentes that aren’t there, I recommend this library repository:

In case you don’t found the component, Autodesk provides some great tutorials to learn how to create libraries by yourself:

Schematic

A schematic in electronics is a drawing representing a circuit. It uses symbols to represent real-world electronic components. The most basic symbol is a simple conductor (traces), shown simply as a line. If wires connect in a diagram, they are shown with a dot at the intersection.

Components:

  • 1x Attiny44
  • 1x Push button
  • 1x Crystal 20Mhz
  • 2x 22pf Capacitor
  • 2x 10k Resistor
  • 3x 499 Resistor
  • 1x 1uF Capacitor
  • 1x 2x3 Pin Conector
  • 1x 1x6 Pin Conector
  • 3x LED

Board

I didn’t use autorouter, it doesn’t work well for bigger boards, so I want to get used to routing boards by myself.

Design Rules:

They are some few design rules that we have to follow in order to be able to fabricate your PCB. In this case, the design rule are oriented to the fabrication method, sometimes they could be aplied because of phisical contrains in our board.

The clearance is defined by the ability of the mill to cut between 2 parts of the board. Yuo can check the tests we made for the machine in Week 5.

In this case, we use a 1/64 in mill, thats aproximatly 0.4 mm, I choosed to use 0.45 mm for security:

The we have to define the size of our via. My program in in metric system, so I used mainly 0.5 mm width.

As a recomendation, I select Walkaround Obstacles and 90° wire bend, this helps you design a functional and more ordered board.

Route

Next step, is start routing!

Problems with Eagle

Bad conection to VCC

In the schematic you can see this conection:

Where you should see the VCC entrance of the ISP conected to the VCC net, but for Eagle they aren’t conected, I didn’t clicked in the correct position.

I didn’t realized of these until I was sodering the board. The solution to this problem will be presented at the end.

Exporting them to get into MODS

All the process of producing the board and using mods is explained in Week 5.

To export traces, I changed OS to Linux, Eagle has a bug on Windows and Macs where it exports images bigger than their real size.

The key parameters here are DPI and Monochrome. Slect DPI to 500 pix/in, this is important. I selected once 500 in/mm and mods didn´t recognize the image.

Here are the results for traces:

In order to get the interior, we have to go to GIMP, open the traces and go to Filter ==> Decor ==> Boarders, to get something like this:

The you just paint black the traces, to get something like this:

Boards

And after the sodering:

Where you can see the cable acting as a jumper for the conection I dind’t do because of the problem I had with Eagle.

Testing

For the testing part I used a code I build to test the 3 LEDs and the Push Button:

int Led1=2;
int Led2=7;
int Led3=8;
int Button=3;

void setup() {

  pinMode(Led1, OUTPUT);
  pinMode(Led2, OUTPUT);
  pinMode(Led3, OUTPUT);
  pinMode(Button, INPUT);

}

// the loop function runs over and over again forever
void loop() {
  if (digitalRead(Button)==0){
  digitalWrite(Led1, HIGH);   
  delay(50);                  
  digitalWrite(Led1, LOW);    
  delay(50); 
  digitalWrite(Led2, HIGH);   
  delay(50);                  
  digitalWrite(Led2, LOW);    
  delay(50); 
  digitalWrite(Led3, HIGH);   
  delay(50);                  
  digitalWrite(Led3, LOW);    
  }
}                      

It Works!!!

José Tomás Domínguez (Joseto) on Vimeo.

Simulating the circuit

For the circuit simulation I used a software called Proteus:

Proteus PCB Design combines the Schematic Capture and PCB Layout programs to provide a powerful, integrated and easy to use suite of tools for professional PCB design.

Proteus includes an AVR and Arduino library so you can simulate most of the boards you’ll use in any Fab Lab, also they are some libraries yuo can download, with a lot of sensor modules:

Proteus_Library

Proteus not only allows the user to simulate the schematics, you can also simulate your code. This allows you to make double check of everything before entering the process of prototyping.

To run the simulation on Proteus you have to build a schematic as you do in Eagle:

Then you have to enter the components values, just double clicking each component:

The microcontroller is diferent:

The most dificult parameter to find is the Program, it has to be in hex, you could just follow the steps from Week 5, or getting from the temporal memory you get from the Arduino IDE:

The good part of this, is that every time you modify and check youre .ino, it will be saved in the same location.

The Result

José Tomás Domínguez (Joseto) on Vimeo.