Input Devices

By Dan Chen, September 12, 2014

This week I learn about step response with transmit-receive, I also learn Python and a little bit of C programing. For my final project, I need a linear potentiometer to translate the finger position so that the 2 servos can translate it to right, left, up and down hand movements. See my previous work below.

The benefits of using capacitive touch to read the finger gestures is that everything would be hidden under the hand resting platform, and it would be a nice and natural experience to the user.

I started by studying this example http://fab.cba.mit.edu/classes/863.13/people/akashbad/week9/

I modified the board so it feels more natural as the finger move across the board, but I didn’t edit the circuit because I want to see how it works first.Screen Shot 2014-11-11 at 9.29.48 PM

I made a few mistakes in the process of making the board, but I had 3 useable boards.
Why 3 boards? Because none of them worked. I used Akash Badshah’s Make file, I was able to load the file onto the chip but I wasn’t able to get any serial data. After swapping out the Tinny44 Chip out 3 times, I am still not any data.

IMG_0318

So I decided to try Matt Blackshaw’s board, which is what Akash Badshah’s based off. I get the same issue as Akash Badshah’s board, the program uploads but no serial data.

IMG_0320

I decided to start something simple, and make it work first. So I re-mill the board using Neil’s transmit-receive step response example, and it works great. Now I can start making my own board.

IMG_0322

I added the slider right on the board and cover it up with tape for my demo..

sss

Download PNGs

Download Make File and Py file

Commands that I’ve used

make -f hello.txrx.45.make
sudo make  -f hello.txrx.45.make program-usbtiny
python hello.txrx.45.py /dev/tty.usbserial-FTH9M2MN 
Dans:rxtx danchen$ make -f hello.txrx.45.make
avr-objcopy -O ihex hello.txrx.45.out hello.txrx.45.c.hex;\
	avr-size --mcu=attiny45 --format=avr hello.txrx.45.out
AVR Memory Usage
----------------
Device: attiny45

Program:     660 bytes (16.1% Full)
(.text + .data + .bootloader)

Data:          5 bytes (2.0% Full)
(.data + .bss + .noinit)


Dans:rxtx danchen$ sudo make  -f hello.txrx.45.make program-usbtiny
Password:
avr-objcopy -O ihex hello.txrx.45.out hello.txrx.45.c.hex;\
	avr-size --mcu=attiny45 --format=avr hello.txrx.45.out
AVR Memory Usage
----------------
Device: attiny45

Program:     660 bytes (16.1% Full)
(.text + .data + .bootloader)

Data:          5 bytes (2.0% Full)
(.data + .bss + .noinit)


avrdude -p t45 -P usb -c usbtiny -U flash:w:hello.txrx.45.c.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9206
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "hello.txrx.45.c.hex"
avrdude: input file hello.txrx.45.c.hex auto detected as Intel Hex
avrdude: writing flash (660 bytes):

Writing | ################################################## | 100% 0.59s

avrdude: 660 bytes of flash written
avrdude: verifying flash memory against hello.txrx.45.c.hex:
avrdude: load data flash data from input file hello.txrx.45.c.hex:
avrdude: input file hello.txrx.45.c.hex auto detected as Intel Hex
avrdude: input file hello.txrx.45.c.hex contains 660 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.82s

avrdude: verifying ...
avrdude: 660 bytes of flash verified

avrdude: safemode: Fuses OK (H:FF, E:DF, L:62)

avrdude done.  Thank you.

Dans:rxtx danchen$ python hello.txrx.45.py /dev/tty.usbserial-FTH9M2MN