Arduino Fox


The Simple Foxhunt Transmitter

Introduction
On this page you'll learn how to make a simple Foxhunting Transmitter/Beacon which can be remotely controlled via DTMF and all runs from a 12v source, Aruino Uno (can use a smaller one if you wish), a relay module, and a Baofeng UV3R+ (any radio will work for this you just need to wire your PTT and audio lines to suit).

Hardware Needed
Soldering Equipment
Jumper Cables of Your Choice
Arduino Uno
5V Single Channel Relay Module 10A is Sufficient
Baofeng UV-3R+ This kit contains headset which we will use for audio cable

Software Needed
Arduino IDE
Files for the Fox
As stated in the README file within the archive. Copy the DTMF folder to your 'libraries' directory of your Arduino IDE environment and copy the Fox folder to your 'sketch' directory of your Arduiono IDE environment. Please ensure you don't move or touch the .h and .cpp files. The .ino is your sketch where you'll do your code editing.

Part 1: Preparing Cable
When you receive your cable with the UV3R there's a PTT switch, single headphone and a microphone. Chop the cable near the in-line PTT/Mic module. The mic, switch and headphone can be discarded. Carefully strip back and tin the 4 wires. The cable should have 4 colours: Red, Green, Blue and Brown.

Now that you have stripped the wires and tinned them solder them onto appropriately coloured jumper wires. Finish off the connections with heatshrink to avoid shorts. It doesn't matter that the physical wires touch each other as they are enammeled. Your cable will look like the image below.

Part 2: Examining PTT/Relay Circuit
In order to protect the radio from back EMF and to isolate the 5v driving the relay board from the radio we use a relay board. This has many advantages. The radio isn't constantly keyed, thus reducing heat and prolonging it's battery and the relay boards are fitted with optocouplers which adds an extra layer of protection. The image below details the wiring of the Baofeng radio (UV3R is different to UV3R+ so pay attention!). This wiring will also suit a UV5R and some Kenwood radios too. Note the inline PTT below can be omitted!

To get PTT to work the code essentially triggers the relay over to it's N/C position bridging the COM (Common Pin) and N/C pin and externally keying the radio by shorting the sleeves of the headphone sockets in the radio. On my board I bridged N/O to Ground to keep grounding common from the Arduino through to the radio. This will help to keep things happy. On the relay I also soldered 3 wires to it's input. GND (Black wire) goes to the Arduino GND pin, VCC (Red wire) goes to the Arduino 5v pin, IN1 (Orange wire) goes to digital pin 7 on the Arduino.

Part 3: Wiring Arduino
The final step of the wiring process is connecting your remaining wires to the Arduino. As mentioned above your relay is connected. We should have two remaining wires. Green and Red. The Green wire connects to pin A0 (A Zero) on the Arduino. This serves to push receive audio to the board. The Red wire connects to digital pin 6. You'll note the small tilde (~) next to the pin. This denotes it's a PWM pin. PWM is especially useful for using the TONE command to produce a Morse Code type sound. If you wish you could use an R/C filter network to give a smoother sound but that is optional and quite frankly adds to the complexity of the circuit. Your wiring is now complete! Further images below to clarify how everything is connected.

Part 4: Loading Software
The final part of this project is to load your Sketch to the Arduino. I won't cover how to do this in this document but if you've followed my notes above in regards to the location of files you shoudn't have any issues. It should be noted that this code and idea is mostly based off WT4Y's design. I modified the code to work with my relay board and changed the musical notes to a well known Aussie folk song :>. When firing up the Arduino send a DTMF 1 to the Fox to start transmitting. A number 7 (during a break in TX) will send '73' and a number 5 will send "Have You Found Me Yet" in morse. A number 0 will disable the fox entirely :D (this is the evil part). In closing I urge you all to have a go at this. It's a simple project and teaches many simple concepts in interfacing a radio to a modern microcontroller without damaging everything in the process.

Have Fun! 73, Scott - VK5FSKS