Introduction: 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.

Comments

author
家興印 (author)2017-05-12

Hi

when i push button , why I only get "SA!! SA!" voice , I can't get any people voice

author
shesma14 (author)2017-03-20

In Step 6: Ardiuno Code mentioned that

"NOTE: The RF24Audio is using PWN and some other techniques to transmit audio."

Here, what is the meaning of pwn techniques and what are the other techniques, that we can the transmit audio signals.

author
RinorE (author)2017-03-12

Anyone can explain me how is make this https://www.youtube.com/watch?v=2ZK6dcBTeT0&feature=youtu.be

author
ohoilett (author)RinorE2017-03-14

This Instructable will show you how to do that.

author
RinorE (author)ohoilett2017-03-14

My idea is to make a Microphone wireless

author
RinorE (author)ohoilett2017-03-14

Hi sir . Can I connect in input a microphone instead the phone music . Is my first time with Arduino

author
RinorE (author)RinorE2017-03-12

I m very curious to learn how is make this if anyone can help thank you

author
ZachY3 (author)2017-03-07

I have followed your circuit diagram, I have made the low pass filter (even though I don't know where exactly to connect in the circuit) and I have downloaded all the correct libraries and code for the walkie talkie, I have also re-built the circuit multiple times but I still can't get it to work. What am I doing wrong.

author
lerxstrulz made it! (author)2017-02-20

Ok have been working on this all day but so far no luck. No sound, no feedback...nothing. I used the updated microphone wiring diagram from the github repo. I added code to the interrupt function to make sure the button press was getting captured and it is. This is the readout I get in the serial monitor when it starts up:

BSTATUS = 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0

RX_ADDR_P0-1 = 0x0000000000 0x0000000000

RX_ADDR_P2-5 = 0x00 0x00 0x00 0x00

TX_ADDR = 0x0000000000

RX_PW_P0-6 = 0x00 0x00 0x00 0x00 0x00 0x00

EN_AA = 0x00

EN_RXADDR = 0x00

RF_CH = 0x00

RF_SETUP = 0x00

CONFIG = 0x00

DYNPD/FEATURE = 0x00 0x00

Data Rate = 1MBPS

Model = nRF24L01

CRC Length = Disabled

PA Power = PA_MIN

On my other breadboard is just the radio, nano and speaker (no buttons or mic.) Just wanted to test it one way first. Any ideas? Thank you!

20170220_170001.jpg
author
ohoilett (author)lerxstrulz2017-02-20

Hmmm.... you may actually want to ground the pin the button would be attached to on your other breadboard. If it's left floating, that could be a problem. But you're output is telling me that the nRF24 modules aren't connected correctly. Also try connecting a 0.1uF capacitor across Vcc and GND on your nRF modules.

author
lerxstrulz (author)ohoilett2017-02-20

Oh well...haha...ahem....yeah I did not have the RF module in the power regulator adapter correctly ;) So now I get the feedback, but the sound is barely audible in my speaker, and it's highly distorted. I did hook up the button on the other board, but it did not make a difference. I know it is getting signal as I am playing music from my phone and as I turn up the volume the feedback gets louder and more distorted. When I try to use the microphone the feedback is loud but the voice is barely audible.

author
ohoilett (author)lerxstrulz2017-02-26

Did you manage to get it working?

author
lerxstrulz (author)ohoilett2017-02-27

Unfortunately, no. I still just get the feedback noise and you can *barely* hear a transmission. Have tried several different electret mics and I have a wireless mic where the receiver sends out a powered signal. Have tried with and without the mic-preamp circuit. Always the same result. When I hook up my phone and play music, it's super distorted (and you can *barely* hear it) but if I turn the volume up on my phone it's gets even more distorted to where it sounds like static. I'm wondering if maybe there is not enough signal strength on the receiver? I can take pics of the breadboards and post if that would help. Thanks for checking in!

author
ohoilett (author)lerxstrulz2017-02-23

