How to Make Almost Anything  
 
 

sections

[ home ]
[ application ]
[ ideas for final project ]

*

[ 9/8: introduction ]
[ 9/22: CAD,CAM ]
[ 9/29: PCB fabrication, board stuffing ]
[ 10/6: microcontroller programming ]

[ 10/13: PCB design ]

[ 10/20: 3D scanning and printing ]
[ 10/27: input devices ]
[ 11/3: waterjet cutter, CNC mill, router ]
[ 11/10: modeling ]
[ 11/17: output devices ]
[ 11/24: molding ]
[ 12/1: networking and communications ]
[ 12/8: final project preparation ]
[ 12/15: final project presentations ]

contact

email: dcardoso [at] sinmit [dot] edu

[ daniel cardoso . site ]

 
 

Input Devices


For this assignment I have chosen to use the microphone.

signal

For making the hello.mic.45 work I needed to first compile the assembly code into a hex file using gavrasm

gavrasm hello.mic.45.asm

Then I need to power the micro processor using rx.py

rx.py /dev/ttyS0 9600

then burn this hex file into the micro-processor

avrdude -c bsd -p t45 -U flash:w:hello.mic.45.hex

Then I can disconnect the parallel port, and run the script for plotting the sound signal into the screen

python hello.mic.45.py

 

PCB

Here the circuit, which I re-stuffed a couple of times during the debugging process.

Now I want to try to create a more interesting visualization of the sound by changing the python code. We'll see!

Problems and Solutions

This briefly worked, the image above shows the python terminal plotting the audio signal to the screen. Shortly after that image was taken the serial ports of the labs computers started to behave stragely. I am sad to report that after hours of debugging (thanks Siggi), none of my circuits worked. The following lines describe the bug.

I kept finding the following error even when tryng with different circuits, or after replacing the microrproessors:

avrdude: verification error, first mismat at byte 0x0000
0x19 != 0xff
avrdude: verification error; content mismatch

avrdude: safemode: lfuse changed! Was 62, and now is ff
Would you like tis fuse to be changed back? [y/n]

if I go 'y', beeps and an endless sequence of (dec AAA hex 1a) follows.

I restuffed the circuit and it is now working! (There was probably some short circuit on the previous one. Check below for images and parts of the code.

# Randomly defining a RGB color

rRand = random.randrange(0,255)
gRand = random.randrange(0,255)
bRand = random.randrange(0,255)

myTuple = rRand, gRand, bRand
myHex = RGBToHTMLColor(myTuple)

canvas.create_line(path,tag="path", width=1, fill = myHex)
parent.after_idle(idle,parent,canvas)

Download Python Script

(PARENTHESIS

java+processing appletUsing Java and Processing I created an applet that listens to the microphone (of the computer) and plots the audio signal in time, it is like using a 6-band parametric equalizer as a brush for painting on the screen. My goal was to implement something like this using the circuit I built, but the technical obstacles prevailed! (see below for solution)

The image above shows a visualization alternative obtained with the Java Processign code. Question: Can this Java/P5 code be used to program a micro-controller? Can a Hex file be obtained from it? (Please email me if you know the answer to this)

)


     
    [ daniel cardoso site ]