Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 18, 2019, 02:24:22 02:24


Login with username, password and session length


Pages: [1]
Print
Author Topic: GPS Timing Receiver  (Read 907 times)
0 Members and 1 Guest are viewing this topic.
Magnox
Active Member
***
Offline Offline

Posts: 239

Thank You
-Given: 903
-Receive: 261


Oink!


« on: June 24, 2019, 08:51:51 20:51 »

This is the first step in making myself a GPS disciplined 10MHz reference oscilator, followed by a frequency/timing counter. It would probably be cheaper just to buy them, certainly easier, but I want to design and make my own for the fun of it. I made a bad mistake in this design which I didn't realise until after I had populated the PCB. It doesn't stop it working for what I want, but it's very annoying after all my hard work! I blame my recent cognitive problems (seriously). I'll get to that later anyway.

The receiver is based around a Ublox NEO-M8T module. That is the timing-enhanced version of their feature-packed GPS receiver module. The module comes on a tiny PCB with castellated edges for soldering to another PCB. It includes the GPS receiver itself, flash memory and antenna LNA/filter/power. Nicely, it has a USB interface built in (really a serial-USB converter) to make PC interfacing easy. In addition to the usual 1PPS (pulse per second) output which is the key to using these things for timing, it has a second timing output. Both are reprogrammable to a wide range of frequencies/periods/duty cycles.

This is the first proper thing I've designed in years. While quite simple, it had a bit of a learning curve. Impedance controlled PCB microstips for the antenna and USB and hand soldering 0603 components among them. I decided to have the PCBs made by JLCPCB. There's no way I could hand make a good enough one.

I wanted the board to be suitable both for prototyping and learning to use the thing, followed by using it in the final GPSDO design. I can't afford to buy a second NEO-M8T for that. Hence some of the design decisions.

Design

The circuit requires 3.3V and can be powered from 5V, 3.3V or USB bus power. USB bus power can be enabled with a jumper. I wanted to be able to disable that completely when I put it to its final use (no way USB can power the GPSDO) but it's useful to have for prototyping at first. A couple of diodes and a LDO regulator take care of either 5V source. The regulator is fine with having 3.3V applied at the output if there is no 5V, according to the datasheet. One should only connect 3.3V directly if there is no 5V source. A CR1220 cell keeps the NEO's memory when not powered, to make startup quicker.

Although the NEO already has an additional LNA inside, an active antenna is still advisable if it is on a long cable. The NEO has a filtered, 3.3V power output to drive the active antenna but lacks a bias-T, so one is required. The trace from the module to the antenna is a 50 ohm microstrip with the bias-T and ESD protection connect to this trace directly with no stubs. The bias-T power can be enabled or not by the zero-ohm resistor link R13, just in case I want to use an unpowered patch antenna in the future. Currently I'm using a TomTom external, active GPS antenna I picked up cheaply.

The USB interface has a TVS protection device and the proper 90-ohm differential pair microstrips to the NEO. Well, near enough anyway. A standard asynchronous serial interface is also available on the header pins, at 3.3V, for connection to an MCU. The serial interface can be changed to SPI by fitting a link at R12.

The all-important timing outputs are available on both header pins and SMA connectors, each with an individual buffer. Here is where I made the mistake. My first design used TinyLogic individual buffers for these, an idea I borrowed from ublox's own development kit. At some point in the design I thought it would be simpler to change these for a single IC, a hex buffer. I completely forgot about my intention of being able to drive a 50ohm load. The single IC cannot handle the current required for that. So, despite having 50ohm microstrips to the sockets and termination resistors, it needs to drive a high impedance load. That's not likely to be a problem really, given the low frequency and short connections, but it's really annoying to have made the mistake. If necessary I could probably bridge two buffers together with a bit of wire under the chip to get enough current for one 50ohm load. Of course, I realised this after I had built the board up. If I could afford another NEO module I would go back to the original and have another PCB made.

I used Saturn PCB Design Toolkit (free software) to calculate the microstrips. The PCB is made from 0.8mm FR4 because 1.6mm needed much wider microstrip traces. A drawback of only using two layers. The PCB could have been made half the size, but I wanted to make it easy to use. Besides, it's the first design I've done with almost exclusively SMD parts, and the first I've ever had made for me.

I'm still playing around with KiCad and I've attached the design files in case anyone wants to make one. I'm not sure I like KiCad though. My next design might be with something else. Note that I've included some libraries for the parts, including two for the NEO. I used one (from the repository) in the schematic, only to find the PCB footprint was wrong. So I found another one with a correct footprint and used that for the PCB. C7, C13 and C15 are ESD protection devices, not capacitors. KiCad gave them that symbol from its library, silly KiCad.

The board works (other than the 50ohm termination thing) perfectly. I populated the power parts first and checked power lines, because I didn't want to blow up a very expensive NEO-M8T. Then the rest of the components apart from the NEO and another continuity check and voltage level check on important pins. Finally, I soldered on the NEO itself. That was a pain to do. The castellated pads didn't seem to want to take solder on some of them, probably ground planes, even with my 'big' iron tip. I did most of the soldering under a 20x binocular microscope because my eyesight is so bad I can't even see an 0603 on my desk without my glasses now (literally).

Seeing the PPS LED start flashing about 15 seconds after I applied power from a PSU was so good! That meant that I hadn't managed to kill the NEO with the dodgy soldering; it had got a satellite lock and was functioning. The NEO 8 is really sensitive. My antenna is inside on the windowledge and other GPS units really struggle to get a signal there; I usually have to hold them out of the window for a few minutes while they find some satellites. The NEO 8 took 15 seconds from a cold start to be up and running!