There is quite a bit of feedback with this. I added a few low pass filters <https://www.circuitlab.com/circuit/639ev6/square-to-sine-wave/> to help clean it up a bit and that seemed to help. Also, with the microphones I was using, I had to speak very closely into the mic (within 5mm). And that made a huge difference.

author
remaanandan (author)2017-02-26

Can i use arduino nano v3

author
ohoilett (author)remaanandan2017-02-27

Yup!

author
DesironnA (author)2017-01-06

I made it. this project is realy beautiful. but what about that noise ? the noise is killing me..!
how we can remove this beeb ? in music this noise is "F#"!
how we can solve it ?

author
ohoilett (author)DesironnA2017-01-07

Yeah I had that problem too. I was able to suppress it a bit using a few low-pass filters. <https://www.circuitlab.com/circuit/639ev6/square-to-sine-wave/>

author
DesironnA (author)ohoilett2017-01-08

I think this beep in from NRF24L01. because by disconnecting it of Arduino, the beep noise has been stop. i think somewhere in codes of NRF is incorrect. dont you think ?
i dont know coding. so im afraid its all on you to fix..:D

author
DesironnA (author)DesironnA2017-01-13

Can we replace digital pins to analog ?!

author
ohoilett (author)DesironnA2017-01-09

It has to do with how the sound is generated. It's using square wave pulses from the digital pin. Square waves have a ton of harmonics, which cause the buzzing noise.

author
DesironnA (author)ohoilett2017-01-11

