Search This Blog

Radio Guy Tees

Radio Guy Tees
Radio Guy T-Shirts
Showing posts with label gps 1pps. Show all posts
Showing posts with label gps 1pps. Show all posts

Sunday, 10 May 2020

An experimental STM32 Frequency Counter

Well,

In an attempt to learn more about microcontroller programming I have done a little bit of training during this Covid-19 lockdown:



My first real attempt to use these skills is below. I've used a GPS 1pps signal to accurately count an external frequency. This is a GPS disciplined freuqnecy counter:


Good, isn't it?

Here is a picture of me (with Covid-19 dog clipper hair cut) and my beloved Bonnie dog:


Thursday, 30 April 2020

GPS Disciplined, again?

Well,

I've been trying to learn more about STM32 microcontrollers, their programming and to understand more about the on-board peripherals.

This is the result of my musings:


Fun, egh?

Friday, 20 May 2016

Frequency Reference Completion

Well,

The project from last time is even in a box now:



Good egh?

You will see that we adhere to strict rules whereby the dogs are not allowed on the furnature:



Local conditions.

Sunday, 15 May 2016

Frequency Reference

Well,

Been thinking for a while that my shack frequency reference is a bit old hat and could be a bit more useful. What I would really like is a GPS disciplined VFO so I can set the frequency for my needs rather than only having 10MHz, 5MHz and 1MHz outputs as I do from the old project here:

http://g0mgx.blogspot.co.uk/2013/11/frequency-reference-how-accurate.html

So I have started to look at the possibility of using a newer device like the Si351A from Silicon Labs.

The first part of the project will be a new GPS receiver to give us the 1pps signal we need for the frequency control. I found a really neat kit at QRP Labs

I've built the kit today and it looks like this:


Mine has been built to utilise an external active GPS antenna.


The output from the 1pps looks like this on the 'scope:


So all seems well with the first phase.

More to follow!

Here's our Pepper Cat who has been almost completely in the way most of today:


Local conditions. Good egh?

Sunday, 17 November 2013

Man with two watches...

....never know correct time.

Because of this syndrome the correct thing for me to do now that I have established the GPS disciplined OCXO from here:

http://g0mgx.blogspot.co.uk/2013/11/gps-disciplined-really.html

Is to simply use this as the master frequency reference and calibrate everything else against it.

If I went ahead with my plan to use the GPS 1pps signal for a frequency counter, imagine the dilemma if they didn't agree! The GPS Disciplined OCXO uses some complex averaging to ensure that an out of sync 1pps pulse due to an aeroplane passing overhead or the washing machine (the second item isn't a likely cause; I am just checking you are paying attention) are not acted upon. Using the 1pps signal to gate a frequency counter wouldn't be able to do this.

So, to cut a long story short I have taken the frequency counter I first started here:

http://g0mgx.blogspot.co.uk/2011/07/pic-n-choose-how-to-count.html

And have calibrated it against the GPS OCXO:



So, all in all I am very pleased with the results of this project. I have learned a great deal and have a very accurate frequency reference and a counter to go with it. From conception to finish the counter project has only taken 2 years and 4 months!

Another great homebrewed addition to my RF workbench.

Good, egh?

Saturday, 16 November 2013

GPS Disciplined - Really?

Well,

After a great deal of fiddling, learning, scratching my head then fiddling some more, I have finished my GPS disciplined Frequency Standard:


This is a project by VE2ZAZ:

http://ve2zaz.net/GPS_Std/GPS_Std.htm

So, what's this all about then?

Basically we have an oven controlled crystal oscillator (OCXO) which can be fine tuned by applying a voltage to an adjustment pin. Typically this adjustment is only +/- a few Hz around the target frequency anyhow. The oscillator itself is the large metal box you can see in the image above - it has a sticker on it saying "Used". This box is actually the oven - and yes - it heats up to maintain the crystal inside at a steady temperature.

So, we have a PIC processor on the green PCB you can see and this basically monitors the output of the OCXO and compares that to a 1pps signal from the GPS receiver. Having a known 1pps signal means we can determine if the voltage on the OCXO needs to be increased, decreased or left as-is.

That's the bottom line of the whole thing.

Now, the firmware (read software) does some stuff with averages and a state machine to determine if the output is within certain accuracy parameters, but basically it's keeping the OCXO on track.

How accurate can this be?

Well, I have mine configured to make an adjustment every 20 Hex or 32 samples. Each sample is fixed at 16 seconds (expecting 16 million counts from the OCXO).

So my averaging period is 16 * 32 = 512 seconds (or about 8.5 minutes).

Therefore the best possible accuracy I can expect is 1 in (10MHz * 512s) = 2.0E-10 (ish)

So, it's more than adequate enough for my purposes. I need to leave this running for a while and monitor the output - there's a serial connection to a "dumb terminal" spitting out data as the unit trundles away to itself.

The output waveform looks like this, this is the 10MHz signal:


There's also another output switchable between 5 MHz and 1 MHz.

Initially I had problems with the 1pps signal not seeming to be at 1pps! The symptom was that the count recorded by the unit after each 16 second sampling period would suddenly be wildly out and every 1 in 4 would seem to be accurate. Will some great assistance via email, eventually this was found to be due to noise on the PSU lines to the main PCB. I've ended up adding some extra smoothing to the +8V line that feeds the main board and the OCXO driving op-amps. This plus some extra capacitance where the lines physically connect to the board seems to have solved the problem. I also ended up adding a simple RC low pass filter to the 1pps line where that enters the microprocessor, but I don't think that had any effect at all.



I've used the output from this to calibrate the counter I made recently:



This is Geddy Cat, he is by far the best cat in the world:


Good, egh?