pamela chami
  • home
  • about me
  • project
  • assignments

week10

Input Devices

For this week assignment, we had to measure something by adding a sensor to a microcontroller board. My final project consist lighting, so I decided to redesign the phototransistor board which is used to measure light. As we are working with a ATtiny 45 microcontroller, the first thing we had to do was read the Datasheet which is really important to understand how it works.

phototransistorBoard

Redesign the board

Here is the list of the components needed for the phototransistor board.

phototransistorBoard

download Components, Traces, Interior

I redesign the following board on eagle.

phototransistorBoard

Milling and Soldering

After milling and soldering the board. This is the result I got using the same step as week06.

phototransistorBoard phototransistorBoard

Programming

I was not able to program my board using windows 8. I kept on having the same error 128.

phototransistorBoard

I still did not found the solution but I used a mac laptop and I was able to program it following these steps:

1/ To program the phototransistor board, it should be connected to the FabISP and the laptop

2/ Downloaded the following files in a folder:

  • C code

  • Make file

  • Python program

  • 3/ On the command, open the folder where these files are available.

    4/ Enter the following command : make -f hello.load.45.make to generate two files: hello.light.45.out and hello.light.45.hex

    5/Enter the following command: make -f hello.light.45.make program-avrisp2

    5/ keep only the FTDI cable connected to the board and the computer

    6/ Open python to visualize the board working by writing the following command: python hello.light.45.py COM4 ( open device manager to check which port you are using: COM4 in my case)

    I had some problems opening python on windows but thanks to my colleague Francesca Perona for showing us few tricks to be able to open Python on windows. It worked perfectly after following all the steps.

    phototransistorBoard

    phototransistorBoard

    hellolight from Pamela C. on Vimeo.

    Here are the files to download : Eagle files

    Fabacademy.org | Copyright © pamelachami | Design by pch