Is it possible that we make some circuit to remove, block, or whatever the only ONE HARMONIC TONE (F# in here) in output ? this is the last and only way to solve the problem i think. is possible anyway ?

author
ohoilett (author)DesironnA2017-01-11

Yeah. The circuit I suggested before should do the trick.

<https://www.circuitlab.com/circuit/639ev6/square-to-sine-wave/>

You could use a notch filter. This links to a 60Hz notch filter, so you will have to modify the components to change the center frequency. <https://www.circuitlab.com/circuit/cef86z/60hz-notch-filter-better/>

author
DesironnA (author)ohoilett2017-01-12

Thank you for all answers. i think the arduino uno has the problem in its digital pins.
a have an arduino leonardo. i used it in project before i buy another arduino uno ! is it useful in this project anyway ? if i buy another leonardo, do you think ot will work fine ? and the other question is, in uno pins are 7 and 8. what about leonardo ? sorry if these questions are so stupidly ! im just a beginner..!

author
DesironnA (author)ohoilett2017-01-08

i saw it. thx. i cant undrestand where we should put it into project. after speaker or what ?

author
DesironnA (author)DesironnA2017-01-08

sorry i mean before speaker ! sorry my english is so bad.

author
ohoilett (author)DesironnA2017-01-11

Oh also realize that there are much more appropriate ways to drive a speaker. But if you are using simple headphones, a standard op amp will do.

author
jloos123 (author)2016-12-13

What's the purpose of the capacitor? Is it necessary? I have a few 10uF capacitors will they work?

author
ohoilett (author)jloos1232017-01-07

Which capacitor?

author
jloos123 (author)2016-12-09

What's the range on the normal NRF24L01 + 2.4GHz Antenna Wireless Transciever? I can't find it anywhere???

author
ohoilett (author)jloos1232016-12-10

According to folks over at Arduino Info Wikispaces, some people have reported up to 1km, but the expected range is more like 100 meters with the standard range modules.
https://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo

author
jloos123 (author)ohoilett2016-12-11

Another question, you have posted two microphone circuits, one has a 100 nF before the output to the arduino and the other doesn't, which do we use? I'm pretty new with electronics.

author
ohoilett (author)jloos1232016-12-11

You want to use the one without the 0.1uF capacitor. Also, the Fritzing picture is incorrect, but I can't change it. I'm running into errors with the Instructables editor.

microphonecircuit.jpg
author
jloos123 (author)ohoilett2016-12-11

Ok great. I'm trying to get this made for Christmas (am ordering all the parts) and just realized that I may not have the NPN Transistor. Now I do have a couple MOSFET transistors, will that work?

author
ohoilett (author)jloos1232016-12-11

Probably not. I would get some BJTs. You can get them pretty cheap on Amazon or eBay.

author
arduinogeek34 (author)2016-11-08

Hi, thanks for your instructions. I have one question, in step 2
"microphone circuit", which of the resistor is 100k? because on the
diagram of the arduino breadboard tjat you post the 3 resistor are the
same color.I'm trying to do it but the only think that doesn't
work seems to be the circuit of the microphone, because all I have now
is a "beep" when I press he button in the other arduino.

author
ohoilett (author)arduinogeek342016-11-08

Ah! I made a number of mistakes on the Fritzing representation it would seem. I am trying to edit the Instructable, but I am having problems with the editor at the moment. The circuit diagram is correct, however. Nonetheless, here is the correct Fritzing representation. Thank you for the catch. Let me know if you have any other issues. As of late I have been doing Google Plus Hangouts with people to help them with their circuits. Lol. That is also a possibility if you would like.

Microphone circuit.png
author
arduinogeek34 (author)ohoilett2016-11-22

Thank you! Now it works!!

author
ohoilett (author)arduinogeek342016-11-22

Awesome! Add a picture!

author
ohoilett (author)arduinogeek342016-11-08

Note: In the Fritzing representation, the red lead of the microphone is its positive terminal and the black lead is ground. You will have to test your microphone to determine its proper orientation. Typically, for electret microphones, the ground is connected to the body of the microphone and a continuity test will help you check for this connection. Otherwise, I simply plug in the microphone in both orientations and see which one works. Lol. Or consult a reference such as this one courtesy of <http://www.zen22142.zen.co.uk/Prac/images/2ecm.jpg>

electret microphone pinout.jpg
author
spgsm (author)2016-10-23

Hi. How about range test?

author
ohoilett (author)spgsm2016-10-24

Hi, thanks for your question. I was able to get decent transmission up to about 100 (50 paces) feet or so. But for these radio modules transmission distance varies for a number of reasons. When I tested this, I placed one module in my room in my apartment and walked outside about 100 paces. When I got around 50 paces, I could only receive transmission if the radio was oriented a certain way. Hope this helps!

author
jeterlee (author)2016-10-15

Interesting

author
ohoilett (author)jeterlee2016-10-15

It was a pretty fun project to build. Hope you enjoyed it.

author
Htet ThuA (author)2016-09-09

where are the interrupt function

author
ohoilett (author)Htet ThuA2016-09-23

See step 3.

author
mnc (author)2016-06-06

Do you think this can work with arduino pro mini?

author
ohoilett (author)mnc2016-06-06

Yeah it works fine with the Arduino Pro Mini. You can use the same pins that would use with the Arduino UNO since it's the same processor. I actually prefer using it with the Pro Mini 3.3 V 8 MHz version since the nRF24 runs on 3.3 V.

Here's a video with me using it with the Pro Mini: https://youtu.be/8gdpx-GyM1Q

author
AXR AMAR (author)2016-05-31

nice !

author
ohoilett (author)AXR AMAR2016-05-31

Thanks! And if you are interested, I'm doing an upgraded version. Just sent out the PCB. This version will actually fit on the wrist and will play the Mighty Morphin Powers Communicator sound when the "Call button" is pressed. It also includes some audio filtering stuff and a headphone jack.

https://oshpark.com/projects/vncwKxEC

About This Instructable

38,838views

367favorites

License:

Bio: Graduate student at Purdue University, biomedical engineer, electronics enthusiast, educator, trying to learn a little about engineering and programming
More by ohoilett:LiPo Battery Breadboard Power SuppliesSuper Simple Electrocardiogram (ECG) CircuitPulseSim - Photoplethysmograph (Heartbeat) Analog Simulator
Add instructable to: