Assignments

Electronic Design

I used Eagle to draw the echo hello-world board. I added a tactile switch on the pin8 and LED and a 1k resistor on the pin7.

Drawing the circuit
First add the Eagle components library - Copying the fab.lbr to /Users/ben/Documents/EAGLE/libraries
Then add the Eagle design rules - Copying the fabcity-designrules.dru to /Users/ben/Documents/EAGLE/design rules
Select the fab.lrb as used
Create a new project - right click on project > new project
Create a new schematic - right click on your project > new project > Schematic
Add components you need - use the “add parts icon” - select the component to insert
Use the “net icon” to link the different parts
It’s possible to use the “name icon” to connect the different parts using label - tick “Place label” option in the name window

Final result of schematic:

Eagle Schematic

Final result of the board:

Eagle Board

PCB Milling

I used the Othermill machine:

PCB soldering

Process

SMD components soldering
Cold tinning with “liquid tin”
ATtiny44
Blue LED and 1K resistor
Tactile switch
Resonator 20Mhz
Resistor 10k et capacitor 1uF
Pin header

Checking

I tested the cooper layer continuity of the board, and it looks OK.

Programming the hello echo board

First try with my FabTinyISP

First i tried to program my echo-hello-world board with my FabTinyISP. I followed this procedure. To do this needed: - hello.ftdi.44.echo.c - hello.ftdi.44.echo.c.make

Process

  Bens-MacBook-Pro:ftdi44 ben$ make -f hello.ftdi.44.echo.c.make

  Bens-MacBook-Pro:ftdi44 ben$ make -f hello.ftdi.44.echo.c.make program-usbtiny-fuses

And i received this error:

avr-objcopy -O ihex hello.ftdi.44.echo.out hello.ftdi.44.echo.c.hex;\
avr-size --mcu=attiny44 --format=avr hello.ftdi.44.echo.out
AVR Memory Usage
----------------
Device: attiny44

Program:     758 bytes (18.5% Full)
(.text + .data + .bootloader)

Data:         64 bytes (25.0% Full)
(.data + .bss + .noinit)


avrdude -p t44 -P usb -c usbtiny -U lfuse:w:0x5E:m

avrdude: initialization failed, rc=-1
       Double check connections and try again, or use -F to override
       this check.


avrdude done.  Thank you.

I followed the advice found on adafruit but my FabtinyISP still doesn’t work…

I have to try with a linux or windows computer…

Issue fixed on week 9!!

Second try with the USBtinyISP AVR Programmer

Process

I followed this Tutorial to program ATtiny with Arduino IDE.

Result

const int ledPin =  7;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  digitalWrite(ledPin, HIGH);   
  delay(300);                       
  digitalWrite(ledPin, LOW);    
  delay(300);                      
}

Button

const int buttonPin = 8;  
const int ledPin =  7;

int buttonState = 0;      

void setup()
{
  pinMode(ledPin, OUTPUT);
  pinMode(buttonPin, INPUT_PULLUP);
}

void loop()
{
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH)
  {
    digitalWrite(ledPin, LOW);
  }
  else
  {
    digitalWrite(ledPin, HIGH);
  }
}

Downloads

My Hello.echo.board Eagle Schematic

Eagle Board

Links

Eagle

Eagle design rules

Eagle tutorial

Eagle components library

Othermill milling machine

ATtiny44 A datasheet

Adafruit advices for AVRdude

Tutorial to program ATtiny with Arduino IDE