microcontrollers
Feb. 20th, 2008 12:34 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
There's a little interactive art project I want to make- I want to take an existing phone, and have each of the number keys trigger a sample (or mp3, or whatever, quality isn't super important) through the receiver's speaker. If possible, I think it'd also be fun to put a proximity sensor on the ringer so that it rings when someone approaches it. I know this should be do-able with a microcontroller, but I have no experience with them and very little programming experience (though I'm working my way through MAX/MSP, which, while not a true programming language, can communicate with ardunios.)
Any advice or online resources from you Makers?
Any advice or online resources from you Makers?
no subject
Date: 2008-02-20 07:28 pm (UTC)I suspect that running custom code on the phone would be pretty tricky. However, if you go searching for phones that allow the user to load apps, and have a free development environment & SDK, you might be in business. Maybe there's an old phone for which this was true, that you can now find on ebay for $30?
The only other way I can imagine doing this would be to gut the phone, just enough so that you can get signals from the keys and back to the speaker. I think it's going to be pretty tricky to fit everything inside the phone shell, so would it be possible to have the thing hang on a wall with a hidden cable coming out the back? Because then the machine driving it can be anything from a microcontroller to a PC hidden somewhere nearby.
Microcontrollers are pretty easy to work with. Being able to go "beep" might require a $50 development environment, with $1-10 per chip afterwards. Going to MP3 would probably cost 10x as much, because it requires a pretty serious amount of CPU power. If you need to use MP3s, maybe you could hide an old laptop nearby, and just run the whole system from there?
You could probably play a simple 8 bit / 11kHz sample from a cheap microcontroller, and I suspect there are probably specialized microcontrollers that have built-in DAC hardware for something like this. Low quality samples should only require about 10KB per second of samples. I'm not sure how easily it would fit inside a cellphone case, though.
Some kind of infrared or motion sensor would probably be pretty easy to wire up, and you could probably have it emulate a keypress causing the ringer sample to play.
Let me know if you want more info -- I have to run to a meeting now.
no subject
Date: 2008-02-20 07:55 pm (UTC)no subject
Date: 2008-02-20 08:40 pm (UTC)no subject
Date: 2008-02-20 08:53 pm (UTC)no subject
Date: 2008-02-20 11:05 pm (UTC)http://www.communitytheater.org/how_to/phone.htm
I found some circuit diagrams for building your own ring generator, but I'd try and buy one.
http://www.qsl.net/yo5ofh/hobby%20circuits/telephone_circuits.htm
http://www.tkk.fi/Misc/Electronics/circuits/telephone_ringer.html
no subject
Date: 2008-02-20 07:45 pm (UTC)The Atmel it's based on is a powerful little chip, and the arduino is a friendly interface for programming it.
You can get add-on components to do sound. Like, combine this with some flash memory and you can play mp3's http://www.sparkfun.com/commerce/product_info.php?products_id=8125
But a little easier: Find those things they put inside recordable greeting cards or other toys. like this: http://www.gmkmg.com/toy_product/htm/sound_chip_modules.htm
If you record your sounds on those, you can simply trigger them with one of the arduino pins.
At some point the limiting factor is going to be the number of pins on the micro- if you need one per key you'll run out fast. Cubloc.com makes fairly easy to use boards with lots of pins, which like arduino are based on Atmel and programed in basic. More expensive.
However, more elegant would be to use a parallel to serial shift register chip to read those pins.
no subject
Date: 2008-02-20 07:56 pm (UTC)Although if you can have a wire going back to a laptop....
Hook a shift register up to the buttions of the phone and use that to send serial info back to a laptop running max/msp. Then MAX/MSP sends sound back to the receiver. You'll probably want to use an ethernet cord so that you have enough wires.
Oh, and for the motion sensor- these $8 gizmos are great for answering the question "has anything moved in the last few seconds", which should be enought for this project http://parallax.com/Store/Sensors/ObjectDetection/tabid/176/CategoryID/51/List/0/Level/a/ProductID/83/Default.aspx