Using a GPS module as variable frequency reference standard

  Переглядів 18,224

TheHWcave

TheHWcave

6 років тому

This video shows how to build a variable frequency reference standard using an inexpensive GPS module and a few extra components.
It also shows why some frequencies have a lot of jitter and how to avoid excessive jitter.
U-Center can be downloaded from the Ublox website
www.u-blox.com/en/product/u-c...

КОМЕНТАРІ: 46
@mikestandish2754
@mikestandish2754 Рік тому
Instead of using brute force methods to obtain jitter-free frequencies I just used a internet app to obtain the factors of the oscillator base frequency. Factors are "whole number" divisors i.e. they have zero decimal places. The app returned a list of 140 factors for 24,000,000, all of which give jitter-free PPS output from my U-BLOX M8N. A very easy solution. Because information available elsewhere suggests the M8N has a 28MHz oscillator I also factored 28,000,000 but the only jitter-free signals I could obtain from the result were those factors which were common to 24,000,000. This confirms that the M8N oscillator runs at 24MHz.
@binarybox.binarybox
@binarybox.binarybox 5 місяців тому
I built the Scullcom generator and am pleased with it. Thank you for this video explaining jitter. I found it very interesting.
@t1d100
@t1d100 4 роки тому
E-x-c-e-l-l-e-n-t information; thorough and presented in a easily understandable manner. Top-quality video production. Thank you so much for sharing your knowledge with us. It must require a tremendous amount of work. Thank you, thank you! A good while ago, I watched Scullcom's GPS Standard Project videos several times, but I have not built his device. One reason is because I like to work with PIC MCUs, but I don't know how to code (really,) and porting over the Arduino code is beyond me. Your solution to just use the U-Center for control makes things easier. I don't think Louis finished devising a solution for the jitter.
@EwaldBurger
@EwaldBurger 5 років тому
Very clear explanation of the causes of the jitter and what solutions can be used and their consequences. I’m happy I found your channel and subscribed.
@noakeswalker
@noakeswalker 5 років тому
I experimented with a NEO-something GPS module a couple of years ago as a freq. standard, and was rather disappointed to find exactly what you have shown here - that the 10MHz I wanted jittered badly, and also that 8MHz did not :o) Your explanation of the likely way these modules do this is very clear. Your graphics are great too ! In the end I stuck with my previous 10MHz standard, which is a PLL controlled xtal osc, locked to our BBC transmitter in the UK on 198kHz - I just wanted to test out the GPS method too, in case it was somehow better. Also, my NEO module had no memory for settings, so it would be complicated to use it as a standalone freq. standard which you just power up and use without a PC. Your module must be a later version with flash in it :o) Cheers, Dave
@NorfolkPilot
@NorfolkPilot 4 роки тому
Well done on sorting all that out and explaining it thoroughly in a very understandable way. Very interesting video.
@TheHWcave
@TheHWcave 4 роки тому
Hi John, thanks for the comment. This was my very first UKposts video and I was rather doubtful whether I should make these videos and if anyone would watch and find it useful. It's comments like yours that make it worth it.
@sebaschtl9710
@sebaschtl9710 2 роки тому
Very good work. Thanks a lot for this nice understandable presentation.
@pcuser80
@pcuser80 2 роки тому
Excellent video Well explained, learnt a lot about jitter.
@ernestb.2377
@ernestb.2377 11 місяців тому
Thanks, very useful
@davidvb3754
@davidvb3754 7 місяців тому
Very interesting and educative video ! Congratulations ! Would it be possible to get your list of so-called "safe" (or jitter free) frequencies ?
@TheHWcave
@TheHWcave 7 місяців тому
I put it up here: github.com/TheHWcave/GPS-FreqStd
@t1d100
@t1d100 4 роки тому
I built the circuit on a breadboard, but with a CD40106B, because that is what I have on hand. It is P-2-P compatible. I don't know about specs comparability. I used a triangle wave. At 1MHz the waveform was already significantly degraded. At 2Mhz, the top of my Generator's ability, I would have to question the waveform's reliability, because the knee on the trailing edge is almost non-existent and could even be approaching the lower level cutoff of the trigger. This is new to me, so if I am not using the correct terms, I apologize. I wonder if progressing to a perf board might improve things... Or, if there is a better brand/model of trigger? Anyway, this was a very interesting project. Thank you for your help.
@TheHWcave
@TheHWcave 4 роки тому
I am afraid the CD4016 is not suitable for this as you have found out already. It is a switch for digital or analog signals. The in/out path through this chip doesn't improve the signal quality in any way (probably making it slightly worse) and the controls (to turn the output off or on) max out at 10 Mhz which isn't nearly fast enough. Try to get the 74AC14 for best results but even a plain 74LS14 will improve the output
@t1d100
@t1d100 4 роки тому
Would it be a good approach to try to remove the jitter digitally? Use an MCU, as you would to remove a ring, or switch bounce... That is, have the MCU detect the starting edge of the signal and wait a ("blackout") period, before detecting the next edge... Or will the MCU just not be fast enough to do this? (I am a MCU novice.) I like the PIC18F4550, which takes 4 cycles to execute an operation.
@TheHWcave
@TheHWcave 4 роки тому
I don’t think it feasible. Originally I was about to suggest what is effectively a non-retriggerable monoflop (see en.wikipedia.org/wiki/Monostable) with programmable delay. For example, 10 Mhz is made of a sequence of some pulses that are 63ns (8 Mhz) and some that are 40ns (12 Mhz) wide. You could feed the PPS signal into a monoflop with a pulse width of 50 ns. Regardless if it was triggered by, say the rising edge of a 40ns pulse or 63ns pulse, it will always produce a 50ns pulse on the output. The trouble is that while this now produces pulses that all have the same length, the gaps between them still vary, so its just another form of jitter. I am afraid, I think the best way is to use PLL, basically making your own oscillator (jitter free, and could even be sine instead of square wave) and use a PLL circuit to lock its frequency to the PPS signal. You might be able to do this all in software in a micro controller which would be an interesting but rather challenging bit of work! I never bothered with that. As I said the frequency (as in pulses per second) is always 100% correct, just the pulses are not always the same length. For testing the accuracy of counters or frequency readouts in multimeters, jitter doesn’t matter.
@mahtin
@mahtin Рік тому
Is 24 MHz actually correct? Your measurements seem to show it is; however, the data sheet seems to be different. The u-blox8 data sheet says: “The module's internal 30.72MHz VCTCXO is disciplined by the module and provides the frequency reference to the platform. The module provides a PPS signal to synchronize the platform's physical layer.” The u-blox7 data sheet says: “The receiver is dependent on a local oscillator (normally a TCXO or Crystal oscillator) for both the operation of its radio parts and also for timing within its signal processing. No matter what the nominal frequency the local oscillator is (e.g. 26MHz), u-blox receivers subdivide the oscillator signal to provide a 1kHz reference clock signal which is used to drive many of the receiver's processes.”
@TheHWcave
@TheHWcave Рік тому
I agree that the module probably does more complex things internally at different clock speeds. I thought I made it clear in the video that the 24 MHz was just something I came up with to make determining useful frequency divisors easier. Apologies if this was misunderstood.
@mahtin
@mahtin Рік тому
@@TheHWcave - zero apologies needed and nothing was unclear. I liked the video and the logic you used (pun intended). I just so happen to be reading the reference manual (for different reason) and went off to see if I could find more on this crystal frequency issue. Keep up the good work!
@andreasdrim8895
@andreasdrim8895 3 роки тому
Even if this is an older thread: To get around that modulo divider problems, would it help to play with the PWM ratio? maybe there can be a quite safe value defined for the 10 MHz, e.g. 12%. Did not dive into the math required for this. This would be similar to the monoflop proposed before. And reasoning about if the rising or falling edge is more stable ;) Very good job, Thank You
@TheHWcave
@TheHWcave 3 роки тому
A very good question. I need to find a way to revive the UBLOX application on a suitable Windows machine to test all the variants of non-50% duty and locking or not locking it. I have not used the UBLOX software since making the video because I wrote my own little program for Linux that just sends the desired frequency to the chip. I'll have a look but it will be a some time before I can get to it.
@TheHWcave
@TheHWcave 3 роки тому
I did a quick test, and changing the duty cycle did not help. In fact it can make things worse in that even jitter-free frequencies now start jittering
@andreasdrim8895
@andreasdrim8895 3 роки тому
@@TheHWcave I looked how pll works. It assumes a symmetric distribution of the input signal around the lock, which is defined as 0. The input is low pass filtered to determine the vco correction. A duty cycle other than 50% would spoil this. So it would not work, unless some correction is applied
@TheHWcave
@TheHWcave 3 роки тому
Thanks for the info. So unfortunately jitter is going to stay, but as I said, that doesn't stop the usefulness of the GPS module as reference standard (as long as you measure just frequency)
@LMJohnson
@LMJohnson Рік тому
Why not try something like an AD9833 to generate the intermediate frequencies?
@t1d100
@t1d100 Рік тому
Hello, Heinz. It has been three years, since I last commented here, and I am considering, again, the unsafe number jitter that you discovered. As I understand it, the Atomic Clock Reference Pulse provided by the NMEA data stream is a one second pulse. (This pulse is easily sourced from the GPS module.) As it is the GPS MCU that creates the math error, would not we do better to create our own precision multiplication method, be it hardware, or MCU/software, and use the one second pulse as our reference to correct the newly created means of multiplication? Meaning, we avoid the UBlox math difficulty by not using the UBlox math calculation. If so, what hardware and MCU/software solutions might you suggest? I guess the goal would be being able to create any infinitely variable frequency with a great magnitude of precision. If we are multiplying by one (pulse,) maybe this is somewhat less difficult? For the fixed frequency of 10MHz, which I think is the frequency that most people desire for a reference standard, how about just adjusting a 10MHz voltage controlled OCXO every second? I am not a precision guy, so I do not know how well that a one second lag between updates would go over with the folks that chase such precision. Edit: A Hardware solution might simply equal Scullcom's divider circuit dividing the one second pulse by 10M?
@t1d100
@t1d100 Рік тому
My thinking regarding using Skullcom's divider was obviously backward... We need a multiplier. Start with a safe frequency and increase it to the frequency that we want. I know that there are such devices, but nothing much of them. Looks like 2x and 3x factors are common?
@TheHWcave
@TheHWcave Рік тому
To be honest, I'm not using this reference anymore, I "upgraded" to a GPSDO from Leo Bodnar, their mini model, which is pretty much what you are suggesting. It only has a TCXO but I keep it on permanently and so GPS keeps it nice and steady. This also contains a processor but just to control the PLL hardware and set dividers, not doing any maths. It provides a pretty good 3.3V signal selectable to (almost) anything from 400Hz to 810 MHz. I don't think a pure software solution is going to work with sufficient accuracy. Looking at the stuff inside the GPSDO, a proper solution is quite complicated in terms of special chips needed and registers to control. Using a couple of simple ripple dividers 7493 etc is a lot easier but then you only get frequencies that are divisible by a ^2. I decided on the GPSDO because I like that I can pretty much select any frequency, including much higher ones, however 99.9999% of the time, it is set to 10MHz and connected to my frequency counter's ext ref input. So, actually the UBlox could do the same for that. Actually, now that I mention it, that seems like a good idea for reusing that chip and maybe put it directly into the counter, a HP 5334B (it has just a simple 10MHz crystal oscillator as time source, the OCXO option is not fitted)
@t1d100
@t1d100 4 роки тому
My brother found an error I made on my schematic. I had carried that over onto the breadboard. So, my test results were invalid. I ordered the correct Schmitt Trigger. I will insert the new S-T, re-test and post my results. I am sorry for the confusion.
@t1d100
@t1d100 4 роки тому
I thought that my poor waveform issues were likely related to incorrect termination. So, I watched this short video. It was two minutes of exactly what I needed: ukposts.info/have/v-deo/b5Z0mpCmgG1emI0.html. I tried adjusting the function generator output resistance (50/600 Ohm button) and adding a variable resistor in series and parallel after the Schmitt Trigger. By playing with these new parameters, I was able to improve the waveform's shape. All of this is very interesting and I am learning a lot, thanks to you!
@leozendo3500
@leozendo3500 3 роки тому
But is the "safe frequency" actually accurate though? Is the 24Mhz main clock always accurate because its GPS? For example: if the 24MHz main clock is from some random crystal oscillator, and the GPS circuitry is "fixing" the expectedly low-frequency output clock with some logic. When you ask for a 12Mhz output, the 12Mhz will be based on the inaccurate 24Mhz crystal and will skip a 1/24M second step every time it decides the 24Mhz inaccurate 24Mhz crystal needs some fixing. So after all, there is no benefit in using a GPS over a TCXO.
@TheHWcave
@TheHWcave 3 роки тому
There isn't a 24 crystal per say, all I found is that mathematically, it behaves as if the safe frequencies are full multiples of 24 MHz or 12 or 6 or 48, your choice. What really happens is that the chip allows you to insert additional pulses within the frame of the GPS 1 PPS - pulse-per-second. The PPS is normally a highly accurate 1s signal synced and controlled with the GPS time. Using the software, you can ask the chip to put out n additional pulses within the 1 second frame. As I found, the chip uses pulses of the same width if it happens to be a safe frequency but mixing longer and shorter pulses if they are not. So what is guaranteed is that if you asked for say 12345 Hz, you will get 12345 pulses per second (within a 1s PPS frame) precisely. However, these pulses will not all be 1/12345 = 81.004... us long. Some will be shorter, some will be longer, but there will be exactly 12345 of them and they repeat exactly every 1s with GPS precision. Using this as a frequency standard works only if you count pulses per second. If you use shorter gate times, you should use only safe frequencies. As I said, the chip tries to do a good job spreading the desired number of pulses evenly across the fixed boundaries of the 1s PPS but to illustrate the principle, it might just as well bang out a short train of 12345 pulses of 1us length (0.5us high, 0.5us low), followed by 987.655 ms of total silence. Same result, "12345 Hz" .This is very precise but very different from a normal crystal oscillator. In my experience it works brilliantly for testing and adjusting frequency counters for all frequencies up to 10 Mhz and a bit beyond, but for signal purposes, I would generally stick with safe frequencies only.
@leozendo3500
@leozendo3500 3 роки тому
@@TheHWcave Thank you so much for your reply. It has been incredibly useful. So concluded, the chip can only guarantee an accurate 1Hz output. Anything above that is digitally generated in the chip and may be full of jitters and uncertainty. It is useful and good for testing and calibrating equipment with a >2sec gate counter, but not suitable as a clock source or a crystal oscillator alternative.
@galileo_rs
@galileo_rs 3 роки тому
Try a neo8, it has no issues with 24Mhz output and you can feed that into a cheap si5351 module to get practically any output frequency within si5351 limits (~280MHz). Phase noise is not the greatest ...
@TheHWcave
@TheHWcave 3 роки тому
Hi Dragan, you are right, using the GPS PPS to drive a clock gen. chip is a much better solution. In fact I got one already, using a MAX M8 to drive a SI5328. This came from Leo Bodnar (mini GPS ref. clock) and can produce 400Hz to 810 MHz.
@davidtzaig5947
@davidtzaig5947 3 роки тому
hello, the internal neo-7 crystal under the shielding is 26Mhz. i wanted to replace this 2520 tcxo crystal with an other that will divide to 10Mhz with no jitter ( i didn't find anyone who did that) . the fact that it's a 26Mhz and not a 24Mhz is confusing. any recommendations other then desoldering the crystal and injecting external frequency from an external generator and see what happens? did anyone tried this?
@TheHWcave
@TheHWcave 3 роки тому
Hi David, finding a crystal freq. of 26 MHz confusing. I would have expected 24 as it seems all frequencies that divide 24 with no remainder are jitter free, like 12, 8, 6, 4 ... but of course not 10. I am very curious about what happens if you try injecting an external frequency. Please update the comment or email me with the result.
@davidtzaig5947
@davidtzaig5947 3 роки тому
@@TheHWcave hi, i desoldered the on board 26Mhz tcxo and connected si5351 output#3 directly in its place. i started with 26Mhz. the neo-7 works as usual. then i changed the frq to 21.66666667Mhz and set the TP5 register for outputting 12Mhz and i got jitter free 10Mhz from the neo-7. however serial communication with the neo and i believe that the chipset (other then the pll divider) isnt working. it needs the 26Mhz as a clock. i will put back the tcxo and connect the neo7 as external clock to the si5351. that way i will have a steady gps clock for the si5351 and could get 10 mhz with no jitter and any other frq on any of the 3 outputs.
@TheHWcave
@TheHWcave 3 роки тому
Very interesting. Which variant of the si5351 are you using? The C version CLKIN could also be driven by 12 MHz which is jitter free from the neo7. I have not looked at the programming of the si5351 and that would make a big difference in the choice of output frequencies.
@davidtzaig5947
@davidtzaig5947 3 роки тому
@@TheHWcave i have the "A" version. the "C" version is a beast :) you can get almost any frq you want jitter free with the SI5351. it also has a clock builder application for desktop to help you find the correct dividers to get jitter free frq.
@TheHWcave
@TheHWcave 3 роки тому
Those Silicon Labs chips are great, no doubt but don't get me started on those desktop apps that work only with Windows and then sometimes only when connected to the proper development board.... and no documentation in data sheet or application notes on the algorithm for those without the board and running Linux. With lots of effort I managed to work out my own algorithm needed to set the register combinations for the Si5328 to do (almost) any frequency jitter-free and GPS locked from a few kHz to 800 MHz. The hardware uses a board from Leo Bodnar based on a u-blox M8 GPS module driving a Si5328. So, conceptually very similar to what your are doing. I am using it with my own software, One of these days I plan to make a video about it but too busy with my day job at the moment.
@haminurmanhamami
@haminurmanhamami 3 роки тому
micro usb in module gps for what?
@TheHWcave
@TheHWcave 3 роки тому
The micro USB provides power and is used to set frequency. As an additional benefit, you also get GPS signal quality (number of satellites.., position (lat/long) + height, + UTC time and date.
@bertoid
@bertoid 5 років тому
You can get almost any frequency you want (and multiple of them at the same time) if you feed the stable 8MHz into a synthesizer chip as is done in this SC project:- www.siliconchip.com.au/Issue/2018/October/GPS-synched%2C+lab-quality+frequency+reference+(Part+2) Or you could possibly hack off the crystal on one of these:- www.ebay.com.au/itm/264067067038 and feed the GPS output into the xtal input
@Elektronik-1
@Elektronik-1 4 роки тому
Falls dich das Thema noch interessiert: Ich hab dazu auch ein Video auf meinem Kanal ("Referenzfrequenzen erzeugen..."). Da hab ich auch saubere 10 Mhz erzeugt - ganz ohne Teiler...
@TheHWcave
@TheHWcave 4 роки тому
Sehr interessant. Ich sehe dass du dasselbe Jitter Problem mit dem 10 MHz GPS Signal hattest. Gute Idee einen speziellen 10 MHz Ausgang mit eigenem Filter einzusetzen. Für alle anderen Frequenzen hast du dann aber immer noch dasselbe Problem wie ich, und nur die Frequenzen die ohne „Nach-Komma Rest“ aus 24 MHz geteilt werden können sind wirklich sauber. Mein GPS Video was mein aller erster UKposts Versuch und ist entsprechend… Werde mir deine anderen Videos im Lauf der nächsten Zeit ansehen. (PS stelle fest: habe komplett verlernt Deutsch zu schreiben)
10 Mhz Reference and Why You Might Want or Need One
38:09
Zenwizard Studios
Переглядів 3,7 тис.
SDG #163 What's all this GPSDO stuff, anyhow? Why is there an FPGA?
18:29
SDG Electronics
Переглядів 12 тис.
🔥 Україна виходить у ФІНАЛ ЄВРОБАЧЕННЯ-2024! Реакція alyona alyona та Jerry Heil #eurovision2024
00:10
Євробачення Україна | Eurovision Ukraine official
Переглядів 324 тис.
Glow Stick Secret 😱 #shorts
00:37
Mr DegrEE
Переглядів 118 млн
Building a GPS Time Reference for NTP on pfSense
30:31
Mark Furneaux
Переглядів 29 тис.
SDG #159 Getting 10.000000000 MHz from the GPSDO using an FPGA and MCU
22:23
T4D #142 - Blown GPS Disciplined Oscillators and Chit Chat
27:41
mjlorton
Переглядів 10 тис.
LEO BODNAR GPSDO With the Adalm Pluto SDR
8:39
Tech Minds
Переглядів 21 тис.
[001] Sigrok and Logic Analyzers
1:12:06
OpenTechLab
Переглядів 211 тис.
Scullcom Hobby Electronics #37 - Design & Build a GPS locked Freq. Part 2
39:19
Scullcom Hobby Electronics
Переглядів 20 тис.
#984 GPS Reference Clock (part 1 of 2)
12:32
IMSAI Guy
Переглядів 11 тис.
поворотний механізм для антени
0:17
Lazeruk
Переглядів 14 тис.
Самая важная функция в телефоне?
0:27
Опросный
Переглядів 199 тис.
Apple ХОЧЕТ, чтобы iPhone ЛОМАЛИСЬ чаще?
0:47
ÉЖИ АКСЁНОВ
Переглядів 542 тис.
Fiber kablo
0:15
Elektrik-Elektronik
Переглядів 2,2 млн