Building a HandyTalkie – First project with HamShield hardware and library
This guide will get you started at the very beginning, even if you’ve never used an Arduino before, and show you how to make your own Ham radio handset with parts from Enhanced Radio Devices!
You will need:
- 1x Arduino with USB cord
- 1x HamShield
- Soldering iron and solder
- 1x Antenna (SMA jack)
- 1x headset or headphones with 3.5mm TRRS connector
- 1x HamShield case (optional)
In this tutorial you will learn:
- Soldering pins and identifying what is used by HamShield
- Attaching HamShield to your Arduino
- Installing the Arduino software and HamShield library
- Attaching an antenna and audio headset
- Uploading the HandyTalkie example code to HamShield
- Initializing the code and choosing a frequency
- Testing HandyTalkie with another device
If you have not already soldered the headers and other components to assemble your HamShield, take a look at our guide here:
Arduino Pins and Interface Description
The HamShield makes use of pins A1-A5, D2, and D3, as seen in this schematic:
A1: nSEN works as a chip select for the AU1846, and is level shifted by Q5 for 3.3V.
A2: ARD_AUDIO_OUT is the audio ouput from HamShield, and is presented to the Arduino analog input for sampling audio, such as packet radio decoding
A3: nRST is tied to the main radio power regulator enable pin, and can operate as a reset line
A4: SDIO is a serial data input and output line between the AU1846 and the Arduino. This is level shifted by Q6 to 3.3V for the radio IC.
A5: SCLK is the serial clock for the AU1846. This is also level shifted to 3.3V volts, using Q7, to the radio IC.
D2: This is connected to the button on the HamShield. This can be used as a transmit button, or for anything else you would like.
D3: PWM audio is generated on D3 by the Arduino, where it is filtered by a 9.1KHz PWM filter, and provided to the AU1846 microphone input.
Connecting HamShield to Arduino
Connect the HamShield to your Arduino by fitting the headers together, specifically lining up the analog pin side to make it easiest. Notice that your HamShield 1.0 puts the headphone TRRS jack directly above the Arduino power plug.
Installing Arduino Software
You can find the Arduino software here: https://www.arduino.cc/en/Main/Software
Select the type of operating system you have. Windows, Mac, and Linux are all supported.
After you select the operating system, Arduino will ask for a donation. You don't have to pay for the software, and can click "Just Download".
After you download the software, run the installation package and install the program.
Installing the HamShield Arduino Libraries
HamShield needs special libraries in order to run under Arduino. Luckily, Arduino has a library manager and we publish our libraries there. Here is how to install them:
Run the Arduino IDE.
Go to the "Sketch" menu and select Include Library > Manage Libraries…,
Search for HamShield in the search bar.
There are 3 libraries that are available. "HamShield" is the main library that powers the radio. "HamShield_KISS" contains the packet radio software, and "DDS" generates the phase accurate signals required for the packet radio. You will need to search for "DDS" specifically, as this library is also general purpose.
Prepping HamShield for Transmission
Attach your headset and antenna to your HamShield.
Plug your Arduino into the computer you are using the Arduino software on using the USB cable. The USB will provide enough power for the HandyTalkie to transmit on its lowest setting, but you will need to plug in external power for any higher settings. You can use our DC power supply or another one which can provide an amp or two at 9-12VDC.
In the Arduino software, open the HandyTalkie code by opening the File menu and choosing Examples > HamShield > HandyTalkie.
Confirm you are about to send code to your plugged-in Arduino by opening the Tools Menu and making sure the right one (Arduino in the name) is selected.
Now, press "Upload"
Arduino will take just a moment and give you some feedback at the bottom of the window.
To test and activate your HandyTalkie, start by opening the Serial Monitor in your Arduino software.
Make sure 9600 baud is selected at the bottom, and then press the Switch on your HamShield to initialize the HandyTalkie code.
When prompted, enter your Tx/Rx desired frequency in kHz. The power LEDs should light, and you should start hearing some static from your headset.
Take a look at the Serial Monitor window. You should see some feedback and then a continuing line of numbers indicating the signal strength of what your HandyTalkie is receiving.
A low signal strength (like -120) indicates that you aren’t receiving any signal. A high signal strength indicates that your HandyTalkie is receiving a signal from another transmitter. You’ll also be able to hear the received signal in your headset.
Press and hold the Switch to switch to transmit, and you should see the serial monitor indicate this by outputting “Tx”. When you release and return to receiving mode, it will output “Rx”.
If you are done with the Serial Monitor information and your HandyTalkie is connected to another power source, you can now disconnect your HandyTalkie from your computer.
To test signal quality, we recommend you connect another HandyTalkie and transmit between them!
Making ContactsTo get started making contacts, we recommend checking out this short write up by the ARRL (http://www.arrl.org/making-your-first-contact). The national simplex calling frequency for the 2M band is 146.520MHz, and for the 70CM band the frequency is 446.000MHz. These will be good places to try and make a simplex contact. You might also try coordinating with a friend, or asking another operator on a local repeater to try for a simplex contact so you can try out your new setup.
Assemble your HamShield: https://www.youtube.com/watch?v=93vexYQ2Ub0
HamShield library on GitHub: https://github.com/EnhancedRadioDevices/HamShield
Hardware design files for the HamShield: https://github.com/EnhancedRadioDevices/HamShield1
Get your license to operate a ham radio: http://www.arrl.org/getting-licensed
Download the Arduino software: https://www.arduino.cc/en/Main/Software