HackerBox Fox Hunt

by HackerBoxes in Circuits > Wireless

1592 Views, 3 Favorites, 0 Comments

HackerBox Fox Hunt

Fox Hunt Whole Box.png

The HackerBox Fox Hunt Kit is a compact, yet powerful, DIY radio transceiver operable on either VHF (2m) or UHF (70cm) amateur radio bands. The microcontroller "brains" and color graphical display for the HackerBox Fox Hunt Kit are provided by an ESP32 T-Display Module supporting simplified programming through the Arduino Integrated Development Environment (IDE). An SA818 radio transceiver module can be controlled by firmware running on the ESP32 microcontroller. The compact form factor of the HackerBox Fox Hunt Kit is ideal for amateur radio direction finding (aka fox hunting). Flexible, extensible hackability is support by a full set of I/O pins broken out to an expansion header including audio in and out signals.

HackerBoxes is the monthly subscription box service for enthusiasts of electronics and computer technology - hardware hackers - the dreamers of dreams.

Supplies

This Instructable contains information for working with the HackerBox Fox Hunt. Full kit contents are listed on the product page where the HackerBox Fox Hunt is also available for purchase.

A soldering iron, solder, and basic soldering tools are generally needed to work on HackerBoxers. A computer for running software tools is also required. Have a look at the HackerBox Workshops for tools and supplies along with a wide array of introductory activities and experiments.

You will definitely also need a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.

ALWAYS WEAR SAFETY GLASSES WHEN SOLDERING, WHEN TRIMMING WIRE LEADS, OR WHEN CUTTING, DRILLING, ETC.

Amateur Radio

Ham.png

ARE HACKERS THE FUTURE OF AMATEUR RADIO?

The HackerBox Fox Hunt Kit comes in two variants: VHF and UHF

The VHF version operates in the two meter (2 meter) amateur radio (ham radio) band; a portion of the VHF radio spectrum that comprises frequencies stretching from 144 MHz to 148 MHz. Electromagnetic waves in this frequency range are around 2 meters in length.

The UHF version operates in the 70 centimeter (aka 440 MHz) amateur radio band; a portion of the UHF radio spectrum that comprises frequencies between 420 MHz and 450 MHz. Electromagnetic waves in this frequency range are around 70 centimeters in length.

HAM RADIO BANDS

The HackerBox Fox Hunt uses an SA818 radio transceiver module. These modules use the same circuitry as the very popular Baofeng Handheld Transceiver. This handheld radio was featured way back in HackerBox 0003: Radio Active. What a long, strange trip it's been. That HackerBox online guide is still quite useful and the Baofeng radio itself has continued to become ever more affordable.

Anyone can use an SA818 transceiver, or any other 2m/70cm radio, to receive, listen to, and decode all the radio signals they wish. However, transmitting on frequencies in theses bands REQUIRES A RADIO LICENSE. If you are not a licensed radio operator or haven't verified the laws in your country, you should definitely not assert the PTT (push-to-talk) control signal on the SA818 module. Please take these laws seriously.

HAM RADIO LICENSES

While there is quite a lot to hear and explore in the 2m/70cm radio bands without transmitting, you may want to consider getting an amateur radio license! What better place than here? What better time than now?

In the US, the initial radio ticket is the Technician Class License. It is obtained by passing a 35 question exam that, while not trivial, is easy enough to prepare for. All of the possible test questions are available free online to study at your leisure and you can find an exam location in your area or even take one online. You do not need to learn morse code.

Additional resources to prepare for the exam:

Ham Radio Crash Course Technician License Prep 2022-2026 Playlist (12 videos)

Free PDF copy of the No-Nonsense Technician Class License Study Guide

ARRL Technician Course 2022-2026 Playlist (37 videos)

HamStudy.org: free online study and practice tests

RADIO CLUBS

Ham Radio Village, K0HRV

Find a Club

Fox Hunting With HackerBoxes

