HamShieldMini now works with the Bluetooth Feather
Even before we started working on the HamShield, we knew we wanted to be able to connect it to Bluetooth. The dream of controlling a ham radio from your Smartphone has driven a lot of our hardware development and software choices. Now, after seven years, we’re finally taking the next step towards that goal. By joining the HamShield with an Adafruit Feather nRF52840, you can go truly wireless.
In this tutorial, we’ll show you how to connect a HamShield Mini to the Feather nRF52840. We’ll also provide some sample Feather code to control the HamShield and take commands over Bluetooth. If you’ve used our prior Arduino examples, there won’t be anything surprising here. With a few added functions, the same Serial control works on the Feather as we’ve been using with Arduino.
The example here shows you how to control your HamShield using Bluetooth LE. Newer versions of the Bluetooth LE standard support Audio over BT, so in the future we may be able to get rid of the dependence on the headphone jack. For the example here, you’ll still need a headset to use audio (though you can do APRS and other digital modes without it).
- HamShieldMini https://www.enhancedradio.com/products/hamshield-mini
- HSMini/Feather Adapter board:
- Adafruit Feather nRF52840 Express https://www.adafruit.com/product/4062
- Soldering Iron
- Arduino IDE (v1.8.6 or later)
Hardware Assembly Steps
- Solder headers to FeatherWing Proto
- Solder SMA jack to HamShieldMini
- Solder headers to HSMini/Feather Adapter board
- Make sure you line up polarity correctly between the adapter and the other boards. We’ve been putting female headers on the main boards and male headers on the adapter board.
- The connections made by the adapter board are as follows:
- SPKR - Feather A0
- MIC - Feather D11
- CLK - Feather D5
- nCS - Feather D6
- DAT - Feather D9
- GND - Feather GND
- VCC - Feather 3.3V
- Connect Adapter board to Feather nRF52840 Express and HamShield Mini. You can either solder the boards directly together with male headers or use the provided female headers to make them disconnectable.
- Screw on Antenna
- Connect to your computer with USB
Programming the Feather nRF52840 Express
Getting Arduino working with the Feather nRF52840
You'll need some specialized board support software for the Arduino IDE to be able to program this Feather. To get that all working, follow the instructions here:
Get the HamShield Library
You'll need our HamShield library to BlueHam BLE client software on the Feather. We have an example of how to use this client software in our HamShield Arduino library. If you’ve already used your HamShield with an Arduino, you’ll already have the library installed. If not, you can install the Arduino HamShield library as follows;
- Start the Arduino IDE
- Select the Sketch->Include Library->Manage Libraries option:
- Search for HamShield, and install the library that comes up:
Install the BlueHam Client software
We’re going to use the HandyTalkie_nRF52840 example that comes with the HamShield library. With a little elbow grease, you can adapt it for other functionality as well.
- Open up the example by selecting File->Examples->HamShield->HandyTalkie_nRF52840
- Plug in your Feather nRF52840
- Select Tools->Board->Adafruit BlueFruit nRF52840 Feather Express
- Select the port for your Feather by clicking Tools->Port->[whatever port is for your Feather]
- Click the installation arrow in the Arduino IDE
We also have a SerialTransceiver_nRF52840 sketch that allows for more fully featured control using a Serial based API. Both the example sketches for the Feather work with serial commands sent over USB or over Bluetooth UART.
Set up your Smartphone
For now, we’re using the Adafruit Bluefruit Connect app to communicate with the Feather. Eventually, we’ll set up a custom app that allows direct control of the HamShield. Until then, you’ll have to control your HamShield by sending serial commands over the BLE interface, almost the same way you send them over the UART for an Arduino connected HamShield.
To see how to set up the Bluefruit Connect app, follow these instructions:
Once you have everything set up, you can power up your BlueHam rig and connect to it using the app. Then you can send commands to it and receive data back using the app. That’s all there is to it!