GPSDO YT 10 Mhz Lcd 2x16 With LED, UTC Time and GPS Localisation.




About: Hi, i'm electronic technician but it's my hobby too. I like to do and try many projects just for fun :)

Hi guys,

What is a GPSDO ? GPSDO means: GPS disciplined oscillator. GPS for global positioning system. All GPS satellites are equipped with synchronized atomic clock. GPS module receives these signals from several satellites. And by triangulation, it knows his location. But here, what interests us is the pulse per second that is found on the module. With this precise pulse (from atomic clock), we can do a very very accurate oscillator. What for ? For reference, for calibration of frequency counter or just for fun to have one in his lab.

For more explanation on how calibration is working. Go to my first instructable just here:

So i did a frequency generator of 10.000000000 Mhz +- 0.000000001 Mhz or 1ppb on 10Mhz

Let's begin

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Here Is the Schematic

I improved schematic. I added a pot for the 12v version. Like that almost any 7404 or 7414 are working.

And i added LED support. Optional as well.

Basic projet could be only the uC atmega without LCD and LED. Output will be the same. But add some monitoring device is more fun :)

Step 2: Some Parts You Will Need.

GPS module. You can buy a cheap one.... any will do.

But you will need to find where is the pulse is. When a led is on the device. Best thing to do is to put a wire from the led to the 7404. Or now on ebay i saw some availables with on board GPS pulse output.

If your module isn't configure to have 1 pulse per sec (1 pps) and 0 pps when antenna are signal is missing, you will need to setup the GPS module. If you buy a ublox 6m. It's by default.

Interesting information:

On a ublox n8m, you can choose an output of 10mhz. So why doing a gpsdo when i could have 10mhz directly of a gps module ? It's because ublox module is using speed of 48 Mhz and this is creating jitter at the output. 48Mhz isn't dividable by 10. This is what i talking about:

And this is at 1Mhz, at 10Mhz, this is worst, very ugly. Also, after some test and experience with pll gpsdo, the pll was sticking on a moving waveform. It's why i choose to do an over time gpsdo instead.

Yellow is a 10mhz reference gpsdo divided by 10. Trigger is channal 1 (yellow).
Blue is the timepulse output 1mhz 50% duty of a ublox n8m.

As you can read in Timing Consideration book page 10-11, it's because Ublox is using a speed of 48 mhz. And this one isn't dividing by 10. So, at the end the software is doing a correction.

Step 3: OCXO

Oscillator OCXO. Simple or double, 5v or 12, sine or square will do.

Step 4: LCD 2x16

LCD is optional. If you install one. Only pin 1 to 14 is needed. For pin 15 and 16 (backlight), install a diode and wire exactly like picture.

Step 5: Those for Gps Module

This cable is:

High Frequency Coaxial Connective Cable Cord RP-SMA Female Connector IPX

and antenna:

28dB LNA Gain 1575.42MHz RP-SMA Male GPS Active Antenna Stronger Signal

Step 6: PCB

For PCB i used the toner transfer method. Not perfect but ok for this project. I'll give you PCB to print at next step.

Step 7:

Here is the file you will need to do the PCB. Top one is mirror for toner transfer method. I also added the gerber files if you want to use a professional way.

Step 8: Check Voltage

Before to add atmega and 7404, voltage must be checked.

I know my heat-sink is HUGE but i'm using what i have :) An old pc heatsink

Don't pay attention to my crocs with my socks lol

Step 9: LED Board

I did a board for the LED. At the end i glued the transistors on the metal box.

I'll give you pcb file on next step.

I suggest these flat cable. If by mistake you plug the cable upside down, no worry. everything will be fine. Just no LED will turn on. That's all.

Step 10: LED Board Files

The files for the little board

Step 11: Program Your ATMEGA and Below Here Is the .HEX File

You need an Atmega328p and the .hex file below. You must also choose the right fuses bits.(E0 D9 FF)

They are many way to do that:


-USBasp (see next step)

-USBtiny (see next step)

-Arduino to program another atmega328p (search on internet, many how to availble)

