0

clueless in denver
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

clueless in denver

by roulier on Sun Dec 05, 2010 5:33 pm

I am an artist with no electronic background although I do understand enough
about electricity to wire stuff. I want to add another dimension to my art
work by using a kind of motion detector with a trigger sound devise that I
could make (record) my own play back from my computer what would I need???
roulier
 
Posts: 1
Joined: Sun Dec 05, 2010 5:29 pm

Re: clueless in denver

by adafruit_support_bill on Sun Dec 05, 2010 5:55 pm

An Arduino, a Wave Shield and an ultrasonic sensor would do. Check out the Haloween Pumpkin project for an example of how this can work: http://www.ladyada.net/make/pumpkin/pumpkin.html

adafruit_support_bill
 
Posts: 76121
Joined: Sat Feb 07, 2009 10:11 am

Re: clueless in denver

by tinsmith on Tue Dec 07, 2010 12:30 am

If you want to go a little beyond that (in level of personal involvement, if probably not in quality of result), what you need is essentially a DAC (digital to analog converter) followed by an amplifier of some sort. If you can find an appropriate DAC IC, the datasheet will almost certainly have "good enough to work" examples of the necessary support circuits. The amplifier can be as simple as an op-amp plus accompanying resistors (see the popular Chu-Moy design for one possible example). You also need some way to get the digital data, either storage sufficient to hold the information (possibly on the microcontroller if it's short) or another source which will transmit it to the circuit at run time.

The wave shield effectively implements all of that including an SD card slot for storage. A WAV file is effectively just a series of digitally-encoded voltage levels which are to be reproduced by a DAC. It's a good half-step if you want to build it but don't want to design and prototype it.

Note that the wave shield as implemented uses a 12-bit DAC (Or is it 16-bit in v1.1? The docs are inconsistent.) - it's a "good enough" part, but sort of low-fi if that bothers you. For comparison, I'm using a 24-bit DAC at the moment to play music. The difference is the resolution you get when representing a voltage level digitally - you get 2^bitwidth values. So for example, a 1-bit DAC with a 5V spread would give me two options - 0V and 5V. A 12-bit DAC gives 2^12 or 4096 options, while a 24-bit DAC gives 2^24 or 16,777,216 options. Quite a difference due to the exponent. Some sound cards do use a 16-bit DAC (2^16 = 65,536 voltage options), but 24-bit is extremely common and gives far superior resolution. This is a big factor in determining how accurately it can reproduce an analog signal - it will use the closest match allowed by the resolution, but for low resolutions it may be significantly different from the "correct" result. Of course, if you feed this into a 1.5" speaker, there will be enough distortion there that nothing will give you a "true" output regardless...if that's even what you want given the application.

An alternative if you just want tones is to stack some 555 timers, set them to output sine waves at the frequencies you want, and then play xylophone on them with a matrix selection circuit of some sort. You'd still need probably an amp stage. This would be somewhat Atari, but potentially interesting. It's for Art, after all, so high-fidelity playback of recorded audio may not be the only road. (You can also do this straight from an Arduino, on a more limited level.)
tinsmith
 
Posts: 62
Joined: Thu Nov 18, 2010 9:18 pm

Re: clueless in denver

by stinkbutt on Tue Dec 07, 2010 1:08 am

roulier wrote:I am an artist with no electronic background
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: clueless in denver

by tinsmith on Tue Dec 07, 2010 1:19 am

Shh, I'm hoping to bombard him with enough information that he starts changing that in the process of trying to figure out what the heck I said. ;)
tinsmith
 
Posts: 62
Joined: Thu Nov 18, 2010 9:18 pm

Please be positive and constructive with your questions and comments.