P2 Smartpin Receives Long Wave Time Signal Dcf77
Hi,
this is about a receiver experiment using Smartpin "Goertzel Mode" as IQ-Mixer and Frequency Generator.
It was inspired by
https://forums.parallax.com/discussion/176026/efficiently-processing-continuous-signals#latest
It is able to receive the Long Wave Time signal at 77.5kHz send by DCF77 broadcast station, which is about 200km from my place. The station does lower sending amplitude for 0.1 sec or 0.2 sec once in a second to transmit bits.
My setup is using a very primitive antenna preamplifier which has some crude frequency selection and a gain factor of about 25. For the preamplified signal my "SDRplay" radio gives this rather low output:
When the signal is switched to low power by the sender, noise is more than that level.
I think, the signal after preamp has about 0,3mV.eff by comparison with a signal from a frequency generator.
Goertzel Mode uses the ADC Gain set to 100 and gives low numbers. The signal from the preamp is directly mixed with 77.5kHz, no intermediate frequency.
It took me a while to get useful results, because a slight frequency offset leads to slow variations of amplitude. So you cannot find the low amplitude pulse. Experiments with an deliberate offset for the mixing frequency to get fast variations did work a little bit better but not enough.
Introducing automatic phase correction brought the break through. To achieve this, the mixing frequency is switched between "too slow" and "too high" depending from the measured phase angle. The clock of my kiss board seems to have some little difference to 200MHz, so the average frequency is at nominal 77.492 kHz.
Experimental Code is in Taqoz Forth and using my extensions for values and local variables. The word tg displays some scope view. The word dS displays the trials to get the time. Plausibility of received time is checked by comparison with the previous reception. It might need several minutes to get the time. One of my computer monitors must be switched off, else there is noise only....
Funny: P2 and this old fashioned way to get time led very much faster to a result, than my struggle with FM RDS time....
Comments? Suggestions?
Have Fun, Christof
Comments
That is really ingenious, @"Christof Eb." , congratulations. Cheers, Bob
I know nothing about your application but have you compared using 10x or 30x instead of 100x gain? I remember someone else found that the ADC's ENOB noise floor rises a lot with gain set above 10x gain. I'm thinking you may find a lower gain to be more manageable while still providing the same amount of signal-to-noise ratio.
Good question!
Yes, I did such measurements as you describe and found this result then. And I also tested here with lower gain with less performance. I think, in this project gain 100 is helpful, because here the IQ mixer samples and averages each time for 1/100 sec which is 2 million data points. So the noise of all other frequencies from the antenna and from the ADC too is suppressed in this case.
:-) Thanks! And also thank you for your inspiration!
So I tried a 2 stage preamp with higher output and lower output impedance too as the ADC input resistor of P2 goes down to 4k5 with adc gain=100.
The code works better with very small sums, I don't understand that. So now it is running with adc-gain of 10 only.
Code uses now averages for reference and does correct phase only if in a certain range of phase.
And the plausibility check also uses the next to last reception.
There might be some improvement....
Decoding is now done in a polled background task. This task outputs some status to the tile vga driver. Reception is now good and stable with the 2-stage preamp, it does update time every minute, as long as you allow the POLLS their time.
It would be interesting to know, if a "Colpitts oscillator in common-collector circuit" as described here https://github.com/USKA-FOS/HB9TRU-Transistor-Audion could be used somehow for the first stage of the preamp to make it more selective? Not as an Audion though, we would still want to use the Smartpin as main frequency filter. At the moment the LC of the antenna is not adjusted, probably some tuning would be necessary?
Any comments on that?
Have fun, Christof