HFU HF Underground

Technical Topics => The RF Workbench => Topic started by: Zazzle on April 10, 2018, 1323 UTC

Title: µC based Class E RTTY with Crystal pulling
Post by: Zazzle on April 10, 2018, 1323 UTC
Hi,

I prefer to keep it simple, especially with the kind projects I do (which might be busted, stolen or vandalised). Therefore I was looking for a simple (regarding hardware and also software) way to run RTTY. Here's a funny thing I tried and which works like a charm. Let’s share that!

Most modern Microcontrollers (AVR, PIC, STM, etc.) come with multiple hardware functions. UART, I²C, USB – you name it. Also PWM! The awesome things about those hardware functions are, that they run CPU independent and don't consume computing time.
We play with the PWM unit here. Many controllers also provide clock multiplication. This means that a PWM frequency higher than the CPU (master) clock can be archieved. Some fancy controllers even support adjustable PWM and uneven frequencies, which allows to generate a lot of handy frequencies from a fixed source.

Here's where it gets interesting. Since the divider or multiplication is set to a fixed value, the PWM frequency follows the master clock frequency. If the master clock frequency changes, so will the PWM frequency. Hmm! Let's abuse this!

Crystals can be pulled by adding a variable capacitor into its path. Which means it's frequency can be adjusted up to a few kHz. That's done with a mechanical variable capacitor. But it can also be done with electrical variable capacitors (diodes, a VARIAC).

For RTTY we need a frequency shift of a few Hz, i.e. 170. That's doable with a small change of the capacity. The idea is to manipulate the master clock frequency in the pattern of a RTTY-Signal. Software on the controller generates the proper timing for RTTY (Baud speed) by turning an I/O-Pin on and off. The +5V from the I/O-Pin is feed to a VARIAC (Variable Capacitor Diode) which in return pulls the master crystal (frequency). A hardware PWM output generates the carrier frequency. Since the PWM frequency depends on the master frequency, it chances along with it. In respect to the ratio between master- and PWM frequency.

For example:


Notes:
First of all: which oscillator pin should be used for this trick depends on the Microcontroller used. Also, whether the frequency (when key'ed) should go up or down. Have some workbench-testing to get known to your controller. Also, don't overdo the pulling. When introducing too much bypass capacity to the internal oscillator it might stop and freeze. Imagine you climbed all up the Kilimandscharo on your Africa vacation - all wasted from carrying also a 100W solar module and Battery - only to learn that you overdid it and your baby stopped working as soon as you're back home. ;p

Also: it's important that all rails (+5V logic and others that are used for tuning) are high stable and decoupled properly.

Kind greetings,
Zazzle
Title: Re: µC based Class E RTTY with Crystal pulling
Post by: Josh on April 10, 2018, 1759 UTC
This is cool, when will you be setting up?

Also
Variac;
https://en.wikipedia.org/wiki/Autotransformer#Variable_autotransformers

Varicap;
https://en.wikipedia.org/wiki/Varicap