ad: Schulman-1

Arduino Powered Fldigi Keyer

Discussion in 'Arduino Playground' started by WA9TDD, Mar 28, 2021.

ad: L-HROutlet
ad: l-rl
ad: Left-2
ad: abrind-2
ad: Left-3
ad: Subscribe
ad: L-MFJ
  1. WA9TDD

    WA9TDD Ham Member QRZ Page

    Fldigi does not offer a serial port driver to simulate a hard close on a CW rigs’ key contacts, but rather, uses tone modulation to produce MCW for use on sideband rigs to emulate CW. As a tinkerer with Arduino microprocessors, I thought that there must be a way to use the 1kHz tone produced by Fldigi from a PC soundcard to “hard key” my Ten Tec Rebel QRP rig. After much experimentation, I found a simple to construct and program “CW Modem” that can key the rig. Using the macro functions of Fldigi can store and send predetermined text or messages in the same way that digital modes such as PSK can or just use the keyboard to transmit CW text.

    The Circuit

    An Arduino (Fig. 1) is a small microprocessor typically used in robotics that can utilize many types of sensor inputs to produce either analog or digital outputs. They are also reasonably inexpensive and easy to program. The circuit consists of a “single channel sound detection module”(Fig.2), an Arduino Uno or Nano microprocessor, a homebrew opto-isolator* (Fig. 3 & 4 see below) and some wiring. The Arduino Nano functions exactly the same as the Uno, but takes up a lot less room. All of the components can be obtained for about $20 by shopping at a popular auction site or less depending on the contents of your junkbox.

    Audio from the earphone jack on the PC is fed through an earphone plug to the microphone input solder pads of the sound detection module, carefully soldering the wires as the pads are very small. The output of the sound detector module is fed to digital pin 3 of the Arduino, power for the module coming from the +5v and ground pins on the Arduino. Output from the Arduino is fed from pin 13 on a Uno or pin 12 from a Nano. The output is fed to the input of an opto-isolator against the Arduino ground. The keying line is then taken from the output of the opto-isolator through 2 wires to the CW key input of the rig. Isolation does not seem to be a problem through the sensor and opto-isolator, so no isolation transformer is required between PC and processor.*I did not have an opto-isolator in my junkbox, so I paired a low voltage led to a photoresistor head to head with some shrink tubing to make a sensitive facsimile of an opto-isolator and it works very well. You might have an opto-isolator that can be substituted or “roll yer own” like I did. A 220 ohm dropping resistor may be required on the LED, but I had no problem running direct. The photoresistor I used is rated at 150V DC so it should be good even with older rigs.

    The Parts

    Fig. 1 Arduino Uno
    upload_2021-3-28_8-12-0.png


    Fig. 2 Sound Sensor
    upload_2021-3-28_8-14-8.png





    Fig 3. Red LED Fig,. 4 Photoresistor

    upload_2021-3-28_8-14-35.png upload_2021-3-28_8-14-59.png



    DIAGRAM OF CIRCUIT
    upload_2021-3-28_8-20-36.png


    The Code (Sketch)

    The sketch is the program that determines the input and output pins of the microprocessor and the operation to be performed. It is programmed through a USB cable between the Arduino board and the PC using the Arduino IDE (Integrated Development Environment). The sketch needs to be loaded only once and is stored in the microprocessors memory. Once the sketch is verified by the IDE and uploaded, connect the audio output from the PC to the processor and the CW key contacts on the rig. The Arduino can be directly powered from the PCs’ USB port or a 9V battery.

    FLDIGI CW Sketch

    int Led = 13 ;// define output pin. Use pin 12 if using a Nano

    int datapin = 3; // define input Sensor pin

    int val = 0;// define numeric variables val

    void setup ()

    {

    pinMode (Led, OUTPUT) ;// define LED as output from Arduino

    pinMode (datapin, INPUT) ;// output of audio sensor to Arduino

    }



    void loop ()

    {

    val = digitalRead(datapin);// sound sensor will be assigned pin 3 to //read val

    if (val == HIGH) // When the sound sensor module detects audio signal, LED //flashes and triggers photoresistor to drop in resistance, keying rig.

    {

    digitalWrite (Led, HIGH);//LED lights and illuminates photoresistor //dropping resistance and “closes the switch”

    }

    else

    {

    digitalWrite (Led, LOW);//LED turns off when no audio tone detected //resistance of photoresistor goes high and “opens the switch”



    }

    } // end of program





    Audio output from the PCs’ soundcard may need to be adjusted in the same manner as used for PSK or the other digital modes to get sufficient drive for the sensor module to activate. On my Dell laptop, I use the same low audio output setting that I use for PSK and it delivers sufficient drive. I set the Timing and QSK in the Modems tab on Fldigi to QSK on right channel audio.
     

    Attached Files:

  2. WA9TDD

    WA9TDD Ham Member QRZ Page

    This is the fritzing diagram for above:
     

    Attached Files:

  3. KD2UHF

    KD2UHF Premium Subscriber QRZ Page

    Cool, I know nothing about this stuff but it looks cool I will have to do some research.
     
    KO4BCN likes this.
  4. KO4BCN

    KO4BCN Ham Member QRZ Page

    The microcontrollers are really flexible for all sorts of uses. I like the arduino for small standalone projects. The Raspberry Pi is better when you want computer level type control and interaction.
     

Share This Page