Wheek 11: Input Devicess.


In this asigments speak about the made a sensor since the desing on Eagle to probe on python application. This way is important because growup in to development new sensor. In my case I decided made the board hallefect, the first time need to learn about the sensor linear analog SOT23W. For more information the following link:
http://www.digikey.de/product-search/de?keywords=620-1021-1-ND

Fig 1. Principal sale sensor linear. The board I added one led and resistor to indicate the board is energiced.

Fig 2. Schematic development on Eagle program.

Fig 3. The board development on Eagle program.

Fig 4. The board export file to modela xdf 540. The router modela made de sensor board, I used in my work. The time about to the machime was 20 minutes.

Fig 5. The board made on modela xdf 540.

Fig 6. The board fineshed on modela xdf 540.

Fig 7. Soldering the part on the board with the magnifier.

Fig 8. The final soldering the board.
The next steep need to learn and probe to charged the firmware to ATtiny 45. I leraned previous asigments for to undertood the steep need to work.

Fig 9. The led blue on the board indicate energized with 5v.

Connecting the CablesWheek

This time we are using Rx, 5v and GND of the FTDI cable and connect to the board hallefect.

Fig 10. The data needed to reed for the computer with the FDTI.

Flash Attiny with Neils C code

For programing I saved the make, the c and the python file from the academy site in one directory.

On ide Arduino 1.6.4 because have tool for attiny45. Needed select on tool ide clock internal 8Mhzfor the burn bootloader. The ISPFab is the tool to connect with Arduino ide.

More information abour Arduino Ide 1.6.4 go to the next link: http://highlowtech.org/?p=1695, this is a tutorial shows you how to program an ATtiny45, ATtiny85, ATtiny44 or ATtiny84 microcontroller using the Arduino software.

Fig 11. ISPFab to lead the firmware to ATtiny 45

Fig 12. Configured the board on Arduino ide 1.6.4. You need the UBBtinyISP Fab for put inside ATtiny 45 the bootloader.

Fig 13. Burn bootloader on to ATtiny 45 was succesfull. In the academy site in one directory about imput divices need to file on hello.mag.45.c, need to open on the web site and copy to ide Arduino 1.6.4 and need to compile first.Then connect to the UBBtinyISP Fab and inside ATtiny 45, ckeck the pines don’t forget needed tree pin, negative, positive and RX (only tree wires).

In this time the firmware now stayed in the ATtiny 45.

Fig 14. Program to control sensor “hello.mag.45.c” on ATtiny 45.

Program Attiny with

Neils Python Code

For this work I used on the Ubuntu 16.04.

This link show how install some tool for Python Code on Ubuntu:

http://archive.fabacademy.org/2016/fablabbcn2016/students/375/week11/

I needed to install tool on Ubuntu, the instruction shows bellow:

• python : on Ubuntu panel : udo apt-get install python-2.7 python-pip

• Brew : on Ubuntu panel : brew install python.

• pyserial: on Ubuntu panel : sudo easy_install pyserial.

Then you Ubuntu is ready for use and acopling with Neils python code.

Fig 15. The files need to Program ATtiny.

Fig 16. The route when the files exist.

Then need to write in the Ubuntu:

sudo python hello.mag.45.py /dev/ttyUSB0

Fig 17. In the Ubunto 16.04 need to write sudo python hello.mag.45.py /dev/ttyUSB0.

Fig 18. In this time the software Python run succecfull.

Fig 19. When the interact the sensor with se iman the program show the bar red change to blue.

Fig 20. The bar blue indicated to change the polarity to iman and to close the sensor. In this video show the operation the senso hallefect. The sensor react to iman in polarity and approach.The bar red change to blue for this effect.
Video Sensor Hallefect. Right mouse button to play video

  • Download files here:
    Eagle board
    Eagle shematic