0

DIY Walkie Talkie with XBee - will this work?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

DIY Walkie Talkie with XBee - will this work?

by gladoscc on Mon May 12, 2014 4:46 am

I'd like to build a DIY walkie talkie - basically, push a button, talk and the other device (if in range) would play it. Would this work, or are there any pitfalls that I'm not anticipating?

Teensy 2.0 (ATMega32u4) https://www.adafruit.com/products/199

Uses the ADC to sample at 8 to 16 KHz from the microphone (64-128 kbps) - https://www.adafruit.com/products/1064

Sends the 8 to 16 KHz 10-bit samples via xBee 1mW (up to 250kbps) https://www.adafruit.com/products/128

--

Other device: receiver grabs the samples, uses PCM to send it to a speaker circuit (following this tutorial) http://arduino.cc/en/Tutorial/SimpleAudioPlayer

If the sample's 10 bit value is 512, does that mean I will need to send 1 to the pin half the time of the sample? Or am I not understanding audio?

Thank you
gladoscc
 
Posts: 1
Joined: Mon May 12, 2014 4:31 am

Re: DIY Walkie Talkie with XBee - will this work?

by adafruit_support_mike on Tue May 13, 2014 6:35 pm

WRT the basic idea, it sounds like it should work, so give it a try.

WRT output, the tutorial you linked is an Arduino Due project, and the Due has a built-in ADC. It converts digital values to analog voltages, so the output for 512 would be VCC/2.

With a regular Arduino, you'd have to convert the digital values to analog using PWM. The output for 512 would be a square wave with a 50% duty cycle.

The Arduino's analogWrite() function defaults to 8-bit PWM, but you can use the 16-bit timer to do higher-resolution PWM if you're willing to dig into the details far enough.

Another thing you'll need to keep in mind: when you sample audio to digital, then convert the digital signals back to audio, you need to make sure your sampling frequencies match. If your output rate is slower than your input rate, the output will make you sound like Darth Basso. If the output rate is faster than the input rate, it will sound like you have a choppy cell connection to Planet Squeaky.

adafruit_support_mike
 
Posts: 58843
Joined: Thu Feb 11, 2010 2:51 pm

Re: DIY Walkie Talkie with XBee - will this work?

by feilipu on Thu Apr 30, 2015 8:52 am

Here's a simple recipe using my own prototype

But this project can equally be done with an Arduino Uno + Adafruit Wave Shield + Adafruit Electret Mic amplifier + XBee Shield.
Adafruit Wave Shield for Arduino Kit - v1.1
Electret Microphone Amplifier - MAX9814 with Auto Gain Control
Xbee Shield

How to build an encrypted digital walkie talkie.

Enjoy.

feilipu
 
Posts: 1
Joined: Thu Apr 30, 2015 8:48 am

Please be positive and constructive with your questions and comments.