Amateur Radio Foxhunting: Equipment, Techniques, & Getting Started - Ham Radio Transmitter Hunting

Fox Hunting is an activity wherein participants use radio direction finding techniques to locate one or more radio transmitters hidden within a designated search area. This activity is most popular among amateur radio enthusiasts, and one organized sport variation is known as amateur radio direction finding. (Wikipedia)

The HackerBox Fox Hunt Kit is based on the kit featured in HackerBox 0096

HackerBox 0096 was originally released as part of the HackerBox monthly subscription box service. It was very popular and quickly sold out. The Fox Hunt Kit update is sort of a "back by popular demand" offering. The online guide for HackerBox 0096 has a good bit of overlap with this guide, but also includes some other information and comments that are worth going back to have a look at. Like all HackerBox online guides, it's free!

What is different in the HackerBox Fox Hunt Kit versus HackerBox 0096?

  • Form Factor: The PCB in the Fox Hunt Kit is more compact and its layout lends more towards field use such as fox hunting. In contrast, the original HackerBox 0096 layout was envisioned for "lab bench" experimentation.
  • Harmonics Rejection: Landing pads for a ceramic low-pass filter component was added between the transceiver and the antenna connector.
  • UHF (70 cm) Variant: While the original HackerBox 0096 kit featured a VHF (2 meter) transceiver module, the HackerBox Fox Hunt Kit is available in both VHF (2 m) and UHF (70 cm) versions. Note that only two components differ between the VHF and UHF versions of the HackerBox Fox Hunt Kit: the transceiver module and the ceramic filter.

What hasn't changed?

Most importantly, the basic functional design specified by the MCU/Display module and the I/O pin assignments have remained the same - excellent for code reuse.

ESP32 T-Display Module

ESP32 TDisplay.png

To build confidence, configure the required tools, and reduce troubleshooting variables, we will initially be working with the T-Display Module WITHOUT SOLDERING the pins (or anything else) to the module.

The microcontroller (brains) and graphical display for the HackerBox Fox Hunt Kit is provided by the LilyGO TTGO ESP32 T-Display Module, which we will refer to as the T-Display. It's a very compact ESP32 development board with a built-in 1.14 inch IPS 240x135 Full-Color Display. The T-Display module also provides Wi-Fi, Bluetooth, a battery charging interface, two onboard GPIO buttons, and a USB-C connector. The IPS Color Display is controlled by an ST7789V Driver Chip that is prewired to the ESP32 pins shown in the diagram above.

