Introduction: Programming Cable for Baofeng UV-5R Radio With Arduino
One may have a 2.5mm to 3.5mm stereo audio cable laying around. This, a
couple of jumper wires and a spare Arduino Uno are sufficient to make programming cable for a Baofeng UV-5RV2+ radio! Could work with other radios too!
"Programming" the radio means we'll upload a list of channels (radio stations) we want to listen or transmit to. These stations may have specific settings (offset frequency, tone, etc.), so programming makes it easier to use the radio.
- Stereo cable with 2.5mm to 3.5mm plugs - 1x
- Jumper wires - 3x
- Arduino Uno - 1x
Tools needed: wire cutters, soldering iron, solder, heat-shrink tubing.
Software used: MS Windows, CHIRP, Arduino USB drivers.
Important Note: we're not actually using the ATMEL MCU, but rather the IC, that allows USB to TTL UART communication, found on Arduino Uno boards.
We'll be using a Windows machine, but I'm sure it would work the same way on GNU/Linux or MacOS.
This tutorial is inspired by miklor's tutorial on making your own programming cable. I only realized that an Arduino board can be used instead of the IC he used.
Step 1: Get a Cable, Cut It in Half
Take the stereo cable that has 2.5mm and 3.5mm stereo plugs, cut it in half. My cable had two wires - red and white, surrounded by copper strands (aka "drain wire") and wrapped in aluminium foil.
In my cable, the Red wire goes to the plug Tip, the White - Ring 1, the Drain wire - Ring 2, on both plugs. Expose 1/4" of copper on each wire, then use a DMM (digital multi meter) in "through" mode to check whether your configuration is the same, write it down - it's important for the future step.
Cut three jumper wires you'd usually use for breadboard prototyping, expose some copper there too. Twist the exposed strands and tin them with the soldering iron and solder. I am using red, yellow and black color wires.
In the end, you'll have something like in the photo to the right.
Step 2: Wire Things Together
Take shrink tubing that is just wide enough to go over the exposed copper wiring, cut three 3/4" long pieces and put them over the jumper wires just as in the photo on the left.
This also gives you a good idea what to do next - solder the jumper wires to the wires exposed from the audio cables. The way things connect is shown in the middle picture:
- RX - red, goes to base of 3.5mm jack
- TX - yellow, goes to the first ring of 2.5mm jack
- GND - black, goes to the ring two of 2.5mm jack
Extra wires can be cut and maybe wrapped with electrical insulator tape.
After things have been soldered, put the shrink tubing over the exposed copper and apply hot air (from a hot air gun, or even just carefully bringing the hot soldering iron close to the surface of the tubing.
I have put an additional piece of heat shrink to cover up the place where solder joints, etc. are - to make it more mechanically robust.
Step 3: Connecting and Programming the Radio!
The next step is to connect and program the radio. When you connect the Arduino to the computer using the USB, it will show up as "Arduino Uno (COM4)" in the Device Manager (could not necessarily COM4 though). If not - you have not installed the proper drivers. There are many Arduino Uno tutorials out there, so I shan't cover this here.
The way we wire TX, RX and GND connections to the Arduino board is shown in the middle diagram . Additionally keeping ATMEGA chip turned off by pulling RESET down - putting a wire between RESET and GND.
Turn on the radio to a channel that has nothing on it, connect the audio jacks, turn the volume all the way up. Your setup will look like the photo on the left.
Start CHIRP and attempt downloading the channel list from the radio by clicking "Radio"->"Download From Radio". After confirming the radio model and port (pic 3), click OK. You'll see Arduino RX and TX lights blink rapidly and whatever's in the radio memory will show up on your screen.
Enjoy and good luck!