Time signal LF Receiver Teensy DCF77 with minimal hardware effort

Status
Not open for further replies.
Another issue: I wanted to try some cross correlation to try to detect weaker signal. I added an IntervalTimer to call my very small interrupt routine every 10ms so I could sample the current signal strength. The thing went kind of crazy. Parts of the display were messed up and I think maybe it affected the sound card(?)

Is there some other interrupt driven timer I could use?
 
Is 'current signal strength' an analogRead?

See if the ADC library works with DMA to read it without interrupts?

Or depending on how fast loop() cycles just start an elapsedMillis var and sample it every 10 ms
 
First Rule of Programming: It is probably your own fault.

I was writing off the end of my sample array.
Once I sorted that out everything was good with the display.
IntervalTimer is exonerated.
 
My project was to convert this DCF77 receiver to WWVB at 60 kHz.
I have that working now based on the amplitude modulation.

The conversion really didn't touch the SDR components except to change the reception frequency.
I added sampling of the amplitude at 10ms intervals and then cross correlation of the
samples with prebuilt patterns of the three symbols: One, Zero, and Mark.
I have a floating cross correlation window patterned after http://paulbourke.net/miscellaneous/correlate/

Using the teensy 4, I went ahead and did this in floating point and it seems to be getting the
job done without skipping any 10 ms beats.

I would like to proceed to implement the BPSK phase demodulation which I think means more
SDR related changes. I think what I need is carrier recovery and then phase recovery.
But my SDR knowledge is shaky. Honestly, I could use a bit of tutoring or some helpful pointers.

-- addition --
I have gone back and found the previous suggestion to read this document: https://sdr.hu/static/msc-thesis.pdf
So I will start there. It seems to be about the right information level for me.
 
Last edited:
Antenna note: I had some old wire from a CRT type television flyback transformer. I used a cardboard box approximately 2" by 14" by 12" and wrapped the wire around the perimeter of the box, about 30 turns (?) and secured with masking tape. Then I measured the inductance with my AudioVNA (https://groups.io/g/AVNA1 which is what brought me to teensy-land a few months ago). I then consulted an on-line LC circuit calculator and added capacitors in parallel with my loop to bring it into resonance at 60 kHz. The antenna is directional. I my case WWVB is directly west from me. So I orient the loop with the opening N/S, as if I were pointing west using a donut. I am approximately 850 miles from the WWVB transmitter and located in a small city, a fairly high noise area. I can receive the signal during hours of darkness but not when the sun comes up. The 600 Hz tone is clearly distinguishable in headphones plugged into the audio board. (But I noticed that having the headphones attached could also effect my signal reception)
 
Last edited:
I may be wrong, but if you increase the number of turns and reduce the capacitor, you may transform your antenna more into a magnetic receiver that is less sensitive to electric noise.
Any trials with that?
 
No, once I got a working antenna I focused more on the software side.
I did do a bit of online research on shielded loop antennas. But I decided to try the direct approach with the parts immediately at hand.
 
I feel like I'm on the edge of stupidity, looking over the fence into the land of understanding... but I can't seem to get there from here!

I want to demodulate the phase encoded information on WWVB. I believe it qualifies as BPSK (Wikipedia confirms).
To decode that, I think I need I and Q inputs into some various chunks of code that do carrier recovery and phase recovery.
Am I talking sense so far?

Is it possible to generate I and Q with the teensy 4.0 and audio board combination? I'm assuming the folks doing the teensy SDR systems would do that instead of having external I/Q front ends, if it were possible.
 
I would like to pursue the idea of mixing 60 kHz LO with the incoming signal to produce phase on DC for BPSK detection. But I'm puzzled how to detect the DC. I hear the DAC audio library output device is kaput on Teensy 4? Is there another technique?
 
Its not kaput - NXP decided to build the chip without a DAC.
You can use MQS which is more than sufficiant.
 
I struggled for awhile trying to get a working pin map for using all of the components: teensy 4.0, stacked audio shield, ILI9341, and MQS. I had to set the project aside. But now I hope to take it up again.
 
Hello All,

I saw a post by ChrisHoward and took a look at this site and see the Teensy 4.1 is out. I suppose all of the code examples are compatible with that - I'll have to check the repositories on github.

Have there been other developments/improvements/etc in the last few months? Just wanted to ask.

