How to Make (Almost) Anything | Lizbeth B. De La Torre



Final Project Process

Zero-Guitar | Music for life in zero gravity


Questions Answered:

The Full Process
I began by creating a mannequin to model and hold the prototype! This was 3D printed on the Sindoh using this tutorial. It was easy to follow and came with the support systems in place, however I did have to modify the support on the palm and one finger

Materials:
3D Printer
Elastic 2mm String
Scissors
Pliers

I drew some hands to mentally explore how hands might move in a glove (I havent drawn in a long time!) and started sketching out the placement of the electronics and what the casing might look like


I then drew a glove template in Adobe Illustrator and used it to make the gloves. The fingers were really tight, so I ended up making fingerless gloves for better mobility. I used wildcard week for embroidering and sewing.




Ive been experimenting with copper on acetate recently to get the flexibility for a glove. Previous Air Guitars have been really bulky and Id like this one to be pretty flexible and comfortable. I thought of using the multi touch sensor to detect chords, but I wanted the fingers to not have to touch the palm. I ended up scrapping the acetate idea for now because of the instability of the coppertape on the acetate. My Ftdi Headers kept coming off! I will try again during IAP. For now, check out my vinyl cutting process in week 9.





This is a really rough sketch of the final circuit design; (showing three sensors on the left hand instead of the one I ended up using) I modifyied two boards: The synchronous detection board, and the accelerometer board. The synchonous board will detect a finger on a "chord" and the acceleromter will be triggered to play the sound when strumming down.


Here are the final Schematics and boards. I had to re-do these multiple times because I glossed over a very simple thing: to attach the RX to the Attiny44. Thats why it wasn't sending data!



I also had to add the accelerometer footpads into the library and modify them to be a bit larger so the mill wouldnt cut them out (Thanks Tina for recommending this!)

The accelerometer is so tiny, I went through 5 boards trying to get it right.

These boards milled well! Unfortunately, the acetate boards I spent a ton of time vinyl cutting and weeding did not have the RX connected, so I switched to the mill to save time for this round. (below are incorrect boards)


I tested the Phototransistor and accelerometer seperately with their respective codes; The phototransistor works! The code that gets the phototransistor and accelerometer to talk to eachother is complete and can be downloaded below. Unfortunately the accelerometer wasnt sending signal when testing, but it programmed well.

I had difficulty with coding because I have zero experience, but I was able to switch from the Attiny45 to the Attiny44 pretty smoothly with tutorials from previous classes.


What really made switching to the ATTINY44 from the ATTINY45 was this set of code that is now correct for the 44. The bits are specific to the microcontroller:

  
ADMUX = (0 << REFS1) | (0 << REFS0) // Vcc ref
     | (0 << MUX5)| (0 << MUX4)| (0 << MUX3)
     | (1 << MUX2) | (1 << MUX1) | (1 << MUX0); // ADC7
  ADCSRA = (1 << ADEN) // enable ADC
     | (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0); // prescaler /128
  ADCSRB = (0 << ADLAR);  // right adjust;
  
  

Here are all of the files! They include the final file for getting the two sensors to talk to work together, and modified codes of Neil's to test synchronous detection and the accelerometer on the ATTINY 44 (instead of the 45)

Code:

guitar.c: Combined Phototransistor and Accelerometer Code

hello.reflect.44.c: Neil's Synchonous Detection board modified for ATTINY44

hello.reflect.44.make

hello.reflect.44.3.py: Play a sound with the Synchronous Detection board.

Electronics:

Chord Schematic

Chord Board

Strum Schematic

Strum Board

For guitar.c, one important piece is this if statement that tells the code to constantly read the Phototransistor. If the difference equals 500, it will begin reading the accelerometer. The number 500 still needs fiddling with to find exactly the right value. Sam C. helped me a ton with getting the If statement right!

    
        while (1) {
      readphoto();
          if (on-off=500) {
            readaccel(); //Phototransisitor analog sends Accelerometer code through Serial
    
    

Originally, I wanted the gloves to play sound directly from the Attiny and I found a tutorial for converting .mp3 files into numerical values Here for Arduino PCM, but because of lack of time, I modified Neil's Accelerometer.py to play a sound when X falls below a certain number. The easiest way I found was to use Python's pygame extension. I added the first line above "Import Tkinter", and the rest right above the "check command line arguments"

  
from pygame import mixer
if (x=> x0+100*x1)
mixer.init()
mixer.music.load(‘Library.info’)
mixer.music.play()
  

This code ended up not working! I had trouble installing pygame. I also couldn't get the accelerometer to work, so as a last push I ended up modifying Neil's Hello.Reflect.45.py, to play a sound when it detects a finger.

I created an If-Then statement with help from Will, and found the following code online (first line is for install)

  
pip install playsound 

import playsound  //placed at the top

if (filter > 0):
playsound.playsound('/path/to/filename.mp3', True) //My If statement
    

I loaded the updated .py and it worked! Here is a video of what I have so far. During IAP I plan to get the accelerometer working. Thanks Erik for the sound file!