CW Macros and Rig Keying with Python

Raspberry Pi Fox Hunt Controller



Build a foxhunt controller that interfaces to a Baofeng UV5R to monitor reception and send out messages at programmed intervals after receiving a signal.

This is a simple project for the PI.  It uses one output and one input.  The input monitors the speaker output of the Baofeng UV5R.  This radio has a 3.6V offset voltage when the squelch opens.  This is sufficient to activate a opto-isolator to trigger the receive input on the PI.  An output from the PI triggers the radio transmit through another opto-isolator.  Audio from the PI is passed to the UV5R on the mic plug.

Items Used

  • Raspberry PI 2
  • GPIO Board and Bread Board
  • Additional Bread Board
  • Baofeng UV5R
  • Mike and speaker cable for the UV5R
  • Headphone plug for the PI
  • 2 – 4N37 Opto couplers
  • 3 – 1000 ohm resistors
  • 1 – 1000uF capacitor
  • Jumpers

Wiring Diagram


Circuit diagram


UV5R mic and speaker plug

YouTube Video

Python Code

Python Program

This is a text file.  It must be renamed with a “.pyw” extension.



Hello …  Just starting a new website.  Just playing around.

2 thoughts on “N4USS”

  1. I like your little Crossbend project . I also would like to say that you live in a beautiful part of the country . When I was out there working on a radio system that covers part of Virginia for a Virginia power co-op I got to visit several mountain tops and I got to drive through your part of town .and wish that I lived out there to on unfortunately I live in the west coast Los Angeles area.
    Take care

Leave a Reply

Your email address will not be published. Required fields are marked *

UV5R Cross Band Repeater Information

Here is a link to a presentation and build instructions.

ICOM 7000 Cross Band Repeating

Links to YouTube videos.


One thought on “UV5R Cross Band Repeater Information”

Leave a Reply

Your email address will not be published. Required fields are marked *