packetint

Arduino-based soundcard interface for packet radio transmissions
git clone git://squid-tech.com/packetint.git
Log | Files | Refs | README

README.md (3111B)


      1 # packet_interface
      2 
      3 This Arduino sketch was written to create an interface between my computer and 
      4 radio for packet radio transmissions. Feel free to get in touch with any 
      5 questions you may have.
      6 
      7 The interface functions primarily as a switch and a voltage amplifier. Direwolf 
      8 already generates AX.25 packets in audio form, so this interface serves as a 
      9 converter from the 3.5mm aux output from the computer to the RJ12/6 input of my
     10 Yaesu FT-2980R radio.
     11 
     12 If you want to build something similar to this for your radio, here are some
     13 tips:
     14 
     15 * Connect pin 2 to the PTT line in your radio input cable. For some reason,
     16   my radio's PTT engages when pin 2 is set to LOW, and disengages when pin 2
     17   is set to HIGH. If this is not the case for your radio, invert the values of
     18   the digital writes to pin 2 in the sketch.
     19 
     20 * Run the left channel (usually the white wire) from the stripped end of a 
     21   3.5mm aux cable into the TX line of your radio. The other end of the cable
     22   should be plugged into your soundcard's LINE OUT.
     23 
     24 * Also run the signal from the left channel into a voltage amplifier, and from
     25   the voltage amplifier into the A0 input pin of the Arduino.
     26 
     27 * I built a voltage amplifier by running the +5V pin of the Arduino into a
     28   simple resistor voltage divider. You can easily find schematics for this
     29   online. The idea is that you want the signal into the A0 pin to be centered
     30   around ~2.5V, instead of around 0V (which is how it comes from the computer's
     31   audio output jack). The Arduino's analog input pins cannot detect negative
     32   voltage, so it is necessary to offset the audio signal from the computer in
     33   this way.
     34 
     35 * Make sure to consult the schematics in your radio's manual to determine which
     36   wires in the radio input cable correspond to PTT, TX, and GND.
     37 
     38 That is a general summary of how this can be built. It may take some tweaking
     39 and experimentation to get it to work correctly. Basically, the sketch turns
     40 PTT on when it detects signals in the aux cable that deviate from strongly from
     41 the baseline voltage. This works fairly well for my setup, but your results may
     42 vary.
     43 
     44 The 100 millisecond delay in the loop acts as a "smoothing" for the signal
     45 detection. Lower delay values may work better for you, but I found 100
     46 milliseconds to be just about perfect.
     47 
     48 If you find that your radio is transmitting when it shouldn't be, you can tweak 
     49 VOLTAGE_LOW_BOUND and VOLTAGE_HIGH_BOUND at the top of the sketch until you've 
     50 found the appropriate range for your particular setup. It may be useful to use
     51 the Serial Monitor to observe the values of A0 when no signal is being
     52 transmitted, as well as during signal transmission, to determine the correct
     53 range.
     54 
     55 Make sure to configure Direwolf to route data transmissions to the jack you
     56 have your 3.5mm transmission cable plugged into.
     57 
     58 Note that this interface only handles data transmissions; my Yaesu FT-2980R has
     59 a 3.5mm audio output jack, so I'm able to just run a 3.5mm cable from the radio
     60 to my soundcard's LINE IN in order to receive data packets.
     61 
     62 I hope these ideas are of some help to your own projects.
     63 
     64 -KD2SIX