Saturday, April 16, 2016

Stand-alone Arduino RTTY Decoder

Having build the LM567 tone decoder and the Arduino video out part. It was just a question of "gluing" with an RTTY decoder (download here or from the previous link) for a complete standalone decoder.

On top of the FT-707 decoding "meteo" on 30m:

 ..some "garbage" was due to initial VFO drift.

It works this way:

Audio from the radio headphones goes in to an audio isolation transformer, from there goes to an LM567 tone decoder:

..the output of the LM567 goes to a level shifer:
The "RX Input" on the previous image goes to the Arduino running ji3bnb RTTY decoder code (thank's OM). I modified the code to output also to the serial line (the original code is for an LCD which I didn't connected)... with this two lines:


The serial TX from the decoder looked like this on first test using a terminal for monitoring.

 ..no provision for CR/LF on the added code since the next module will do that automatically.

 The previous Arduino (RTTY decoder) serial TX port connects to the serial RX of another Arduino that does the TV/video out to the display from the charecters received:

  In the midle you can see references to the station frequency (10.100.0) and the call sign mixed in the garbage DDK9.
using this code:

//----------------------------------------------------------------------
#include
#include
// Video/tvout from serial port reading / char by char
// module for the rtty decoder arduino
// read from serial and output on video
// Ricardo / CT2GQV / 2016
//p.s. fontall had to be include as a lib on the IDE to get the font to work...(normaly not needed...)
TVout TV;
// serial receive
String inputString = "";         // a string to hold incoming data
boolean stringComplete = false;  // whether the string is complete
// end serial receive
// serial events
void serialEvent() {
  while (Serial.available()) {
    // get the new byte:
    char inChar = (char)Serial.read();
    // add it to the inputString:
    inputString += inChar;
    TV.print(inChar);
    if (inChar == '\n') { TV.println("\n");  stringComplete = true;  };
    if (inChar == '\r') { TV.println("\n");  stringComplete = true;  };
  }

void setup() {
  Serial.begin(9600);
  inputString.reserve(20);
  TV.begin(PAL,120,96);
  TV.select_font(font6x8); // 19 chars by line
//  TV.select_font(font4x6); // more space but less font resolution
  TV.clear_screen();
  TV.println(">"); // the starting prompt just to let know that it started.
} // end setup

void loop() {
 if (stringComplete) {
    inputString = "";
    stringComplete = false;
 }
} // end loop
//----------------------------------------------


And basicaly that's it.. still need to include a "tuning" indicator using another LM567 for the "space".... or include CW decoding, adding the code to the RTTY decoder.

Here, assembled inside the box:


...nd just the decoder board, still space for audio monitoring amplifier since the headphones plug disconnects audio on the radio:

Audio transformer on lower left, level converter near the green LED, decoder Arduino on the lower right and the video output Arduino on the top right. Right of the audio transformer there's a second LM567 for the "space" decode, not implemented yet.


So... have a nice weekend!























2 comments:

Ian said...

Hi and thanks for posting this project.

Just wondering what the purpose of inputString is? It is declared, initialised, appended, and cleared but never used?

Cheers, Ian

Ricardo - CT2GQV said...

Hello Ian,

Good catch! I guess you were the only one looking at the code.
In fact there's no need for the "inputString" since I'm "dumping" char by char...well, except for wasting cpu cycles and keeping memory busy :)
That part of the code was just a quick adaptation of Arduino serial event and the "string" was left behind!

Best Regards,

Ricardo / CT2GQV