DIY Arduino Wristwatch Walkie-Talkie

123K409165



Intro: DIY Arduino Wristwatch Walkie-Talkie

Alrighty, I have always wanted to make a wristwatch walkie-talkie to emulate the communicators used in Mighty Morphin Power Rangers. My interest has recently been rejuvenated after finding a cool Power Rangers communicator prop and by the recent development of voice calls with smartwatches. I have been doing a bit of prototyping on-and-off for a while now and I think I have an idea of what I want to do. In this Instructable, I will show you guys how to put together a simple walkie-talkie using the nRF24L01. TMRh20 has put together a nice audio transmission library using the nRF24. I am a ways away from making a well put together device, but I got a kick out of coming this far in the process and I hope you will too.

STEP 1: Gather Your Tools


I wanted to make this prototype relatively sleek, so I was trying to solder everything to a protoboard. That did not work out so well. I also want to submit this Instructables in the Wearables Tech Contest, which ends tonight. So, here goes plan B. There is a lot more miniaturization to come.

2 x Arduino UNO/SparkFun RedBoard (An Arduino Mega could also be used)
2 x nRF24L01 (originally purchased on eBay, but SparkFun now carries a version and I would recommend buying it from them, though I have not tried their version)
2 x electret microphone (originailly purchased on Amazon and got a few cheap mics. Decent purchase. If you want something better, I'd recommend this)
2 x NPN transistor
2 x Buttons
2 x 3.5 mm jack breakout
2 x Breadboard
6 x 10 k resistor
2 x 100 k resistor
6 x 100 nF capacitor
Assorted jumper wire in particular, you need some that are male-female for connecting the nRF24L01 to the Arduino. The nRF24L01 module is not breadboard friendly.

Tools

  1. Soldering iron
  2. Solder
  3. Flux pen
  4. Soldering wick

STEP 2: Microphone Circuit

datasheet from ON SemiconductorThe microphone circuit is pretty simple really. I do not know the original source of the circuit. I happened upon it when Googling "simple microphone circuit." I included the original picture because I wanted to give credit to the original poster (whoever that may be), but I made a slight change. I removed the 0.1 uF capacitor at the collector of the transistor. This capacitor filters out DC voltages and only passes AC currents which means that we will be creating "negative" voltages. This is fine in most cases, but since we are connecting the output of the preamp to our microcontroller, we can't pass a "negative" voltage. It also allows us to hook our pre-amp circuit directly to headphones, but since we are connected it to the analog-to-digital converter of the Arduino, we can remove it.

Electret Microphone and Transistor

These electret microphones have a flexible diaphragm on the inside that moves based on the sound wave that hits them. The diaphragm is parallel to another conducting plate which creates a capacitor with variable capacitance based upon the flexing of the diaphragm and subsequently the sound pressure wave that the microphone is picking up. With the microphone connected to the circuit the way it is, it will produce an AC current at the base of the transistor based upon the sound wave hitting the microphone. The base current of the transistor is amplified and so we have an amplified sound wave that we are feeding into our microcontroller.

The pinout for the transistor is attached. The image is courtesy of the datasheet from ON Semiconductor <http://www.onsemi.com/pub_link/Collateral/2N3903-D.PDF>

STEP 3: Call Button

We need a simple button circuit for calling the person on the other end of the walkie talkie. I used a simple pushbutton, 10 k resistor, and a 100 nF capacitor. The circuit is pretty straightforward. I added a capacitor to the typical button circuit that you may be familiar with. This capacitor is to help prevent "bouncing" or erratic signals from the button. You may be familiar with other ways to debounce a button, but I have found that adding the capacitor works well enough.

I have attached an interrupt to pin 3 to detect when the button is pressed. Interrupts are really nifty. They allow us to "interrupt" the code to provide very precisely timed events without deteriorating performance (if done properly).

attachInterrupt(digitalPinToInterrupt(talkButton), talk, CHANGE);

With this piece of code, we go to the "talk()" function which checks the voltage on pin 3. If the voltage is HIGH or 5 V, the nRF24L01 will switch to transmit mode (sending voice). If the voltage is LOW or 0 V, the nRF24L01 will switch to receive mode (receiving voice). The voltage on pin 3 should be HIGH when the button is pressed and LOW when the button is released. Whenever the voltage on pin 3 "CHANGES" as denoted in our "attachInterrupt" function, the "talk()" function will execute.

void talk()<br>{<br>	if (digitalRead(talkButton)) rfAudio.transmit();<br>	else rfAudio.receive();<br>}

STEP 4: Add Speaker

TMRh20's RF24 Audio library hardwires the speaker outputs to pins 10 and 9 on the Arduino. You can simply connect these to a small speaker or headphones without a pre-amp. For bigger speakers you would want to use a pre-amp, or maybe for long-term use. I used some alligator clips to connect pins 10 and 9 to the 3.5 mm headphone jack. I also used SparkFun's 3.5 mm Jack Breakout which was extremely handy.

STEP 5: Wireless Transmission

nRF24L01 to Arduino
1. Ground to Ground
2. Vcc to 3.3 V (NOT 5 V)
3. CE to digital pin 7
4. CSN to digital pin 8
5. SCK to digital pin 13
6. MOSI to digital pin 11
7. MISO to digital pin 12
8. IRQ to digital pin 2

I used the nRFL01 RF transceiver from Nordic Semiconductor for this project. This guy is a pretty popular hobbyist RF transceiver due to its low cost and decent range. I used the long ranged modules (with the antenna), but these are not necessary. For this step, we need to download two Arduino libraries: the RF24 and the RF24Audio library (attached). For instructions on installing 3rd party libraries for the Arduino, please refer to this tutorial at Arduino.cc. Also attached is the pinout for the nRF24L01 courtesy of Terry King and the other contributors of the ArduinoInfo.Info Wiki. Terry also has a detailed tutorial and description for the nRF24L01 that I found very helpful. Check it out. I also soldered 100 nF capacitors across Vcc and GND for stability, as recommended by Terry King in his wiki. Also notice that the nRF24L01 is a 3.3 V device, not 5 V. The other pins are 5 V tolerant, but Vcc is not.

STEP 6: Arduino Code

I put together a simple code utilizing the RF24 and RF24Audio libraries. Pretty simple. Upload this code to both Arduinos. Both circuits with default to "receive" at the start of the code. Press the "call button" to transmit audio from one radio to the other. NOTE: The RF24Audio is using PWN and some other techniques to transmit audio. This produces loud background noise that is pretty irritating. I have not figured out how to get rid of that as yet. If you do, please share!

Alrighty, have fun!

You can download the walkie talkie code from its GitHub Repository or from the attachment below.

121 Comments

sir pls, tell me which code i uploded in ardiuno uno

walkie_talkie_basic.zip is what you upload in arduino uno, the other zip files are your libraries that you need to upload as well.
Which code i uploaded to arduino ? Is it in RF 24.ZIP OR RF24AUDIO.ZIP OR walkie_talkie_basic.zip which one i upload to arduino uno atmega 328p
walkie_talkie_basic.zip is the code, the other files are libraries required for the code to work.
Are there any successful results?
I did!!!! I'm a beginner but if you know the most basic idea of breadboarding and just wiring neatly it should work!
I've had great success (at least in my books) with this project. However, has anyone figured out yet how we can stop the loud noise from happening when you press the button?
How do you use a 3 pin electret mic?
can I get the block diagram of this project
please help me with arduino mega. it's not work


Hi, I managed to create the circuit successfully, but do you know how to amplify the sound coming out of the speaker?
You should see greatscott's video in youtube. Thus you can make lower noise voice transmission.
Hi. I have had the same problem as some one before where i am not getting any transmission of voice. When i press the button of one circuit the speaker of the same circuit has static noise.
Also for the connection of the microphone circuit to the arduino, do you connect it from the emmitter or collecter of the npn transistor?

Thank you
I made one but there is huge background noise. how can I fix it.
Voice was not detecting what may be the problem is there any amplifier must be prior or what might be the problem
Hey! I created the same setup as you and managed to get the receiver to send/receive. However, the speaker is not outputting any noise.
connect a 10uF chimical capacetor betwen GND and 3.3V of the module nrf24l01
Hey! So I managed to make the circuit and everything works except the part that transmits my voice. When I press the button on either side, I hear the static noise but when I speak even with the button pressed, nothing. Is there something I'm missing?
Make sure you're speaking really closely into the mic. Maybe 2 inches away.
Doesn't seem to work still. Would I have to change the transmission in the serial monitor or would it perhaps be that I have the microphone circuit connected incorrectly? Also I just realized that when the button is pressed, the speaker on the same board is turning on when it should be the other way around.
More Comments