Luis Ernesto Flores Olazo- academy 2014

Input Devices

For this assignment I had to connect Three sensors to a microcontroller, read the signal and ,somehow,visualize them. I decided to use a light sensor (phototransistor), a sound sensor (electret mic) and finally a ultrasonic sensor.

So, the process begins with the machining of the boards. You can see more details of this process here

After milling start the soldering process

Photo 1:Light sensor

Then connect your boards with the FabISP to your computer and you will be ready to program them.

Photo 2: FabISP connections

In order to program in ubuntu OS you have to download the files : hello.reflect.45.c ; hello.reflect.45.make into the same file, then open a console and execute the following command :

- sudo make -f hello.reflect.45.make program-usbtiny

Then in order to visualize the signal of the sensor you can program an interface in python or you can use the one given by Neils here

So after download the "hello.reflect.45.py" file you must execute it on the terminal, but before that, you have to know which serial port is using, to do that write on the console ls /dev and chek the number of the usb, then execte the command:

- python hello.reflect.45.py /dev/ttyUSB0 .

(in my case is USB0).

Photo 3: Python interface

The same steps for the sound sensor.

For ultrasonic sensor I used the board that I made for the past assignment "embedded programming". I connected the sensor through the IPS programing PINs, once you've already programmed the microcontroller you can use that PINs as inputs or outputs. I realized that the ultrasonic library works well with the attiny44 microcontroller.

The process to program is the same of this