Week 10 - Input Devices

Learn to measure something: add a sensor to a microcontroller board that we have designed and read it.

 

Design the Hello Light board

DeployeHand

DeployeHand

Designing the schematick circuit in Eagle.

Designing the schematick circuit in Eagle.

 

We should introduce a modification in the example board given. So I decided to introduce a four pin conector that will allow to conect the input board to another output board in the future (VCC, GND, TX and RX). But in my design I should change the position of the pins due to avoid crossing traces. So when I do the communication assignment I shoul remember to conect the pins in the right order:

DeployeHand

Input device board.

 

DeployeHand

Schema of the connection of the communication bus pins in my Hello Light board design.

 

I decided to use the smaller microcontroller in order to use all its pins, an ATtiny 45.

ATtiny 45 pins schema.

Programing a Phototransistor

 

DeployeHand

Conecting the input device to program the board.

 

First of all I connected my FabISP via USB to my lapop, the Hello Light via FTDI cable to another USB and then a communication cable between them.

I found some issues trying to program the board in Windows 8.1 so I decided to do it trough the Linux emulator CygWin 64 and it worked.

In CygDrive I navegated trough my laptop until I got to the hello.light.45.make fileI wrote:

make -f hello.light.45.make program-usbtiny

And I successfully programmed it!

DeployeHand

Hello Light board successfully programmed.

 

I was not able to install the Python software in my laptop though Windows 8.1 so Nuria lend my her Mac laptop in order to see the slider moving due to the light sensor reading.

DeployeHand

DeployeHand

Conecting the input device with Python via FTDI cable to see the values that the phototransistor reads.

 

But I will try to do it in my laptop with Arduino IDE to see the numeric values at least.

 

- - -

Files:

· hello light fabricio (Eagle schematic)

· hello light fabricio (Eagle schematic)

· hello light fabricio (png traces)

· hello light fabricio (png boundary)

· hello.light.45.make (program code)


 

fablableon MIT