Week10Input devices
José J. Lazarte R.

Assignment
   measure something: add a sensor to a microcontroller board that you've designed....
For the development of this assignment, I chose to work with a temperature sensor which deliver signal through a resistive bridge type arrangement for digital analog converter input ATtiny45 microcontroller. The model used for this is the one reference system in Fab Academy webpage.
As shown in the assembly diagrams, has been integrated into
ATtiny45 the terminal for programming  ISP and FTDI serial data transmission.

Resitencias bridge used
to take the signal sensor NTC
the information is taken from
the terminals PB3 and PB4 of   ATtiny45 .

Changed the position of the
sensor so that, it does not affect the temperature changes of the other components and has placed a "T" to indicate its location.
Design to be used for manufacture of the card.

Template for the cutting of the card.
In the process of milling the card I use the Roland Modela machine with the configuration shown in the figure below.

The components were welded in the manner as shown in the figures.

Copper milling card

Cutting process card

Components used for implementing the card

Implemented Card.

....... and read it
To be able to read data using the card with the ATtiny45 first will make the process of recording the program that must run within the ATtiny45.
To do this we use the method
programming described in my  Assignment 8 by card implemented in my Assignment 4.
For this case we have to change the configuration of Arduino program as shown in the following figure. Then connect the card to the Programmer and proceed to run the process.


Setting the type of microcontroller programming.

Connecting the programmer to program them with the card. The program used is what gives the reference documentation Fab Academy.
To now, that we have implemented and programmed the card, I shold read the data sended by the sensor and display it in the PC, as a second step we need to install the Python program because the example program provided in the documentation is in that language. 
In my case I downloaded the program page of Python for windows 7 of 64bits. I downloaded the Python 2.7 version After installing I try to run the "hello.temp.45.py" the  program give errors because there was not loaded the modules "Tkinter", "numpy" and "serial". I should download modules separately and i have to install the version for Python that you were using.

After that using the "cmd" command windows, run the command line: python.exe hello.temp.45.py <seria_port>. Indicating the port on which the reading will be from the microcontroller.

Cable connection type FTDI  

Cable connected to the card and the sensor

Running the program to verify that the card works properly.

Finally, as a third step, an cable type
FTDI used to connect the card to the sensor via the serial port of the PC (in my case it was used COM7), run the program hello.temp.45.py and appears a window in which we can observe a slider that changes whit the room temperature, if we blow cold air on you sensor low temperature and if we leave free it return the temperature of the enviroment. The follow video show it.
1. Video: Connection and execution of the program in Python.
2. Video: Same Ardware is used in assignment 15.
References used pages:
http://www.wxpython.org/download.php
http://stackoverflow.com/questions/8491111/pyserial-for-python-2-7-2
http://picachu.dmt.upm.es/python/primerospasos.html