Does anyone sell antennas for WWVB < $100 that can be mounted outside? (I realize this isn't be best place to ask - but I thought someone here could have some suggestions. I know they can be homemade rather easily and can be indoor vs. outdoor - but a decent outdoor antenna is preferable for me.)

Thanks and Best Regards,
John Westmoreland
 
Hello Again Everyone,

I was wondering if anyone besides Chris Howard has posted what they've done with the code and this project.

I've looked at what's on github - and there's been some posts in this thread by those that claim they have WWVB working.

The AM code for DCF77 is a little easier to deal with since the amplitude modulation is only 0.2ms for a 1 and 0.1ms for a 0 - and then at the minute mark there is no modulation.

For WWVB, we have 0.2ms, 0.5ms, and 0.8ms for 0, 1, and Marker, respectively.

I have some code posted on github - but right now it's just mostly debug stuff and what I've done thus far to follow what's been done on this project - so I'm not sure it's of any real use at the moment.
I've put a lot of printf's in to see what's going on and to try and understand - so, maybe that's useful to someone that's coming up to speed on this.

I haven't found any other approaches yet for WWVB even though some said they would post what they did to make WWVB work.

I'd like to do the conversion so to speak of what's been done in the original code in this thread before going down another path - and by reading this thread I thought some had done that already.

FWIW - I forked the code and what I've done thus far is here in case anyone wants to take a look:

https://github.com/jwestmoreland/Teensy-DCF77

Again, it's in debug mode and not sure it's useful unless someone wants to use it as a learning tool or a starting point for the same approach done in this thread originally to WWVB. There's a lot of printf stuff and #defines for debug that
could be handy I guess.

Thanks In Advance for those that have WWVB working using the DCF77 approach and making it available.

73's,
John
AJ6BC
 
WWVB Code - Please Post

Hello Peter (el supremo),

You mentioned you'd post your code - can you do that please?

Thanks In Advance.

73's,
John W.
AJ6BC



UOTE=el_supremo;185948]Hi Frank,
Thanks for the explanation. I saw those adjustments for the rate but misread them as adjusting for the difference between 44.1kHz and AUDIO_SAMPLE_RATE_EXACT rather than between AUDIO_SAMPLE_RATE_EXACT and 192kHz. Now it makes sense.
I'm using the amplitude modulated signal to decode WWVB.
I'll post the code soon. I'm currently trying to track down the source of a very annoying buzz which starts up randomly, lasts for a minute and then stops. It definitely appears to be external to the Teensy and audio recorder I am using (Tascam DR-40) because if I move the antenna it changes the volume of the signal. My HF rig (IC735) only goes down to 100kHz but it doesn't hear the noise.

Pete[/QUOTE]
 
@jwestmoreland: I'm tidying up the code and should have it posted tomorrow. I've also cleaned out my PM inbox :eek:
I have two versions of the code. The input for one is the same as the original DD4WH which converts the RF signal input to the microphone.
The input to the second is the line-input audio from a radio receiver. I have an SDRPlay RSPdx which I use to listen to WWVB directly.

Pete
 
Here's two versions of my WWVB mod of the @DD4WH DCF77 code.

This version uses the microphone input which has an antenna connected to it, tuned for 60kHz reception.
View attachment _60WWVB_6_dec_8.zip
I used one of these with the receiver board removed (actually I used the previous version of this antenna) and connected directly to the microphone input on the Teensy audio board.

This version decodes audio on the line input being fed from a receiver. I have been using the audio from an SDRPlay RSPdx tuned to 60kHz. The audio output from the PC is connected to the audio board line input via a 1:1 audio transformer.
View attachment _60WWVB_6_dec_9_RSPdx_c.zip

Pete
 
Hello Pete,

Thanks for posting - yes, your PM inbox was full. Ha! Nice to be popular!

The exact reason I've been asking is exactly what you did for the RSPdx zip file you have - I was hoping someone had done that too.

I will try both of these - and let you know - by posting in this thread.

Thanks Again!
John
AJ6BC
 
Perhaps the fixes for 4.1 could be made with
Code:
#ifdef __MK66FX1M0__
// T3.6 code
#else
// T4.1 code
#endif

Pete
 
Pete,

Sure - I'll add that.

Thanks for the suggestion - I was wondering the same thing - and didn't want to make the code incompatible for anything before 4.x - and make it easy for subsequent hardware too.

I notice you're using the mixer - that might be OK to leave in right now - but I will stub it with a #define for now - and fix that soon once I look up those pin definition differences.

73's,
John
AJ6BC
 
Pete,

I've received the antenna from Stormwise - when used in an inductive coupling mode - I can get some decodes with what Chris Howard has posted. I still have yet to get two completely correct decodes in a row -
but pretty sure that's because I have some noise issues I need to address.

I haven't had any successful decodes yet (complete that is - I have had some partial) with your code - but that's because probably I've been running Chris' code longer and I've
festooned it with debug printf's so I can follow what's going on. I doubt I will be able to do much better until I address some of the noise issues and get the project in a shielded
enclosure - like what Chris has done for his project.

I have added a way to check the mic control register - I posted that in the audio projects forum here - I may further expose that so the control word can be passed for the mic bias block -
I've experimented with having that on and off - it appears to work OK either way - I prefer to have it off. I popped off the 2.2K resistor and the mic gain would just bottom out - that was
before I had coded the mic bias control block to be off - I should try that again with the 2.2K resistor removed to see if that will still result in the mic gain bottoming out. I thought the AGC
for that was completely internal - maybe I'm wrong.

73's,
John
AJ6BC
 
Hi DD4WH

A very interesting development. I'd like to repeat your design. But I cannot find the exact wiring diagram. Where can I find the schematic?

BR Konstantin
 
Status
Not open for further replies.
Back
Top