I tried to hack a pair of cheap (5 Euros) walkie-talkie that I bought in Paris. They work with 4 x 1.5V batteries (so 6V, but actually the batteries are kind of cheap so it makes 5V).
There is a speaker that is used also as a microphone (triggered by a push-button). The output is very noisy.
I managed to do something simple and stupid:
So this is simply reproducing the same thing the walkie-talkies originally did, using two Arduinos... However, it worked!!! so we can use if for audio communication.
But my plan is not to send noising sound, but to use it for sending a very basic message (on/off) ie. a trigger. I figure we can do that by sending a very loud sound. On the receiver side, I take the minimum and maximum values as well as the average over 1000 samples. However, these stats don't really change when I send the signal (that is because the signal is very noisy as I said earlier).
By playing with them, I killed them, it doesn't work anymore. Sad.
The lessons:
New ideas:
Here is the code for the emitter: /* * Simple Walkie talkie emitter
* (emits a square wav)
*
* (c) 2008 Sofian Audry (info _A_ sofianaudry _D_ com)
* Distributed under the Gnu GPL v3 or later,
* see <http://www.gnu.org/licenses/>
*/
void setup() { }
void loop() {analogWrite(SPEAKER_PIN, VOLUME); delayMicroseconds(PERIOD / 2); analogWrite(SPEAKER_PIN, 0); delayMicroseconds(PERIOD / 2);}
And here for the receiver: /* * Simple Walkie talkie receiver
* (dummy, resends what it receives as input)
*
* (c) 2008 Sofian Audry (info _A_ sofianaudry _D_ com)
* Distributed under the Gnu GPL v3 or later,
* see <http://www.gnu.org/licenses/>
*/
void setup() { }
void loop() {analogWrite(SPEAKER_PIN, analogRead(MICRO_PIN) / 4);}