Myself, i'm using a stk500 with ISP directly in Atmel studio. You can use any other method. A lot of cheap programmer are available on ebay. Next step show an ease alternative.

You must choose the right fuse bit. Here is Picture of stk500 fuses bits. (E0 D9 FF)

-Be sure that external oscillator is selected and the low.ckdiv8 clock is unchecked. See picture. Pay attention, when the external clock fuses bit, you must provide an external clock to program or run the code. In other words, connect the Oscillator in xtal1 pin.

So for short, send the gpsdo.hex file to the Atmega328p and program the fuses bits. (E0 D9 FF)

Step 12: Program Your ATMEGA With Avrdude and a USBasp or USBtiny

This method is very simple and cheap. search on ebay or amazon for USBasp or USBTiny. It's between 2 and 5$.

Plug in your USBasp or USBtiny device in your computer and let Windows detect the device (it will report driver not found). If a window pops up asking to search for driver, just close it or click on Cancel.

At this point, download and run Zadig, it should detect the USBasp or USBtiny, or any libusb device that you have. Then in the selection box (see picture), choose libusb-win32 (v1.2.6.0), click on Install Driver, and wait for the installation to complete.

Check in device manager for atmel usb device = ok. No excalmation mark anymore

Download avrdude 6_3 with HEX.rar here below on this page and unzip files in a folder. You will have 5 files, see pictures.

I create a batch file to program the chip with .hex and fuses bits in same time.

Connect USBasp or USBtiny cable in gpsdo board, see picture and turn on the project.

Double click on program usbxxx.bat

At the end, code and fuse bit are programmed, again see picture (black one)

Pay attention, with new fuses bits setting, clock must be now, external.

If programmation is ok and you see happen on lcd, check for oscillation. If you use 12v option, turn the pot

until something is lit on display. Use oscilloscope to adjust duty to 50% if you have one.

Step 13: Try Your Project

Before to put all the thing in a box. Try it. Be sure that all is working fine.

Here i fixed GPS module on heat-sink. I used an old transformer 16v AC. Too large for the project but again, i'm using what i already have.

Step 14: OCXO Insulation

If you want, you can insulate the OCXO with foam. Here i used depron foam. This is optional only.

Step 15: Holes in Your Box

Prepair your box. Do hole, put some paint! For square i'm using this tool, see picture.

Step 16: Time to Put All in a Box

Here i used a metal box.

Step 17: On Scope Results

Like you can see, sine wave is nice. 3,44V peak to peak. (1 volt/div)

Square wave is 2v/div

Here i'm using a 74LS04.

Step 18: Instruction Manual

At turn on GPSDO wait 15 minutes. It do nothing. This is for warming the OCXO and satellites reception.

If the OCXO is already hot, just push button to pass this wait time.

Now begin calibration phases. 6 phases total. 1 second, 10, 60, 200, 900, and 1000 seconds. At 1000, uC is counting 1 billions of cycles (ticks) for exactly 10,000,000.000 Mhz

As soon this 1000 seconds achieved, uC keeps the pwm value in eeprom and continu at run mode.

Run mode is the same, 1000 seconds counted. If counter reach 10,000,000.001 or 9,999,999.999 the pwm value (16 bits) is adjusted plus or minus 1 and so on.

Important, keep in mind, in all calibration phase and run mode, the display is showing the actual count or frequency. If the value isn't normal, bizarre or understandable, suspect a gps pulse problem or a low antenna signal. Problem is coming from the pulse. This one isn't arriving at the right time.

When GPSDO is in run mode, config is saved in eeprom. So if this one is turned off and on, GPSDO go directly in run mode. But be aware. If power if off for a while. You will probably need to do a whole re-config process. Sometime even with pwm in eeprom, frequency have drifted to much. And, in run mode, the pwm is moving to slow (1/65535v) to correct the drift. In that case. Push putton at power on to set to default.

If for any reason, satellites are lost or weak (below than 3), gps pulse will be lost too. So pwm value will be not changed anymore until pulse come back. OCXO will run by itself at last good eeprom value. On scope you wont see difference when pulse is there or not.

