Tag Archives: linux

Raspberry Pi Controlled Amateur Radio Fox Transmitter

My friend KT created a cool looking vinyl fox for the outside of my fox box. The rubber ducky connects to an SMA bulkhead. The screws hold the Raspberry Pi and the interface box inside.
The radio is hanging on a 3D printed bracket, the Raspi is in an enclosure that I found on Thingiverse, and below the Pi is a 3D printed controller box.

Lately I have been reading about Amateur Radio fox hunting, and I wanted to make my very own fox. I saw some cool transmitters that are very small, and I have seen transmitters in ammo cans, and I really like the look of the ones in the ammo cans. I also set out to spend as little money as possible, so buying a small transmitter (around $100), was out of the question. I needed to use as much as I had at home.

The first thing to do was to acquire an ammo can from the Army Navy Surplus Store. This set me back $10 cash. I had some at home, but I didn’t want to empty them. Now, it’s time to get to the fun part.

Schematic and wiring diagram.

Some people used Arduino microcontrollers to do the PTT and audio. I have an Arduino, but I really didn’t want to be limited to the audio created by software; I wanted to be able to use actual audio files right out of the box. This was what drove me to use a Raspberry Pi. Someone else used a Model B Pi as a transmitter. I didn’t want to go that route, but it looks really cool, and it was really small! I have more of the first rev B models than I do Arduinos anyways, and I’m always wondering what I could do with them since they pale in comparison to their newer model 3! The trade off is power consumption. The model B Raspi uses about 400mA. Using a newer model would improve this, but I’m using what I have in abundance.

The Raspberry Pi with connections on top of my Engineering Notebook.

The biggest part of this project is the Python program that I wrote. I am using an audio file from a text-to-morse audio converting website to create .wav files. Using the Raspi gives me the flexibility to play any type of audio file, and I can also access the GPIO port to control the radio or read switches. (For later revisions of the project…I’m thinking switches for different messages or a battery monitor to alert users the system is running low!)

Without going into step-by-step instructions on how I built it, the pictures should show a good representation of how this ammo can fox came to fruition. As of this writing I do not have the power supply in the box yet. Santa Claus is supposed to bring me that. I’m opting for a 12v/5v “security camera” power supply. The 5v will power the Pi, and the rest will run off the 12v side.

The Dummy Load

I built a 2.5 watt dummy load from ten 1/4 watt 510 ohm resistors soldered in parallel.  The case to hold the dummy load was 3D printed and has vents to allow heat to escape. While it’s just a theory, I am hoping that having the radio transmit into the dummy load might make it harder to find. I won’t be able to test this out in the field until I have the portable power supply. Carrying around the deep cycle marine battery isn’t any fun, and certainly expands the level of suspicion of a box with an antenna on it.

The Circuit

I had to look at a diagram for how the PTT and mic for the FT-60 worked. The system I devised might work for other radios if the jack is adapted for the other radios. I have a Baofeng that I would like to use, but the 3.5mm jack is wired differently AND I do not have a way to power it externally, yet. A battery eliminator is about $3 on eBay. A work around would be to use your radio’s VOX setting. In this case, you could EASILY omit this circuit altogether and just run an audio cable to a Baofeng (cheap).

I wired the circuit for my FT-60 on a “surface mount style” board. I used a Dremel tool to etch a few pads. I’m really liking how fast I can throw together a working prototype using this method. I used a 2-pin header to connect the interface to the Raspberry Pi GPIO using jumper wires.  (Hint: The schematic/wiring diagram is near the beginning of this long article.)

The 3D Printed Objects

The next thing I wanted to do was 3D print the other parts that I needed to mount the radio controlling circuit, the Raspberry Pi, and the radio into the ammo can. I haven’t had my 3D printer long, but I figured out how to use Tinkercad to create custom parts and learned how to download pre-designed stuff from Thingiverse. Piece of cake!

I printed four parts for the fox box: the dummy load housing, the Raspberry Pi case, the radio clip mount, and the interface box. It’s amazing what you can accomplish with a 3D printer. Having custom parts has never been so easy. All you have to do is design it or find it and print it. Boom!

A Raspi case modified and posted to Thingiverse by RichRap. The one I printed is black.
The Power Supply

The supply I chose for this project isn’t a gel cell like most use. I had a choice to make; I could use the 12v gel cell and make a 5v linear regulator or I could just buy a supply that had both power supplies already built. This one is by TalentCell on Amazon and sells for about $34. It is marketed towards LED strip lighting and CCTV cameras. It should fit perfectly in the fox box based on the dimensions. At 12V 6Ah, it should be able to power the fox long enough for simple hunts. Later on it might be cool to add a power connector to the outside of the fox so it can be charged without opening the ammo can. I probably have the parts for this is the garage. I’m leaving room for improvement.

The Working Prototype

I want to share the working prototype as a conclusion. This was my test program to see how things would work before actually putting the parts in an ammo can. I was using a big screen TV as my monitor so I could type the program. Proof of concept! Are you planning on making a fox box? Share your stuff in the comments below.


foxhunt.py file shared from my Drive


xastir_screenshot_10_9I’ve mentioned Xastir many times before, and it seems to be better and better every time I use it. My original issue was that my KAM TNC would not recognize much of the information that was passed to it. The developers added a delay that accommodates my slower TNC.

The other day I noticed that I could not send any messages through Xastir. I contacted one of the developers, but right off hand he didn’t have an answer. I continued to poke through the settings, and I finally found the setting that fixed this issue. I went to “File -> Configure -> Timing”. The setting that I changed was “Serial Inter-Char Delay (ms)”. I changed it from 1 to 30, and now messages go through as they should without my TNC hiccuping. Be sure that when you find something that works that you “Save Config Now!”.