Sunday, February 14, 2016

LM567 tone decoder, build and adjust frequency.

..Well the idea is to start preparing the Arduino RTTY decoder to replace the Yaesu YR-901 internals (just in case I fail to fix it).

I will need to decode(1) the mark and space from the RTTY signal and also the CW tone so that signals can then be recovered and displayed.

The LM567 it's a nice available chip to do it and there are plenty of designs around, I just selected one, tweaked (some values I got from datasheet and are not the original from the schematic) and built:
My assembly does not include the 20K pull up (on PIN 8) resistor at the moment, it will be on final design after removing the LED. Not on the schematic but built is an audio 600:600 isolation transformer between the radio output and the capacitor connected to LM567 input (PIN 3). My IC is not an LM567 but a DBL567 equivalent (Daewoo seminconductor, the brand as the cars!....) .





Then connected to the FT-707 headphone output and tested against live signals:



..worked first time.



For checking the lock frequency the best method is connecting a frequency counter to PIN 5 (PLL VCO) and count the frequency there (without input signals). I used the scope for the task!
Here's the range on mine using the 10K multi-turn adjustable resistor.

Low:
....need to increase the cap to go to the CW 600Hz tone.

High:

And set for the moment:


That's it...have a nice week!


(1) - Technically it's note decoding since there is no encoding process, it will be more demodulating, since a carrier will be modulated by a signal, either mark, space or on off for CW.

Saturday, February 06, 2016

Arduino serial video/tv out "graphics card"...

* The problem:

The YR-901 that I bough some time ago is not working correctly, that is; it always in TX mode. I suspect some dust on the control circuit, the processing logic dead or some supply line issue. In any case if not able to fix, the idea is to place another RTTY decoder inside, keeping the same housing.


* The solution:

As for replacement decoder was thinking in an Arduino with video out instead of the standard LCD found in most schematics.

While it's strait forward to create video out on the Arduino I suspect that RTTY decoding and at the same time doing video processing would cause timing issues for the small processor so the solution would be to create an "offload" video card to the decoding Arduino board. The data between the two would be shared by serial port, any character arriving via serial port would be transformed in "video".

Easier to do than said :) and after some coding here it is:

...except for the first line which is hard coded every other char was sent by serial term software connected to the Arduino... The screen is one of those small rear camera for the cards, was initially to be used with the Raspberry PI for an SDR receiver but now it's for this application.

Another output with different font (4x6):


...it's not so "clean"/readable so I chose the initial 6x8 font.

The schematic for the video out...two resistors!:


The library (arduino-tvout) with some graphics possible from the examples:

... I might include it latter on the code...as a screen saver feature...
The connection schematic as on the lib example:

Library code from here:

And my own code for this application:

--------
#include
#include
// #include "schematic.h"
#include "TVOlogo.h"

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("- CT2GQV RTTY/CW - \n");
  // TV.delay(4000);
} // end setup

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

It was basically some stitch and glue between a serialevent example and the "demopal" tvout lib example.

That's it!... still need to "build" the RTTY decoder part.

Have a nice weekend!