Fab Academy 2014

Week 10: Input Devices

This week's assignment is to measure something by adding a sensor to a microcontroller board that you've designed. I chose to do a Hello Temp board.

First I downloaded the traces, interior, and the board component layout.

Traces:

Interior:

Board Layout:

Milled the traces and cut out the board using the Roland Modela, and populated the board with components according to the layout above.

(1) ISP 2X3 PROGRAMMING HEADER

(1) ATTINY45 MICROCONTROLLER

(4) RES 10K

(1) CAP 1UF

(1) NTC THERMISTOR

(1) FDTI 6-PIN HEADER

Next download Python and PySerial

Connect the FabISP to the programming header on the Hello Temp board, and connect the FTDI cable to the Hello Temp board.

Download the files below and place them in a folder on your desktop labeled hello.temp

hello.temp.45.py

hello.temp.45.c

hello.temp.45.make

After downloading, open the terminal window and navigate to the hello.temp folder on the desktop by entering the following commands:

cd

cd desktop

cd hello.temp

Next type:

sudo make -f hello.temp.45.make

if you are successful - you will see this response from the system:

Philips-iMac:hello.temp philipgonsalves$ sudo make -f hello.temp.45.make
Password:
avr-gcc -mmcu=attiny45 -Wall -Os -DF_CPU=8000000 -I./ -o hello.temp.45.out hello.temp.45.c
avr-objcopy -O ihex hello.temp.45.out hello.temp.45.c.hex;\
            avr-size --mcu=attiny45 --format=avr hello.temp.45.out
AVR Memory Usage
----------------
Device: attiny45

Program:     504 bytes (12.3% Full)
(.text + .data + .bootloader)

Data:          1 bytes (0.4% Full)
(.data + .bss + .noinit)

Next type:

avrdude -p t45 -c usbtiny -U flash:w:hello.temp.45.c.hex

if you are successful - you will see this response from the system:

Philips-iMac:hello.temp philipgonsalves$ avrdude -p t45 -c usbtiny -U flash:w:hello.temp.45.c.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9206
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "hello.temp.45.c.hex"
avrdude: input file hello.temp.45.c.hex auto detected as Intel Hex
avrdude: writing flash (504 bytes):

Writing | ################################################## | 100% 0.55s

avrdude: 504 bytes of flash written
avrdude: verifying flash memory against hello.temp.45.c.hex:
avrdude: load data flash data from input file hello.temp.45.c.hex:
avrdude: input file hello.temp.45.c.hex auto detected as Intel Hex
avrdude: input file hello.temp.45.c.hex contains 504 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.22s

avrdude: verifying ...
avrdude: 504 bytes of flash verified

avrdude: safemode: Fuses OK (H:FF, E:DF, L:62)

Next type:

python hello.temp.45.py /dev/tty.usbserial-FTGNNK5H

if you are successful - you will see this window pop up

The pictures above show the temperature reading from the hello.temp board, and what happens when I place my finger onto the sensor.