It was very good that you published your first attempt at the project, and shared what worked and did not work. Learning better ways as we go is the reality. This is such a great project idea. Your explanations are also right on the mark. I miss my hardware days, but you bring them back for me.
The harmonics are because the GPS uses a 48Mhz clock, and for a clean signal it has to be a fraction of 48mhz. u-blox can output up to 24Mhz. Anything other than a fractal of 48Mhz will have very bad Jitter and 'noise' because the u-blox aren't dedicated frequency dividers. Better to use the GPS to output say 8Mhz, then a dedicated DDS Systhesizer to control the frequencies to be clean and with less jitter.
If you divide down the Ublox clock to 2 Mhz, you can then filter only the 5th harmonic of it (needs a narrow bandpass filter instead of a low pass mentioned in earlier episodes) and then amplifiy that to get back the 10 Mhz sine. That should be jitter free, at least by no fractional dividing. Then use a schmidt trigger IC to turn that into a square wave again.
I also have just received the last part needed to assemble the project and finished it today...works a treat. Thanks for all the work you and Andre have put in to this project...much appreciated.
Excellent update Lewis. Thanks. I did make a small change to the code, I added a battery check function to the main loop. So if the battery falls below a pre defined level (6.5v) it is immediately displayed. (I'm using two 3.7v Li-ion batteries). Best Regards.
Hello Mr Scullcom I want to say thank you for your series of videos I have only just found your channel and I have found your work is a refreshing change. thanks once again for your brilliant project's ,that are so easy to understand!!
+Rambozo Clown As I was working at my desk on this video I thought I was use the mat to protect my desk LOL. In my workshop I have the anti-static matting on the workbench which you would normally see in my videos.
I've really enjoyed your demonstration and how clear you are. For me I'm interested in a solid being interested in Horology and how I might use this. I look forward to other updates.👍
+PelDaddy Thanks. I had to laugh about your reference to suspenders LOL May be I should start a new trend wearing different colour trouser braces in my videos :)
The inclusion of the satellite count wasn't expected but greatly appreciated. I'm hoping I can gather all the parts to build one but first have to work on the technique needed to produce the circuit board. The rest of the build will be easy, but the board production is my big hang up. BTW the website looks very good.
Just discovered your channel and I love it! I was looking for a DIY function generator and found yours, which is almost perfect. Now I just have to work out how to convert it to use a 16 x 4 LCD to display frequency and waveform amplitude. Shouldn't be too hard...
+Moonbrony Thanks for your comments. If you want to use a 16 x 4 LCD then change the following line in the code from; lcd.begin(16, 2); to lcd.begin(16,4); This will then allow you to use the four lines of the LCD. You can then simply change the cursor position commands to your requirements.
Its a nice project with a bit of filtering it will work very well up 2 15MHz as a frequency standard. Its a very good building block with the addition of a veriable attenuator and some way of modulating the signal to use it as a portable rf sig gen for receiver tests. Maybe a project for the future using this as a starting point? Great videos and super channel.
The software does not work fully with the Ublox M8N. The satellite number shows just satellite and locks up the unit needing a restart. It turns out the relevant data stream for the Neo 7N and Neo 8N are different so I changed several lines of the Arduino code to make it work properly. Apart for that it is a great project. I have ordered a 10 Mhz lowpass filter to clean up the waveform.
Hello, I was looking for this type of project for a 10MHz reference. Being a radio amateur I need to check some devices. A big thank you to you. I embark on its construction. Cordially. Jean-Luc F1GPA
Thanks for all your work on these videos.I've really enjoyed your projects and have a couple on my to-build list. This frequency standard is my next in line and I just received my order for the last set of parts I need. I have two of the Neo 7M receivers (one from eBay and one from Amazon) and have been playing with them in u-center and with some other Arduino programs I have for GPS modules.When I started looking at the NEMA sentences from u-center, they don't seem to match up with the GGA sentence structure you're using in this video and the code. Specifically the Neo seems to be reporting two more digits of precision for time, latitude and longitude. This moves the structure over by 6 characters. There is also an issue with null fields when the fix is lost.I think this is because the example GGA sentence you have is an older example that doesn't take into account the variable decimal parts of these three fields, and, for some reason, the Neo is reporting out a precision greater than what is really useable.Also NEMA sentences are really comma-delimited where field number is guaranteed but position isn't.These are my u-center text console messages from a Neo 7M doing a cold start where it’s been powered down overnight. 1) This is the first GGA sentence reported. At this point there are no satellites so even the time information is unavailable. $GPGGA,,,,,,0,00,99.99,,,,,,*482) This is only a short time (seconds) later and it has at least contacted a satellite since the time data is now available, but the satellite count is still zero. $GPGGA,155620.00,,,,,0,00,99.99,,,,,,*633) This is the last GGA sentence that is not reporting a fix (about a minute after the previous one). The satellite count is now four but the fix value is still zero. It has put in a horizontal dilution of 2.79.$GPGGA,155725.00,,,,,0,04,2.79,,,,,,*5F4) This is the first GGA sentence reporting a fix. It’s taken about a minute, which wouldn’t be unusual for an indoor, cold start with a patch antenna. It has four satellites and is reporting a one for the fix quality.$GPGGA,155726.00,3836.75530,N,12117.96679,W,1,04,2.79,8.2,M,-27.2,M,,*6D5) I then covered the Neo to get it to drop its fix. I’m pretty impressed with it. Even indoors, covering it with my hand wouldn’t cause it to drop its fix. I had to wrap it with aluminum foil. At this point it’s still reporting four satellites but has a zero for the fix quality. I didn’t watch it long enough to see if the satellite count dropped. I’ll probably try this during some later testing. I don’t know why it’s adding the DGPS station ID number of 0000 towards the end at this point. This also illustrates the variable length nature of the field for the dilution. $GPGGA,161349.00,,,,,0,04,22.30,,,,,,0000*69Examples 4) and 5) are the ones most likely to be seen once the receiver is up and running. The interesting point is that this will probably work with your code, but not because it’s determining the number of satellites, but because in 4) it will most likely be getting a non-zero value from the end of the longitude and in 5) it will probably be getting a zero from the DGPS station.Rather than using the satellite count, I prefer to use the fix quality right before the satellite count. In the GGA sentence a non-zero value seems to indicate a fix. In the RMC sentence, the fix quality field is “A” for active or “V” for void.The web site www.plaisance-pratique.com/IMG/pdf/NMEA0183-2.pdf has a more detailed explanation of the higher precision variable formats. Section 5.2.2 and 5.2.2.1 have some details on comma-delimited and variable length fields. Section 6.2 has some specifics on the time, latitude and longitude fields.
+Walt Mckinnon Thanks for your detailed comment, very interesting. I did also consider using the FIX indication but decided to monitor the number of satellites received as we are interested in locking to the satellite frequency as apposed to a navigational fix. You usually need 4 or more satellites detected to get a good navigational fix. You will note from the NMEA sentence received that you get a accurate time lock before a navigational fix. Yes you are correct that the current NMEA sentence is reporting two more digits of precision for time, latitude and longitude and so increases the NMEA sentence by 6 digits (this is a total of 7 characters as there is now a decimal point used in the time data). The NMEA sentence I used in the video would appear to be an older version. However, as my software code strips off the first 7 characters of the NMEA sentence with the "(GPSreceiver.find(gpsin))" command which identifies the string we need to capture as it is looking for the characters "$GPGGA," when it finds these characters it then starts reading the remainder of the string data in to the buffer. So we start our count of characters from the first digit of the 'time' data (and not from the $ character) which is then character position 0. At 39 characters from this is the first digit of the number of satellite data (which is what we need to capture). The Arduino software code is correct for capturing the data we need it is just I illustrated it with an older version of the NMEA code, sorry about that, my mistake. I will mention this in my next video. If you run the Serial Monitor on your computer when you press the # key to see the number of satellites you will see that the captured NMEA sentence is displayed and starts with the time data, having already stripped of the "$GPGGA," characters (7 characters as it includes the end comma). Thanks again for bring this to my attention.
+Walt Mckinnon I have updated the user manual for this project with the corrected information. Also it is now clearly explained on my website, direct link to the page below: www.scullcom.uk/design-build-a-gps-locked-frequency-standard-part-4/
+Scullcom Hobby Electronics Thanks for the update. The web site is looking good.I see where you're getting the correct satellite count when you have a fix but I think there is still a problem when there is no fix.I copied the part of your program where you are reading the NEMA data into a small program and added a couple of more debug statements. One prints the "sats" variable and two others print the length of "sats" and "GPGGAdata". I then ran it while I had a fix and then removed the antenna so I lost the fix.I added the output from the serial monitor below and hopefully it stays formatted better than my last post. But basically, the length of "GPGGAdata" is 67 when you have a fix but only 34 when the fix is lost. This is because most fields are now nulls and you have only the commas and little data. The "sats" is good when you have a fix but is null when you don't. I think this is because the substring is pointing past the end of the field. The null "sats" then becomes a zero when you make it numeric. Right answer, but for the wrong reason.181331.00,3836.75378,N,12117.97067,W,1,04,1.72,30.5,M,-27.2,M,,*50GPGGAdata length = 67sats length = 2sats = 04satNum = 4Frequency Locked181332.00,3836.75342,N,12117.97088,W,1,03,1.70,30.3,M,-27.2,M,,*58GPGGAdata length = 67sats length = 2sats = 03satNum = 3Frequency Locked181333.00,,,,,0,00,99.99,,,,,,*6DGPGGAdata length = 34sats length = 0sats =satNum = 0181334.00,,,,,0,00,99.99,,,,,,*6AGPGGAdata length = 34sats length = 0sats =satNum = 0
Hi Louis Just come accross this as I was searching for a GPS Disciplined 10 MHz oscilator for an ICOM IC-9700 Ordered the parts but wondered if you had done any more work on improving the spectrual purity. I have ordered a 10MHz crystal and might try taking the output via an attenuator to the crystal and then a 50 Ohm match at the output. Is version 6 the final software version I wonder Is there a part 5 looming over the horizon? I see this was published 4 years ago now. Keep safe Regards and 73 Nick G1BVI PS tried to locate a direct email but failed
What about adding a SD card for logging your position time etc as well as a temperature controlled or oxx CEO time reference Crystal to create a basically a GPS discipline Crystal oscillator all in the same design
My guess is that 12MHz has less distortion as GPS fundametal 48MHz nicely divides to it. Probably 6MHz looks cleaner than 5MHz as well. I dont know how its done internaly with what frequency dividers and multipliers or some counters. My guess is visible phase distortion comes from that every niw and then pulses coming out of the gps module are different length as the counters compensate tha 48Mhz doesnt divide nicely to 10MHz.
Very nice project! Looks very professional. I would like to build this project and am in the process of acquiring the components. As far as the GPS module, I am planning on getting the Ublox 8N module. Will the software you have provided for this project work on GPS modules other than the one you used in your project without modification?
Although I recently discovered this excellent design you have posted, thank you very much !!! I've built the board but I'm stuck !!! What I wanted to ask is why I can not go to your nano arduino program as many attempts as I've done !! Note that I have the drivers needed for the nano arduino! I use the arduino version 1.8.6 I would be very happy if you gave me a solution to the problem! Yours sincerely Vangelis
Good evening I come back again after I changed everything that we said, and I just put the material on you, but unfortunately it does not catch with any satellites, so I do not have a frequency lock. The screen light normally says it is Ver. 6 the frequencies change it, with C, I see the voltage with D, I see the frequency I put, with # I see satellites 0 and hangs there and does not go back and again I turn the trend and put it again to work. The only difference we have is that to pass the program, I have to convert it to .hex from Arduino and I go through the XLoader because my Arduino does not pass the program directly and I think something is wrong with the conversion! Do you have any idea for top what's going on ??? Yours sincerely Vangelis sv1iyb
Better and better :-D Just when i thought it could not be improved lol. The output does look a bit odd, would some kind of biased low threshold schmitt trigger circuit have a usefull effect, or should i shut up ha ha :-D
+zx8401ztv Thanks for the comments. This video was a little dark as I filmed it at my computer desk in the house and not in my workshop. I have a small set up of test equipment on my computer desk which I use when testing projects and working on software. In this case I had just finished the software update so I decided to film it there. If I do it again at this desk I think I will have to improve the lighting. I have tried a number of ways to get rid of this phase jitter on the square wave at the higher frequencies but found it difficult to remove at all outputs frequencies. As you mentioned, I have tried playing with the threshold bias on the schmitt trigger but was not successful. I did try adding a low pass filters which did work well but then this would have to change as the frequency selection is changed. Basically, what we need a a programmable filter which tracks the frequency we have entered so that it filters out the unwanted harmonics. I think the next step would be some form of Phase Locked Loop circuit but I will leave this for another project as it involves a second PCB with a Voltage Controlled Oscillator and a Programmable Frequency Divider in the feedback loop. The project as it stands at the moment does give out an accurate frequency reference signal so is still quite useful for the hobbyist. Thanks again for your constructive comments they are always welcome.
+Scullcom Hobby Electronics I admit that i know nothing about the methods used to generate the waveform, i would ask, what does the waveform look like with only a resistive load and very little stray reactance present, does it look the same, does it change with odd frequencys, and how would a gps satnav use that signal. is the problem related to taking the gps module away from its typical usage. If nothing else, its interesting :-D
To begin with, thx ever so much for sharing this project and all the details needed to build it. So, it appears that there is only a subset of usable UBlox output frequencies, the rest have excessive jitter. A step up and another project is to find the highest frequency that has a very low jitter and use that as a reference for a local frequency synthesizer. Unfortunately it would make the project a lot more complex but the output would be jitterless at any frequency that the synthesizer is capable of generating. Nice talk, seems like a great fork for this project. Thx for the information and the idea. I look forward to each time you share one of your exquisite projects. Again, thx for taking the time to make the videos and sharing the results.
You obviously haven't read the remarks concerning the jitter problem in previous video. The mcu can change its output only on sync with its own clock. So you will always have a problem if you ask a frequency that is not a divisor of its 48MHz reference. You should not exceed 12 MHz... The artifacts at that frequency may be caused by sync with satellites. Because when locked, and even if you ask a divisor of 48, it will try to output the real value and not a divisor of the reference 48MHz. So do these artifacts change if you remove the antenna?
To be clear, at 12 MHz output, the mcu output is high 2 cycles, the low 2 cycles... with a simple clean pattern. But if you ask 11.9 MHz, it will do the same, except that from time to time the output will be fixed for 3 cycles instead of 2. So on average you get the 11.9 MHz you asked, but a quite dirty one. Now if you add satellites, it will try to compensate for the error of the 48 MHz. Imagine that the real value is actually 48.03 MHz. Without lock, if you ask 12 MHz, the system has no way to know this drift and will divide by 4 (as explained before). But when you have lock, it will know that there's a drift in the 48 MHz and will compensate for it. So to output 12 MHz it will have to divide by 4.0025 and will have to add a 3 cycle instead of 2 from time to time... and generate the glitches on the frequency analyser
+cyril muller conclusion: if you want a clean output at all frequencies and with or without lock, you should use a PLL www.analog.com/media/en/training-seminars/tutorials/MT-086.pdf
+cyril muller Thanks for your detailed comments which other viewers may find of interest. I have read your previous remarks. The jitter only seems to effect the higher frequencies over about 3 MHz. Even though the waveform shows a poor quality waveform shape at the higher frequencies I have found that in all cases the fundamental frequency which is set, still remains accurate and can be used as a reference. This is clear to see on both a spectrum analyser and frequency counter. I am very familiar with the benefits of using a PLL which would improve the output waveform of this project and this could be added at a later stage if required. This project was aimed at the hobbyist and was designed to keep the cost down as a starting point but still give an accurate frequency reference standard which would be useful. In order to use a PLL with this project you would also need to include a programmable counter in the feedback loop and voltage controlled oscillator. Some wide-range high frequency synthesizers also use an additional crystal oscillator and a mixer circuit in the feedback loop and these type of circuits give excellent results. I think taking it to this level is really a separate project. Thanks for the links I am sure that other viewers may find them of interest.
+Scullcom Hobby Electronics At the end of the day it's a question of "what is the goal of the project?". If the only thing you want is a device that send 'x' pulses per second, then you are good. If you want an actual clock then you have a problem because the duration of the period of the output is never right (when locked it's adjusted so you are almost never using a perfect even divisor of 48 MHz, and when not gps locked there's the clock drift), it's a mix of faster and slower periods that only achieve the target on average. So if you want to check a frequency counter you are ok, if you want to clock something, only smaller frequencies will have a reasonable jitter.
Thanks. Initially in this project (earlier parts) I did use frequency divider IC's which worked well but the range of selectable frequencies was limited. In this version any frequency can be keyed in.
Yes, any frequency can be keyed in, but only one at the moment. I want to use u-blox neo-m8n for this project. I think this module has better quality of 10 MHz signal. What do you think?
I have tested both the neo-7n and the neo-m8n and found they both work well with this project, with no noticeable difference in frequency accuracy . The neo-m8n is more expensive and it acquires and tracks two GNSS systems concurrently while the neo-7n only tracks one at a time. So the neo-m8n is more accurate at GPS positioning but I believe the oscillator used is the same as the neo-7n.
For this project I used KiCad. You can download all the files which I have zipped from the following link - just unzip the file and you will have all the 8 files which you can use in Kicad: www.scullcom.com/GPS_locked_Freq_Ref_Part4.zip Regards, Louis
The problem is the sine wave filter was on the 10MHz output, with components chosen for that frequency. Now the design has been changed to use the GPS reciever to divide the frequency directly, the filter would have to be made to "track" the output frequency using some kind of wide bandwidth variable filter, an much harder job. If you want a sine wave with variable frequency, you'd probably be better using the GPS frequency to clock a DDS (Direct Digital Synthesis) chip that is capable of generating sine waves from a (much higher) fixed frequency input, effectively using the GPS as a 12MHz frequency standard.
Eventually, the problem of upgrading the program has solved it but another problem has been created. It does not catch satellites and therefore does not lock any frequencies. The only changes I have are that I do not have the Neo-7 GPS but the GY-GPS6MV2 and instead of the 74AC14 I've put the 74HCT14 Is it possible to be one of the two who does not work ?? Thanks again
Hi, The GY-GPS6MV2 will not work with this project as it uses the older Neo-6M GPS Module. You need to use either a Neo-7M or Neo-7N or Neo-M8 U-blox GPS Module. If you look at the first video I did on this project I explain which GPS Modules will work with this project: ruclips.net/video/lbns-FvpzK4/видео.html Regards, Louis
Thank you very much for the answer, I have ordered it and I am waiting for it! I will let you know about the result !!! Yours sincerely Vangelis sv1iyb
Just finished this. Used a 4x20 display and a Neo M8N. interestingly the characters from the M8N aren't $GPGGA but $GNGGA, the baud rate also was set to 115200, which is too fast for the adrino, had to use windows software to reset it to 9600. Also the 4700µH inductor I used had a 66ohm resistance so only fed 3.2v to the M8N, hence its the onboard 3.3v regulator had nowhere to go. I've also changed the script so you can add frequency in MHz, kHz or Hz, and use a decimal point. Give me a shout if anyone wants a copy
Good evening My mistake!!! Instead of chock 4.7μH, I accidentally set 4.7 mH, so only 2 volts go to the GPS !!! It works perfectly!!! I'm so sorry! Yours sincerely Vangelis sv1iyb
Thanks for a nice, fun project with a very useful result .... I used a 4x20 LCD display and changed the sketch quite a bit to support it. 'A' key still starts the new frequency entry and activates the 0-9 keys which are now inactive unless the frequency is being keyed in ... 'B' key terminates the new frequency entry and resets the GPS module frequency output. The 'C' key is deactivated because the battery voltage now shows up on the third LCD line when the power comes up and again whenever the frequency is changed. Pressing '#' enters the satellite/lock monitoring mode until '#' is pressed again at which time it exits back to the main loop. The sketch with changes can be downloaded from my FTP site (ftp://rjugel.asuscomm.com) in the "generaldownloads" folder ... sign in as 'visitor' with a password of 'anonymous' to access the site. Thanks again .... Dick :-)
Hi Richard, Thanks for your comments. Glad you found the project useful. Thanks also for the link I will have a look at your Arduino sketch. Regards, Louis
Thank you! This is exactly what I was looking for. Great frequency standard without need of calibration on the cheap side. The only thing I do not like is the output waveform. Kindly check this thred: www.antiqueradios.com/forums/viewtopic.php?f=8&t=293808. Rise time under 2ns and no ringing at all with the same74AC14 as you use now. Might be great upgrade for the next version. Regards, Tomas
+Gooberslot I have found if you select any random frequency up to about 2 MHz the output always gives a very nice clean square wave. The output waveform of any frequency between 3 MHz to 4 MHz also stays fairly clean. Once you go higher than these frequencies the square wave has some phase noise but the frequency is still accurate when monitored on a frequency counter or spectrum analyser. Choosing frequencies which have a factor of 48 MHz like 6 or 8 MHz does show some slight improvement but the phase jitter on the waveform is still there. To remove this phase jitter altogether I think would need a Phase Locked Loop circuit which you will see has been mentioned a number of times in other comments relating to this project. This is something we could look at in a future project.
+Scullcom Hobby Electronics I hope you do do a project with a Phase Locked Loop circuit in the future because I don't even know what that is but I'd love to learn. :)
Hi I build your GPS LOCKED FREQ REF . and i need some help with the software for the arduino nano board? when i try installing gps_ref_version6 i on zipped gps_ref_ver_version 6 all three (1)gps_ref_version6=8k (2)ublox=3k (3)ublox.h =1k. but when i try uploading it to my arduino nano board i get a error ( saying KEYPAD.H No such file or directory) yes i'm running the latest version of arduino 1.8.3. and i no it's works because from the library i can upload files like blink and it works good. So if you get a chance would you please help me with this problem i no it's something i'm doing wrong. Allan
Hi Allan, It looks like you do not have the keypad.h library installed on your Arduino IDE software. You can download the library from the following link: playground.arduino.cc/uploads/Code/keypad.zip Also check the link below which tells you how to install the library: playground.arduino.cc/Code/Keypad Regards, Louis
Hi thanks for writting back.But i can not get copy the two files keypad and gps_ref_version6 to my arduino nano board.in the help folder it says make a directory inside the library sub-directory of your sketch-book directory and copy or move the files into that directory? I can not get that to work.I'm not sure whats wrong.have you ran into this problem before?
It was very good that you published your first attempt at the project, and shared what worked and did not work. Learning better ways as we go is the reality. This is such a great project idea. Your explanations are also right on the mark. I miss my hardware days, but you bring them back for me.
Thanks Jay for your comments.
The harmonics are because the GPS uses a 48Mhz clock, and for a clean signal it has to be a fraction of 48mhz. u-blox can output up to 24Mhz. Anything other than a fractal of 48Mhz will have very bad Jitter and 'noise' because the u-blox aren't dedicated frequency dividers. Better to use the GPS to output say 8Mhz, then a dedicated DDS Systhesizer to control the frequencies to be clean and with less jitter.
If you divide down the Ublox clock to 2 Mhz, you can then filter only the 5th harmonic of it (needs a narrow bandpass filter instead of a low pass mentioned in earlier episodes) and then amplifiy that to get back the 10 Mhz sine. That should be jitter free, at least by no fractional dividing. Then use a schmidt trigger IC to turn that into a square wave again.
Hi Lewis. I just received the last of the parts from China, fitted them and YES it all works.
Thumbs up. Thanks again.
+Eric Gee Glad to hear all went well. Enjoy.
I also have just received the last part needed to assemble the project and finished it today...works a treat.
Thanks for all the work you and Andre have put in to this project...much appreciated.
Excellent update Lewis. Thanks. I did make a small change to the code, I added a battery check function to the main loop. So if the battery falls below a pre defined level (6.5v) it is immediately displayed. (I'm using two 3.7v Li-ion batteries). Best Regards.
+Eric Gee Thanks. Nice idea of adding the battery check in the main loop. Also the Li-ion batteries is a good choice.
Hello Mr Scullcom
I want to say thank you for your series of videos
I have only just found your channel and I have found your work is a refreshing change.
thanks once again for your brilliant project's ,that are so easy to understand!!
+Nut Lock You are welcome. I enjoy sharing the projects and try to include some learning of electronics and ideas in the process.
Fantastic update to a really excellent project. It is really a pleasure to watch all of your videos.
+Harvey Ellis Thanks for your kind comments.
With the cutting mat background, at first I thought this was a Julian Ilett video, when I saw the thumbnail in my subscription list. ;)
+Rambozo Clown As I was working at my desk on this video I thought I was use the mat to protect my desk LOL. In my workshop I have the anti-static matting on the workbench which you would normally see in my videos.
Louis you are incredible. I am furnishing my shop from your videos. Thank you for the fun.
Thanks James.
Excellent project thanks so much for sharing!
I've really enjoyed your demonstration and how clear you are. For me I'm interested in a solid being interested in Horology and how I might use this. I look forward to other updates.👍
Thanks for this series, and all your videos. Always nicely presented and well prepared. The suspenders are a new addition!
+PelDaddy Thanks. I had to laugh about your reference to suspenders LOL May be I should start a new trend wearing different colour trouser braces in my videos :)
The inclusion of the satellite count wasn't expected but greatly appreciated. I'm hoping I can gather all the parts to build one but first have to work on the technique needed to produce the circuit board. The rest of the build will be easy, but the board production is my big hang up. BTW the website looks very good.
you don't need a PCB build it using Veroboard !!
Thank you, good project lends itself very well to locked a low phase noise OVEN or a VCTCXO. Thank you again
Thanks. yes agree.
Thank you so much for the update and all your hard work.
Brian
+Brian Burdis Your welcome. I enjoy sharing.
Just discovered your channel and I love it! I was looking for a DIY function generator and found yours, which is almost perfect. Now I just have to work out how to convert it to use a 16 x 4 LCD to display frequency and waveform amplitude. Shouldn't be too hard...
+Moonbrony Thanks for your comments. If you want to use a 16 x 4 LCD then change the following line in the code from;
lcd.begin(16, 2);
to
lcd.begin(16,4);
This will then allow you to use the four lines of the LCD. You can then simply change the cursor position commands to your requirements.
Its a nice project with a bit of filtering it will work very well up 2 15MHz as a frequency standard. Its a very good building block with the addition of a veriable attenuator and some way of modulating the signal to use it as a portable rf sig gen for receiver tests. Maybe a project for the future using this as a starting point? Great videos and super channel.
+Gary g1fsh Thanks for your comments. Yes agree this could form part of a more advanced RF signal generator.
Would be nice to see that coming to life
The software does not work fully with the Ublox M8N. The satellite number shows just satellite and locks up the unit needing a restart.
It turns out the relevant data stream for the Neo 7N and Neo 8N are different so I changed several lines of the Arduino code to make it work properly. Apart for that it is a great project. I have ordered a 10 Mhz lowpass filter to clean up the waveform.
Great only one word Louis, great...
What can I say :-)
Regards,
Louis
Hello, I was looking for this type of project for a 10MHz reference. Being a radio amateur I need to check some devices. A big thank you to you. I embark on its construction. Cordially. Jean-Luc F1GPA
Your projects are incredible thank you. I just need more time so I can build them.
Thanks for all your work on these videos.I've really enjoyed your projects and have a couple on my to-build list. This frequency standard is my next in line and I just received my order for the last set of parts I need. I have two of the Neo 7M receivers (one from eBay and one from Amazon) and have been playing with them in u-center and with some other Arduino programs I have for GPS modules.When I started looking at the NEMA sentences from u-center, they don't seem to match up with the GGA sentence structure you're using in this video and the code. Specifically the Neo seems to be reporting two more digits of precision for time, latitude and longitude. This moves the structure over by 6 characters. There is also an issue with null fields when the fix is lost.I think this is because the example GGA sentence you have is an older example that doesn't take into account the variable decimal parts of these three fields, and, for some reason, the Neo is reporting out a precision greater than what is really useable.Also NEMA sentences are really comma-delimited where field number is guaranteed but position isn't.These are my u-center text console messages from a Neo 7M doing a cold start where it’s been powered down overnight.
1) This is the first GGA sentence reported. At this point there are no satellites so even the time information is unavailable.
$GPGGA,,,,,,0,00,99.99,,,,,,*482) This is only a short time (seconds) later and it has at least contacted a satellite since the time data is now available, but the satellite count is still zero.
$GPGGA,155620.00,,,,,0,00,99.99,,,,,,*633) This is the last GGA sentence that is not reporting a fix (about a minute after the previous one). The satellite count is now four but the fix value is still zero. It has put in a horizontal dilution of 2.79.$GPGGA,155725.00,,,,,0,04,2.79,,,,,,*5F4) This is the first GGA sentence reporting a fix. It’s taken about a minute, which wouldn’t be unusual for an indoor, cold start with a patch antenna. It has four satellites and is reporting a one for the fix quality.$GPGGA,155726.00,3836.75530,N,12117.96679,W,1,04,2.79,8.2,M,-27.2,M,,*6D5) I then covered the Neo to get it to drop its fix. I’m pretty impressed with it. Even indoors, covering it with my hand wouldn’t cause it to drop its fix. I had to wrap it with aluminum foil. At this point it’s still reporting four satellites but has a zero for the fix quality. I didn’t watch it long enough to see if the satellite count dropped. I’ll probably try this during some later testing. I don’t know why it’s adding the DGPS station ID number of 0000 towards the end at this point. This also illustrates the variable length nature of the field for the dilution.
$GPGGA,161349.00,,,,,0,04,22.30,,,,,,0000*69Examples 4) and 5) are the ones most likely to be seen once the receiver is up and running. The interesting point is that this will probably work with your code, but not because it’s determining the number of satellites, but because in 4) it will most likely be getting a non-zero value from the end of the longitude and in 5) it will probably be getting a zero from the DGPS station.Rather than using the satellite count, I prefer to use the fix quality right before the satellite count. In the GGA sentence a non-zero value seems to indicate a fix. In the RMC sentence, the fix quality field is “A” for active or “V” for void.The web site
www.plaisance-pratique.com/IMG/pdf/NMEA0183-2.pdf
has a more detailed explanation of the higher precision variable formats. Section 5.2.2 and 5.2.2.1 have some details on comma-delimited and variable length fields. Section 6.2 has some specifics on the time, latitude and longitude fields.
+Walt Mckinnon Thanks for your detailed comment, very interesting. I did also consider using the FIX indication but decided to monitor the number of satellites received as we are interested in locking to the satellite frequency as apposed to a navigational fix. You usually need 4 or more satellites detected to get a good navigational fix. You will note from the NMEA sentence received that you get a accurate time lock before a navigational fix.
Yes you are correct that the current NMEA sentence is reporting two more digits of precision for time, latitude and longitude and so increases the NMEA sentence by 6 digits (this is a total of 7 characters as there is now a decimal point used in the time data). The NMEA sentence I used in the video would appear to be an older version. However, as my software code strips off the first 7 characters of the NMEA sentence with the "(GPSreceiver.find(gpsin))" command which identifies the string we need to capture as it is looking for the characters "$GPGGA," when it finds these characters it then starts reading the remainder of the string data in to the buffer. So we start our count of characters from the first digit of the 'time' data (and not from the $ character) which is then character position 0. At 39 characters from this is the first digit of the number of satellite data (which is what we need to capture).
The Arduino software code is correct for capturing the data we need it is just I illustrated it with an older version of the NMEA code, sorry about that, my mistake.
I will mention this in my next video. If you run the Serial Monitor on your computer when you press the # key to see the number of satellites you will see that the captured NMEA sentence is displayed and starts with the time data, having already stripped of the "$GPGGA," characters (7 characters as it includes the end comma).
Thanks again for bring this to my attention.
+Walt Mckinnon I have updated the user manual for this project with the corrected information. Also it is now clearly explained on my website, direct link to the page below:
www.scullcom.uk/design-build-a-gps-locked-frequency-standard-part-4/
+Scullcom Hobby Electronics Thanks for the update. The web site is looking good.I see where you're getting the correct satellite count when you have a fix but I think there is still a problem when there is no fix.I copied the part of your program where you are reading the NEMA data into a small program and added a couple of more debug statements. One prints the "sats" variable and two others print the length of "sats" and "GPGGAdata". I then ran it while I had a fix and then removed the antenna so I lost the fix.I added the output from the serial monitor below and hopefully it stays formatted better than my last post. But basically, the length of "GPGGAdata" is 67 when you have a fix but only 34 when the fix is lost. This is because most fields are now nulls and you have only the commas and little data. The "sats" is good when you have a fix but is null when you don't. I think this is because the substring is pointing past the end of the field. The null "sats" then becomes a zero when you make it numeric. Right answer, but for the wrong reason.181331.00,3836.75378,N,12117.97067,W,1,04,1.72,30.5,M,-27.2,M,,*50GPGGAdata length = 67sats length = 2sats = 04satNum = 4Frequency Locked181332.00,3836.75342,N,12117.97088,W,1,03,1.70,30.3,M,-27.2,M,,*58GPGGAdata length = 67sats length = 2sats = 03satNum = 3Frequency Locked181333.00,,,,,0,00,99.99,,,,,,*6DGPGGAdata length = 34sats length = 0sats =satNum = 0181334.00,,,,,0,00,99.99,,,,,,*6AGPGGAdata length = 34sats length = 0sats =satNum = 0
Hi Louis
Just come accross this as I was searching for a GPS Disciplined 10 MHz oscilator for an ICOM IC-9700
Ordered the parts but wondered if you had done any more work on improving the spectrual purity.
I have ordered a 10MHz crystal and might try taking the output via an attenuator to the crystal and then a 50 Ohm match at the output.
Is version 6 the final software version I wonder
Is there a part 5 looming over the horizon? I see this was published 4 years ago now.
Keep safe
Regards and 73
Nick
G1BVI
PS tried to locate a direct email but failed
What about adding a SD card for logging your position time etc as well as a temperature controlled or oxx CEO time reference Crystal to create a basically a GPS discipline Crystal oscillator all in the same design
My guess is that 12MHz has less distortion as GPS fundametal 48MHz nicely divides to it.
Probably 6MHz looks cleaner than 5MHz as well.
I dont know how its done internaly with what frequency dividers and multipliers or some counters.
My guess is visible phase distortion comes from that every niw and then pulses coming out of the gps module are different length as the counters compensate tha 48Mhz doesnt divide nicely to 10MHz.
Very nice project! Looks very professional. I would like to build this project and am in the process of acquiring the components. As far as the GPS module, I am planning on getting the Ublox 8N module. Will the software you have provided for this project work on GPS modules other than the one you used in your project without modification?
Thanks for your comment. Yes the software should work OK with the Ublox 8N module.
Although I recently discovered this excellent design you have posted, thank you very much !!!
I've built the board but I'm stuck !!!
What I wanted to ask is why I can not go to your nano arduino program as many attempts as I've done !!
Note that I have the drivers needed for the nano arduino!
I use the arduino version 1.8.6
I would be very happy if you gave me a solution to the problem!
Yours sincerely
Vangelis
Hello sir, i need a help in building a gps device with certain features, can you help me with this. Please reply.
Good evening I come back again after I changed everything that we said, and I just put the material on you, but unfortunately it does not catch with any satellites, so I do not have a frequency lock. The screen light normally says it is Ver. 6 the frequencies change it, with C, I see the voltage with D, I see the frequency I put, with # I see satellites 0 and hangs there and does not go back and again I turn the trend and put it again to work. The only difference we have is that to pass the program, I have to convert it to .hex from Arduino and I go through the XLoader because my Arduino does not pass the program directly and I think something is wrong with the conversion! Do you have any idea for top what's going on ???
Yours sincerely Vangelis
sv1iyb
Better and better :-D
Just when i thought it could not be improved lol.
The output does look a bit odd, would some kind of biased low threshold schmitt trigger circuit have a usefull effect, or should i shut up ha ha :-D
+zx8401ztv Thanks for the comments. This video was a little dark as I filmed it at my computer desk in the house and not in my workshop. I have a small set up of test equipment on my computer desk which I use when testing projects and working on software. In this case I had just finished the software update so I decided to film it there. If I do it again at this desk I think I will have to improve the lighting.
I have tried a number of ways to get rid of this phase jitter on the square wave at the higher frequencies but found it difficult to remove at all outputs frequencies. As you mentioned, I have tried playing with the threshold bias on the schmitt trigger but was not successful. I did try adding a low pass filters which did work well but then this would have to change as the frequency selection is changed. Basically, what we need a a programmable filter which tracks the frequency we have entered so that it filters out the unwanted harmonics.
I think the next step would be some form of Phase Locked Loop circuit but I will leave this for another project as it involves a second PCB with a Voltage Controlled Oscillator and a Programmable Frequency Divider in the feedback loop.
The project as it stands at the moment does give out an accurate frequency reference signal so is still quite useful for the hobbyist. Thanks again for your constructive comments they are always welcome.
+Scullcom Hobby Electronics
I admit that i know nothing about the methods used to generate the waveform, i would ask, what does the waveform look like with only a resistive load and very little stray reactance present, does it look the same, does it change with odd frequencys, and how would a gps satnav use that signal.
is the problem related to taking the gps module away from its typical usage.
If nothing else, its interesting :-D
To begin with, thx ever so much for sharing this project and all the details needed to build it.
So, it appears that there is only a subset of usable UBlox output frequencies, the rest have excessive jitter. A step up and another project is to find the highest frequency that has a very low jitter and use that as a reference for a local frequency synthesizer. Unfortunately it would make the project a lot more complex but the output would be jitterless at any frequency that the synthesizer is capable of generating. Nice talk, seems like a great fork for this project. Thx for the information and the idea.
I look forward to each time you share one of your exquisite projects.
Again, thx for taking the time to make the videos and sharing the results.
You obviously haven't read the remarks concerning the jitter problem in previous video. The mcu can change its output only on sync with its own clock. So you will always have a problem if you ask a frequency that is not a divisor of its 48MHz reference. You should not exceed 12 MHz... The artifacts at that frequency may be caused by sync with satellites. Because when locked, and even if you ask a divisor of 48, it will try to output the real value and not a divisor of the reference 48MHz. So do these artifacts change if you remove the antenna?
To be clear, at 12 MHz output, the mcu output is high 2 cycles, the low 2 cycles... with a simple clean pattern. But if you ask 11.9 MHz, it will do the same, except that from time to time the output will be fixed for 3 cycles instead of 2. So on average you get the 11.9 MHz you asked, but a quite dirty one. Now if you add satellites, it will try to compensate for the error of the 48 MHz. Imagine that the real value is actually 48.03 MHz. Without lock, if you ask 12 MHz, the system has no way to know this drift and will divide by 4 (as explained before). But when you have lock, it will know that there's a drift in the 48 MHz and will compensate for it. So to output 12 MHz it will have to divide by 4.0025 and will have to add a 3 cycle instead of 2 from time to time... and generate the glitches on the frequency analyser
+cyril muller conclusion: if you want a clean output at all frequencies and with or without lock, you should use a PLL www.analog.com/media/en/training-seminars/tutorials/MT-086.pdf
+cyril muller www.ti.com/ww/mx/multimedia/webcasts/TI_webinar_25-06-2010.pdf
+cyril muller Thanks for your detailed comments which other viewers may find of interest. I have read your previous remarks. The jitter only seems to effect the higher frequencies over about 3 MHz. Even though the waveform shows a poor quality waveform shape at the higher frequencies I have found that in all cases the fundamental frequency which is set, still remains accurate and can be used as a reference. This is clear to see on both a spectrum analyser and frequency counter. I am very familiar with the benefits of using a PLL which would improve the output waveform of this project and this could be added at a later stage if required. This project was aimed at the hobbyist and was designed to keep the cost down as a starting point but still give an accurate frequency reference standard which would be useful. In order to use a PLL with this project you would also need to include a programmable counter in the feedback loop and voltage controlled oscillator. Some wide-range high frequency synthesizers also use an additional crystal oscillator and a mixer circuit in the feedback loop and these type of circuits give excellent results. I think taking it to this level is really a separate project. Thanks for the links I am sure that other viewers may find them of interest.
+Scullcom Hobby Electronics At the end of the day it's a question of "what is the goal of the project?". If the only thing you want is a device that send 'x' pulses per second, then you are good. If you want an actual clock then you have a problem because the duration of the period of the output is never right (when locked it's adjusted so you are almost never using a perfect even divisor of 48 MHz, and when not gps locked there's the clock drift), it's a mix of faster and slower periods that only achieve the target on average. So if you want to check a frequency counter you are ok, if you want to clock something, only smaller frequencies will have a reasonable jitter.
Hello.
Great project!
And why you have refused frequency dividers on IC`s?
Thanks. Initially in this project (earlier parts) I did use frequency divider IC's which worked well but the range of selectable frequencies was limited. In this version any frequency can be keyed in.
Yes, any frequency can be keyed in, but only one at the moment.
I want to use u-blox neo-m8n for this project.
I think this module has better quality of 10 MHz signal. What do you think?
I have tested both the neo-7n and the neo-m8n and found they both work well with this project, with no noticeable difference in frequency accuracy . The neo-m8n is more expensive and it acquires and tracks two GNSS systems concurrently while the neo-7n only tracks one at a time. So the neo-m8n is more accurate at GPS positioning but I believe the oscillator used is the same as the neo-7n.
What CAD soft do you use?
Is it possible to obtain schematic and board files?
For this project I used KiCad. You can download all the files which I have zipped from the following link - just unzip the file and you will have all the 8 files which you can use in Kicad:
www.scullcom.com/GPS_locked_Freq_Ref_Part4.zip
Regards,
Louis
What happened to the sine wave filter?
The problem is the sine wave filter was on the 10MHz output, with components chosen for that frequency. Now the design has been changed to use the GPS reciever to divide the frequency directly, the filter would have to be made to "track" the output frequency using some kind of wide bandwidth variable filter, an much harder job. If you want a sine wave with variable frequency, you'd probably be better using the GPS frequency to clock a DDS (Direct Digital Synthesis) chip that is capable of generating sine waves from a (much higher) fixed frequency input, effectively using the GPS as a 12MHz frequency standard.
Eventually, the problem of upgrading the program has solved it but another problem has been created.
It does not catch satellites and therefore does not lock any frequencies.
The only changes I have are that I do not have the Neo-7 GPS but the GY-GPS6MV2 and instead of the 74AC14 I've put the 74HCT14
Is it possible to be one of the two who does not work ??
Thanks again
Hi,
The GY-GPS6MV2 will not work with this project as it uses the older Neo-6M GPS Module. You need to use either a Neo-7M or Neo-7N or Neo-M8 U-blox GPS Module.
If you look at the first video I did on this project I explain which GPS Modules will work with this project:
ruclips.net/video/lbns-FvpzK4/видео.html
Regards, Louis
Thank you very much for the answer, I have ordered it and I am waiting for it!
I will let you know about the result !!!
Yours sincerely
Vangelis
sv1iyb
Just finished this. Used a 4x20 display and a Neo M8N. interestingly the characters from the M8N aren't $GPGGA but $GNGGA, the baud rate also was set to 115200, which is too fast for the adrino, had to use windows software to reset it to 9600. Also the 4700µH inductor I used had a 66ohm resistance so only fed 3.2v to the M8N, hence its the onboard 3.3v regulator had nowhere to go. I've also changed the script so you can add frequency in MHz, kHz or Hz, and use a decimal point. Give me a shout if anyone wants a copy
Yes please.
@@VK3TWO Email sent, hope it helps
Good evening
My mistake!!!
Instead of chock 4.7μH, I accidentally set 4.7 mH, so only 2 volts go to the GPS !!!
It works perfectly!!!
I'm so sorry!
Yours sincerely
Vangelis
sv1iyb
Thanks for a nice, fun project with a very useful result .... I used a 4x20 LCD display and changed the sketch quite a bit to support it. 'A' key still starts the new frequency entry and activates the 0-9 keys which are now inactive unless the frequency is being keyed in ... 'B' key terminates the new frequency entry and resets the GPS module frequency output. The 'C' key is deactivated because the battery voltage now shows up on the third LCD line when the power comes up and again whenever the frequency is changed. Pressing '#' enters the satellite/lock monitoring mode until '#' is pressed again at which time it exits back to the main loop. The sketch with changes can be downloaded from my FTP site (ftp://rjugel.asuscomm.com) in the "generaldownloads" folder ... sign in as 'visitor' with a password of 'anonymous' to access the site. Thanks again .... Dick :-)
Hi Richard,
Thanks for your comments. Glad you found the project useful. Thanks also for the link I will have a look at your Arduino sketch.
Regards,
Louis
Hi Dick
I tried going to your ftp site but I get a blank page? Has it been taken down? Regards
Nick
Thank you! This is exactly what I was looking for. Great frequency standard without need of calibration on the cheap side. The only thing I do not like is the output waveform. Kindly check this thred: www.antiqueradios.com/forums/viewtopic.php?f=8&t=293808. Rise time under 2ns and no ringing at all with the same74AC14 as you use now. Might be great upgrade for the next version. Regards, Tomas
What happens if you choose a factor of 48 like 6 or 8 Mhz? Is it cleaner than 5 Mhz?
+Gooberslot I have found if you select any random frequency up to about 2 MHz the output always gives a very nice clean square wave. The output waveform of any frequency between 3 MHz to 4 MHz also stays fairly clean. Once you go higher than these frequencies the square wave has some phase noise but the frequency is still accurate when monitored on a frequency counter or spectrum analyser. Choosing frequencies which have a factor of 48 MHz like 6 or 8 MHz does show some slight improvement but the phase jitter on the waveform is still there. To remove this phase jitter altogether I think would need a Phase Locked Loop circuit which you will see has been mentioned a number of times in other comments relating to this project. This is something we could look at in a future project.
+Scullcom Hobby Electronics I hope you do do a project with a Phase Locked Loop circuit in the future because I don't even know what that is but I'd love to learn. :)
UBlox Internal Oscillator is 48mhz, so any even division is clean. Anything other than that is quite terrible/noisy, and lots of jitter.
Hi
I build your GPS LOCKED FREQ REF . and i need some help with the software for the arduino nano board? when i try installing gps_ref_version6 i on zipped gps_ref_ver_version 6 all three (1)gps_ref_version6=8k (2)ublox=3k (3)ublox.h =1k. but when i try uploading it to my arduino nano board i get a error ( saying KEYPAD.H No such file or directory) yes i'm running the latest version of arduino 1.8.3. and i no it's works because from the library i can upload files like blink and it works good. So if you get a chance would you please help me with this problem i no it's something i'm doing wrong.
Allan
Hi Allan,
It looks like you do not have the keypad.h library installed on your Arduino IDE software. You can download the library from the following link:
playground.arduino.cc/uploads/Code/keypad.zip
Also check the link below which tells you how to install the library:
playground.arduino.cc/Code/Keypad
Regards,
Louis
Hi thanks for writting back.But i can not get copy the two files keypad and gps_ref_version6 to my arduino nano board.in the help folder it says make a directory inside the library sub-directory of your sketch-book directory and copy or move the files into that directory? I can not get that to work.I'm not sure whats wrong.have you ran into this problem before?