The board also works fine from USB power and talked nicely to the PC. It shows up as a virtual COM port. Ublox's U-Center software talked to it, as did Lady Heather (a free, very useful program for GPS timing systems). Within a couple of minutes of powering up again, it was tracking so many satellites they were overlapping on the display. I used U-Center to program the NEO to fixed location timing mode, and the second timing output to 10KHz and checked outputs with a 'scope. All is as it should be.

Next step... use this to prototype my GPSDO. More designs (hopefully with fewer mistakes) to follow when I figure out how to make that.
« Last Edit: June 25, 2019, 10:35:11 10:35 by Magnox » Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1079

Thank You
-Given: 333
-Receive: 384



« Reply #1 on: June 25, 2019, 12:42:04 00:42 »

Congratulations on your project, well documented and presented. Something Iíve never really played with may be one day, thatís the beauty of working on projects you lean from your mistakes and learn more along the way. Itís like my wireless meter I did, the first one worked really well but then the second one I did where I improved on the design changed the case which was better suited and now looking at making mk3 of it with itís own integrated battery/charger built in.

Iíve never used kidcad Iíd recommend Altium a bit of steap learning curve but the best program by far in my opinion
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
Magnox
Active Member
***
Offline Offline

Posts: 239

Thank You
-Given: 903
-Receive: 261


Oink!


« Reply #2 on: June 25, 2019, 05:09:40 05:09 »

Thank you Wizpic! Yes, it's all a learning experience. That's what I want, and why I want to design my own things rather than just take the easy option and grab someone else's from the 'net. I want the challenge.

Which version of Altium do you use? I'll take a look at it. I've been trying to decide which software to settle on, but I don't want to spend ages trying out and re-learning every software package when I could be concentrating on making things instead. I'm not familiar enough with any of them to have a preference at the moment. I need to pick one and stick with it.

I use Multisim often for testing things out, and I have a big, partially finished project done on Proteus from a few years back that I might resurrect.

My designs go up to relatively complex things (for a hobbyist) with CPLDs and small FPGAs, so software suitable for perhaps a four layer design would be beneficial.

Being able to have PCBs made, affordably, is a game changer for me.

Edit: I've just remembered why I had not considered Altium: all the talk about codearmor and Altium trying hard to identify unlicensed users. Although I have good firewalling in place, I don't like the thought of that.
« Last Edit: June 25, 2019, 05:28:57 05:28 by Magnox » Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1079

Thank You
-Given: 333
-Receive: 384



« Reply #3 on: June 25, 2019, 06:26:00 06:26 »

I use the latest version, luckily Iíve not had any issues so far but then again Iím only a hobby person and not a company. Only use it from time to time.
It is easy to use if you have used other pcb software.
My designs donít get that complex so I use my CNC to make a one off for testing and if all is good and I need more I just get my pcbs from e-bay very cheap for 10 off, canít be done with the chemicals these days very messy.
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
gurksallad
Inactive

Offline Offline

Posts: 5

Thank You
-Given: 1
-Receive: 0


« Reply #4 on: July 15, 2019, 09:00:54 09:00 »

I must admit your PCB is very well layout, way better than my boards. Clean, and still to the point.

Well done.
Logged
Magnox
Active Member
***
Offline Offline

Posts: 239

Thank You
-Given: 903
-Receive: 261


Oink!


« Reply #5 on: July 15, 2019, 03:41:15 15:41 »

Thanks!

My GPSDO is coming along nicely. So far I have the 10MHz OCXO accurate to within 1 part per trillion, based on a running average of the GPS PPS signal. The uncertainty caused by the jitter of the PPS is less than that over the measurement time. It's harder to judge the instability but I've never measured over any period with more than +/-1 count away from perfect. It's certainly far more accurate and precise than anything I have to measure it with, or than I will ever actually need.

I decided on a simple PLL method to lock the OCXO to the GPS timing. That has pros and cons compared to the MCU controlled solution I originally had planned, but it works and I like it.

That was so easy it was an anticlimax.

The MCU (a PIC running at 50 MIPS) is instead being used to monitor the OCXO's accuracy, give a status display and logging output, and generate a stable PPS signal locked to the GPS PPS average but with much less jitter (basically whatever jitter the stabilized OCXO has). I'm working on measuring the generated PPS offset to within about 1ns using the PIC as a TIC (Timing Interval Counter), which then tweaks the PPS clock to adjust the phase.

Right now I'm deciding whether to use a handful of discrete logic, a CPLD, or some small PICs (winning so far) to do some tricky, timed division. I also have a Maxim DS1023S programmable delay line (with a 0.5ns step) on the way to enable really fine tuning of the PPS output synchronization.

It's all good fun!
« Last Edit: July 15, 2019, 03:46:52 15:46 by Magnox » Logged
Magnox
Active Member
***
Offline Offline

Posts: 239

Thank You
-Given: 903
-Receive: 261


Oink!


« Reply #6 on: July 16, 2019, 07:05:26 19:05 »

I hate bugs in silicon! It seems the way I was planning to use the PIC to sync the PPS won't quite work because of one definite and one possible bug (or I have a sub standard chip). I'll have to order some other variants to see if they are the same.

Despite that, it's already synchronizing the derived PPS to the GPS PPS to within 10ns, with a jitter measured in ps rather than the GPS's 20+ns. That's about as close as the PIC can get it alone as it is. I need to get that Maxim delay line and figure out a workaround for the bugs in the PIC now.

Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC