Introduction: GPSDO YT 10 Mhz Lcd 2x16 With LED, UTC Time and GPS Localisation.
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, he 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 + or - 0.000000001 Mhz
Step 1: Here Is the Schematic
I improved schematic. I added a pot for the 12v version. Like that almost any 7404 or 7414 is 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.
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
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.
Here is the file you will need to do the PCB. Top one is mirror for toner transfer method.
Step 8: Check Voltage
Before add atmega and 7404, check voltage.
I know my heat-sink is HUGE but i'm using what i have :)
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 (v126.96.36.199), 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. He 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.
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.
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.
Yannick99 made it!
We have a be nice policy.
Please be positive and constructive.