Let's roll...

  • Power up the T-Display using a USB-C cable
  • The factory programmed firmware will display a graphics demo
  • Install the Arduino IDE (if you don't already have it)
  • In the IDE, use the Boards Manager to search for ESP32 (by Espressif Systems)
  • Select that board package and hit install
  • Under the Tools menu, select:
  • Board: ESP32 Dev Module
  • Upload Speed: 921600
  • CPU Frequency: 240Mhz (WiFi/BT)
  • Flash Frequency: 80Mhz
  • Flash Mode: QIO
  • Flash Size: 4MB (32Mb)
  • Partition Scheme: Default 4MB with spiffs (1.2MB APP/1.5 SPIFFS)
  • Core Debug Level: None
  • PSRAM: Disabled
  • Port: COM port that appears and disappears when T-Display is connected/disconnected
  • Upload Speed: 115200 (setting this lower speed can help with programming the MCU)
  • From Tools > Library Manager, search for TFT_eSPI
  • Install the TFT_eSPI Library from Bodmer
  • Find the folder where Arduino Libraries are installed and the folder for TFT_eSPI
  • Locate and open the file User_Setup_Select.h in a text editor
  • Comment out the line with #include User_Setup.h (default)
  • Uncomment the line with #include User_Setups/Setup25_TTGO_T_Display.h
  • Save the file
  • Load File > Examples > TFT_eSPI > Test and Diagnostics > Colour_Test
  • Compile and Upload Colour_Test onto the ESP32 T-Display Module

A new program is now loaded onto the ESP32, which will generate an example of colorful text display. This confirms that our ESP32 T-Display Module is fully functional and also that our tools and libraries are properly configured.

Shall We Play a Game? (Features some nice graphics from Volos

Additional References:

TTGO-T-Display GitHub Repository

Jeroen Maathuis' T-Display ESP32 Code Snippets

LCD wiki for module with 1.14 inch IPS Display

SA818 Radio Transceiver Module

SA818.png

The SA818 is available in two frequency band variants: VHF (134-174 MHz) and UHF (400-480 MHz). Both are shielded modules with integrated high performance microcontrollers, narrow band RF transceiver ICs, and RF power amplifiers. The SA818 provides a standard UART interface for easily configuring transceiver parameters and controlling radio transmit and receive functions.

Detailed specifications are provided in the attached SA818 Product Spec file. The attached SA818 Programming Manual details the five AT commands that can be sent to the SA818 over its serial interface:

1: Connection Handshake
   AT+DMOCONNECT
2: Set Group Parameters
  AT+DMOSETGROUP
3: Scan Frequencies
   S+ReceiveFrequency
4: Set Volume
   AT+DMOSETVOLUME
5: Set Audio Filter
   AT+SETFILTER

Use of AT commands are reminiscent of the old Hayes telephone modems or, more recently, the original 8266 firmware interface.

Assembling the HackerBox Fox Hunt Kit

Assembly.png

Start on the back of the PCB (with the skull graphic)...

Ceramic Filter Low-Pass Filter

A low pass filter can be used to reject RF harmonics.

The cutoff frequency for the filter is matched to the frequency range of the transceiver selected:

For VHF: LFCN-180+ Low Pass Ceramic Filter DC - 180 MHz (digikey)

For UHF: LFCN-490+ Low Pass Ceramic Filter DC - 490 MHz (digikey)

The filter component may look small, but it's not any harder than soldering a large surface mount resistor. Just as with a resistor, solder the two shorter sides first. Then at the middle of each of the longer sides, solder the middle terminals to the ground pads on the PCB next to the filter component.

The filter component is designed to operate in both directions, but it is convention to place the red marking closest to the transceiver side (away from the antenna side) as shown in the image above.

Zero Ohm Resistor Option

If the filter component is not desired, or not available, the antenna trace can be closed using a zero ohm resistor (in an SMD 1210 package) as shown in the image above. The resistor is soldered in just like the filter, however the two side (ground) pads are not used.

SA818 Transceiver Module

Carefully position the module to match its castellations over the corresponding pads on the PCB. Solder the small castellations on three sides of the module. The two large pads on the fourth side can be left unsoldered. Have a look at SparkFun's guide on How to Solder Castellated Mounting Holes.

Three Momentary Tactile Buttons

Align the buttons over the corresponding PCB landings. Each can be oriented in either direction.

Audio Line Out - 3.5 mm Tip Ring Sleeve (TRS) Jack

Positing the audio jack into place according to its alignment pegs. Solder the three tabs into place.

SMA Antenna Connector

Place the Male SMA Edge Connector over the edge of the PCB as shown on the image above. Line up all five of the terminals on the connector with the pads on the PCB. Solder them into place. What's the difference between SMA and RP-SMA?

ESP32 T-Display Module

Two rows of header pins provided in the plastic box with the T-Display are used to solder the T-Display to the Fox Hunt PCB. Here are a few pointers:

Trim a tiny bit of the plastic insulation from the header on 5V pin just next to the reset button so that it clears the neighboring surface mount component on the bottom of the T-Display board.

Orient the T-Display such that the USB-C port extends over the edge of the Fox Hunt PCB.

Mount the T-Display on the same side of the PCB with the three buttons. In other words, DO NOT cover the skull graphic.

Indicate the VHF/UHF Frequency Marking

Use a fat black Sharpie on the bottom of the PCB to mask out the "incorrect" band, or use a thinner permanent marker to place a checkmark in the box for the "correct" band.

Consider Enclosures

The reduced size of the Fox Hunt PCB allows the entire radio, including its battery, to be enclosed within a short section of PVC pipe or inside a small 3D printed, molded, or extruded housing.

Firmware

Programming.png

No Call Sign Yet (Receive Only)?

A great option to play around with the Fox Hunt Kit before you get your ticket (amateur radio license) is to use the NOAA Radio Receiver Example Code from the HackerBox 0096 Guide. It works great on the HackerBox Fox Hunt Kit hardware and it will let you verify operation of the transceiver module, display, buttons, and audio output jack.

Fox Hunt Transmitter Code

Ready to hunt the fox? The attached fox.ino code from HackerBox 0096 also works great on the HackerBox Fox Hunt Kit hardware. We created the code by modifying the fox project from c0ldbru which he had modified from Gregory Stoike's Yet Another Foxbox (YAFB) project. Program it like so:

  1. download the two sketch (.ino) files attached here
  2. put them both into the same folder
  3. open fox.ino in the Arduino IDE
  4. find the string N0CALL and replace it with your callsign
  5. compile, program, and HUNT THE FOX!
  6. never gonna...

UHF Fox Hunt

To hunt a UHF fox, simple change this line in the code:

float frequency = 146.565;

To specify a UHF frequency instead of that VHF frequency.

Recall that the VHF (2 meter) band comprises frequencies from around 144 MHz to 148 MHz, while the UHF (70 cm) band comprises frequencies from around 420 MHz to 450 MHz.

(video about amateur radio frequency bands)

Extensibility

Extensibility.png

In the true hacker spirt, you may wish need to modify and/or extend this radio kit...

Expansion Header

The number markings on the expansion header indicate the corresponding GPIO pins of the ESP32 MCU. The table below lists the function for each of the I/O pins. Note that I/O 36 remains unused for your enjoyment.

15 Button A
17 SQ
25 Mic In
22 TXD
38 Line Out
21 RXD
13 PTT
27 PD
26 Button B
33 H/L
32 Button C
36 Unassigned

AUDIO LINE OUT

Audio signals received by the SA818 radio module are output from the SA818 on pin 3 (AF_OUT). AF_OUT means audio frequency output. This signal goes to three destinations:

  • line out jack (3.5mm TRS socket)
  • analog to digital (ADC) input to ESP32 (I/O pin 38)
  • pin "38" of the Expansion Header

Note that the 3.5mm line out jack has the received audio connected to both the left and right channels, so ear buds can be used to listen to the received signals. Amplified speakers can also be fed from the line out socket. The line out signal can also be fed into a PC (or other gizmo) to process digital mode signals received by the SA818 radio module.

AUDIO LINE IN

Audio signals fed to the SA818 radio module for transmissions are fed into the SA818 on pin 18 (MIC_IN). MIC_IN means microphone input. This signal can be fed from two sources:

  • digital to analog (DAC) output from ESP32 (I/O pin 25)
  • pin "25" of the Expansion Header

While the signal can be fed from both of these sources, it should only be fed by one source at a time. For example, while outputting audio from pin 25 of the ESP32, pin "25" of the Expansion Header should be left unused. Similarly, when feeding an audio signal into pin "25" of the Expansion Header, I/O pin 25 of the ESP32 should set to INPUT mode so that it is not also driving the same signal line.

Hack the Planet

outro.png

As hackers and amateur radio operators alike are driven to build their skills and knowledge, we welcome you to subscribe to HackerBoxes, the monthly subscription box for electronic hobbyists. Join us every month for new discoveries in electronics, computation, communications, and information security. Visit HackerBoxes.com to sign up for your monthly HackerBox subscription. In the meantime, please share your successes and questions in the comments below. Email support@hackerboxes.com anytime you have a question or need some assistance.