Outils pour utilisateurs

Outils du site


TDF

A shield/project to decode the TDF time signal on long wave (162 kHz) before Allouis is eventually shut down. The signal is taken from an old/vintage LW transistor radio and fed into the analogue comparator of the -ino.

5/1/2016 update

The situation of the transmitter is unclear, but the France Inter audio signal is eventually gone. :-( RIP See here (scientificaly) or here (more sadly) for its last moments on youtube.

Status

Status du project
Date de début 06/2016
Status Work in progress
Initiateur Magnus

"Shield" description

The shield is ist connecting the IF to the analogue comparator. A voltage divider generates the reference voltage of one input and also sets the DC operating point for the other input. The IF is coupled capacitively to the latter. The schematics below.

The radio

The radio is a “Silver” LW/MW/FM transistor radio that I found at the marché au puces at Plainpalais.

Repair

Yes, it was not giving any sound when I tried it out the first time at home. Opening it up reveiled that the volume control slider was really broken:

It is a 10kΩ type:

Somebody tried to replace it with a single 100Ω resistor, which was not really successful. Using another potentiometer made it work again nicely!

Update (19/07/2016): The headphone out is now an input that works nicely with my smartphone!

The inside

It seems that this is pretty much what is explained on the UK Vintage Radio Repair and Restoration page. A superhet with 10.7 MHz FM and 455 kHZ AM IFs. What is tricky about this is that the IF stages are resonant at both IF frequencies and hence the signal looks very weird (in time domain). It seems that the only proper point to take a clean AM IF signal from is right in front of the demodulation diode.

First steps

Let's generate some signal! Inject it into the radio by putting the BNC-aligator cable just next to its ferrite antenna. The signal is tapped at right in front of the AM detector diode via a 100 nF capacitor as shown.

The output is hidden in the battery pocket:

This is how it looks like on the scope with some test sketch (look at the cyan line): NB: these were two slightly different settings.

Here's how it looks like when measured with the -ino (y is frequency in kHz and x is time in seconds): He different frequencies can clearly be separated! Now, we have to see if this will still be the case when adding AM into the game.

Reception in field

It turns out that laptops and (smart) phones interfere a lot with the radio reception. It certainly needs a longer USB cable to connect to the device, perhaps also electrical isolation.

Sketch

Find the sketch on GitHub.

Fast interrupts

I somewhat would like to use a fast interrupt routine for my sketch. I do not mind writing it in assembly, but would prefer to do so within a sketch in terms of a single .ino-file without tweaking any other parameters to ensure maximum portability and least config disasters. Here are a few tricks:

  • Use ISR_NAKED and take care of saving and restoring flags and registers
  • Use unused IO registers for temporary storage (the compiler may not reserve them for himself) – much faster than using the stack! Candidates are:
    • GPIOR0, GPIOR1, GPIOR2 (look them up!)
    • EEAR, EEDR (if you do not use the EEPROM)
    • OCR0A, OCR0B (if you do not use PWM)
#define ISRTMPIO0 EEDR   /* hijack the EEPROM (not used) */
#define ISRTMPIO1 EEAR   /* hijack the EEPROM (not used) */
ISR(TIMER1_CAPT_vect,ISR_NAKED) {
  asm volatile(
    "  out   %[tmpio0],r16         \n" /* +1 */
    "  in    r16,__SREG__          \n" /* +1 */
    "  out   %[tmpio1],r16         \n" /* +1 */  
// 
// ISR body goes here
//  
    "  in    r16,%[tmpio1]         \n" /* +1 */
    "  out   __SREG__,r16          \n" /* +1 */
    "  in    r16,%[tmpio0]         \n" /* +1 */
    "  reti                        \n" /* +4 */
    :
    :[tmpio0]   "I" (_SFR_IO_ADDR(ISRTMPIO0))
    ,[tmpio1]   "I" (_SFR_IO_ADDR(ISRTMPIO1))
    :
  );
}

Liens externes

projects/electronics/ptl-ino/tdf.txt · Dernière modification: 2017/01/05 22:15 par magnustron