If you press button, uC will stop counting and you will see UTC time and localisation for 10 seconds.

Localisation is in Degrees and decimal minutes (DMM). This is how to enter this on google map:

46 19.81750 N 072 35.33259 W

If you want to erase the eeprom value and restart calibration, just push button and hold at startup.

Step 19: Conclusion

I hope you will enjoy this project. Questions, commentary are welcome English or French.

5 People Made This Project!


  • Made with Math Contest

    Made with Math Contest
  • Multi-Discipline Contest

    Multi-Discipline Contest
  • Robotics Contest

    Robotics Contest

82 Discussions


Question 7 weeks ago on Step 19

Hi, I am building your project, just waiting for the GPS module to arrive on the slow boat from China! I was wonderingif you would post the source code for the Atmega as I would like to change it to use an I2C display and a few other minor changes?

2 answers

Answer 7 weeks ago

Hi, the source code is an assembler (.asm) all comments are in french


Reply 7 weeks ago

That's ok I can translate it to English!


3 months ago

Hi Yannik, thanks for the excellent project.

My question: you posted a picture of a cutting tool for a square.
Where do I get this tool??

regards Walter

1 reply

Reply 2 months ago

Search for nibbling cutter. I bought mine at Addison in Canada


Question 4 months ago

Hi Yannick,
My unit got stuck in Phase 5 , can't never reach the Run phase Even if 8 or 10 satellites were locks. What Is the problem?

6 answers

Answer 4 months ago

oh, sorry about that. In phase 5 it's almost perfect. What ocxo are you using ? The uC is maybe at the end of pwm and can't go higher. At phase 5, what voltage is on the pwm output (between gnd and pwm) ? some ocxo have 0-8v or 10v adjustment instead 0-5v and with this type of ocxo you need to add a op-amp like here at the bottom:


Reply 4 months ago

Ok so it's a 5v simple oven but should be working fine. How many time you wait so far ? Is the power supply is good (noise, power maybe) ? On my side the same ocxo is working fine. I have also tried the 131-100.


Reply 4 months ago

I wait about 5 hours but the unit got stuck in Phase 5.
the display sometimes shows 9,999,997 andsometimes shows 6,478,554
The power supply is good I use a linear power supply 5 V 3 A with 20 mV ripple


Reply 4 months ago

Also 5 hours isn't very long. it's possible to have 9,999,997 Try more time. Recheck on tomorrow.


Reply 4 months ago

6,478,554... you have a problem with gps pulse. The uC always show the right count.


Question 4 months ago

should this device be always on to work properly?

1 answer

Reply 4 months ago

Hello mpoletti, the answer is yes and no. to have an 10mhz accurate yes. If you plug the device each time your are using, the gpsdo will run at last known speed (saved in eeprom). This one will be very very close to aim with a bit of a drift but can be use anyway and the drift will disappears over time.


Reply 4 months ago

Hello, your welcome. i saw your pictures. You did well. look nice :) Is the instruction was ok ? uC wasn't too hard to program ?


Reply 4 months ago

Hi Yannick,
Your instruction is Good....any one can do.....Also Programming is easy...


5 months ago

You adjust the pot to have duty to 50% at the output (TTL) like the picture. Do you have an oscilloscope ?
If no, you can adjust the pot to have 1.75v at the output. It will be not perfect but will be ok. That's what i have on my side.


6 months ago

First I would like to thank Yannick for contributing and sharing the fantastic project!
My experience in building and testing mine show that it is important to have a clean power supply and good GPS antenna location. It will affect the operation and stability of the GPSDO unit.
Try to avoid switching power source such as cellphone adapter and if you can not place the GPS antenna outside you should at least position them near your windows.
My unit got stuck in Phase 5 or 6 - can't never reach the Run phase when too few satellites were available and noisy power supply seems to affect the Run mode stability (could wander around by up to 30 or 40 units).
Once I have the antenna positioned optimally and replaced the power supply with a linear one (optimized for low noise) it worked much better.
OCXO insulation also helps in the stability of the unit of course.


1 reply