In the first post in the series, we looked at the Garmin 18x LVC “puck”. We talked about a particularly insidious issue that affected [Andrew] – both of his GPS units. And we saw that Oscilloclock owners really need to be able to update the firmware in these units.
In Part 2, we went through the design of an Oscilloclock Garmin 18x USB Adapter, that would allow the GPS to connect to a PC where the Garmin software runs to upgrade the firmware.
Now we conclude the series, with a treatise on the construction of the Adapter. Enjoy!
The final design
Here’s the design we arrived at in the last post. Let’s go through the steps to build it!
Fish out Fake Chips
TTL serial to USB adapter – watch out for fakes!
The key component required is a decent TTL serial to USB adapter with programmable inversion on the signal lines. But here we have to careful: many low-cost adapters out there are built around fake FTDI chips!
As mentioned before, we at Oscilloclock are pacifists. But if we were to wage war against anything, it would be fake components. They are unsafe, unreliable, unworkable, and entirely unethical. You get what you pay for, if you pay the right people. The people who design, manufacture, and support the real McCoy.
Besides ethics and reliability, there is also a practical reason we must avoid adapters based on fake FTDI chips – often the fake chips are not programmable. A true no-no. So watch out.
Program the inversion
FTDI provide a nifty utility called FT_Prog. Below shows the utility running on a PC with the adapter connected, and configuring to invert the transmit (TXD) and receive (RXD) signals.
Is it complicated? No – quite the inverse!
Dividing the input signal
We need to figure out the most elegant way to install the voltage divider – the two resistors we described earlier that reduce the impact of noise.
The cleanest way seemed to be to install the 1.2k shunt resistor directly across the receive and ground pins in the adapter itself, as below.
What about the 270 ohm series resistor on the RXD line? Well, installing this inside the adapter unit itself would require cutting tracks on the PCB. And that would compromise our effort, reliability, and aesthetics goals! So instead, we’ll insert this into the cable later on.
Cable Connector Conundrum
Recall that [Andrew] has two Garmin 18x units – one fitted with a small GPS connector and the other with a large connector. Wiring up two independent cables would have been natural. However, the TTL Serial to USB adapter came with only one cable pre-fitted with the necessary “DuPont” (a.k.a. Qi or 2550) connector.
What’s the big deal? Surely we can just attach a Qi connector to another cable?
Ha! Connector tech is never that easy! It turns out that to make a perfect connection with Qi connectors, you need a special crimping tool. The Oscilloclock Lab does not have this tool. And we do NOT compromise on perfection! Given that this adapter is not the best reason to invest in an incredibly expensive tool, we decided to use the single pre-fitted cable and split out to two GPS connectors, with the larger one serving as the split point.
(In hindsight, we could have separately purchased another quality cable that was pre-fitted with the connector. Next time, folks!)
Wire up the cable
Our beloved ultra-quality Hirose connectors are a joy to look at, and a joy to use. But wiring the tiny smaller units up with high precision doesn’t exactly “spark joy”. Still, we persevere…
Now we need to install the 270 ohm series resistor. We simply cut the wire and splice it in.
A bit more heatshrink applied, and we’re done!
Closure at last
Using the 18x USB adapter, [Andrew] is at last able to upgrade his pucks and enjoy his clocks in their full glory with GPS-synchronized time and date once again!
Instructions for how to upgrade the software are posted on the Support – Garmin 18x page.
Did you enjoy this series? Stay tuned for more, as Oscillolife returns to nor….. Okay, not quite normal, but at least it returns!
In the previous post, we looked at the Garmin 18x LVC “puck”. We talked about a particularly insidious issue that affected [Andrew] – both of his GPS units. And we saw that Oscilloclock owners really need to be able to update the firmware in these units.
We introduced the Oscilloclock Garmin 18x USB Adapter, that allows an Oscilloclock owner to connect their puck to a PC to enable the firmware upgrade.
In this post, we’ll take a look at the design of the Oscilloclock Garmin 18x USB Adapter. It wasn’t GPS satellite launcher (a.k.a. ‘rocket’) science, but it certainly wasn’t as straightforward as it might seem!
The Garmin 18x LVC electrical interface
Referencing the manual, the Garmin 18x series comes in 3 basic interface variations:
USB – USB 1.x interface, with a USB(-A) connector to plug into a PC
PC – RS-232 serial interface*, with a DB9 connector to plug into a PC, and a massive cigarette lighter adapter plug to obtain power
LVC – RS-232 serial interface*, with no connector – for wiring into a device
18x USB18x PC18x LVC
For our Oscilloclocks, we use the LVC variation and fit an attractive custom connector solution, avoiding the PC variation with its venerable, utilitarian, and aesthetically unpleasant DB-9 connector and cigarette lighter plug combo. (We may buck the trend one day and intentionally fit such sockets into that special retro clock build – who knows?!)
* Astute readers noticed the earlier asterisks. PC and LVC units are not quite true RS-232; their output voltage swings between 0V and +5V. Not so with devices having true RS-232 interfaces! A swing from -25V to +25V is legal and also lethal for any unsuspecting microcontroller. In the Oscilloclock design, we take advantage of Garmin’s voltage range cap to avoid having additional circuitry to adjust voltage levels.
Interfacing the 18x LVC to a PC
To upgrade the GPS firmware, the 18x LVC needs to connect nicely to a PC. But [Andrew] is an Oscilloclock Owner. He deserves more than just a good electrical connection. The interface also must be elegant and aesthetically pleasing, lightweight (for shipping), and easy to build. And – most of all – it has to be interesting enough to write a blog series about!
We can start with Figure 1 in the manual, which describes the most basic interface hook-up possible.
This interconnection option assumes two things: the PC has a DB-9 serial port, and there is a power source.
If we extend this option slightly, to take power from the PC’s USB port, we arrive at this:
Design 1. Dead simple.
But who has a PC with a serial port in this day and age? Fortunately, there are plenty of RS232 Serial-to-USB converters out there – cheap and reliable! And we arrive at this:
Design 2. Introduce an off the shelf serial-USB adapter, and we can use a modern PC…
Electrically, this is fine and dandy. And the build cost is not too bad. But it’s not so elegant. We can do so much more! First, we can get rid of the 2nd USB connector, by hacking into the serial-USB adapter, and tapping the power out from there:
Design 3. Butchering the serial-USB connector to pull out power.
A lovely example of a butchered adapter!
While this solves the problem of the power, it’s NOT elegant, NOT pleasant to look at, and NOT really reliable.
Oscilloclock owners should not own junk, regardless of how ‘clever’ the solution is.
What we really want is an RS232 to USB adapter unit that provides both power and signal right out of the box. No hacking!
Design 4. Does such a RS232 to USB adapter exist? No…
Sadly, there are no off the shelf RS232 to USB adapters that don’t have a DB9 socket embedded in them. We’d have to hack. Or, we could design our own elegant unit, from the PCB on up. (We’re good at that, but it would be a large effort to go to…)
A new idea – TTL Serial!
Is there another option? Well, in the past decade or two, TTL serial, another type of serial interface standard, has come into very common use. There are heaps of TTL serial to USB adapters on the market, and none of them have large clunky DB9 sockets built in!
It turns out the TTL serial electrical interface is similar to RS-232serial, with two differences:
TTL serial sports microcontroller-friendly voltage levels – i.e. between 0V and a capped upper limit such as 3.3V or 5V.
TTL serial uses intuitive signal polarity. A ‘low’ is represented by a low voltage, near 0V. In RS-232, however signals are inverted – ‘low’ is a +ve voltage, and ‘high’ is a -ve voltage.
On the first point, recall from an earlier footnote that the 18x LVC’s voltage swing is from 0 to supply voltage. This is actually in line with TTL serial. Nice!
But the second point is almost certainly why Garmin explicitly mention “RS-232 polarity” in the GPS 18x manual. They don’t want anyone using the 18x LVC to get it wrong:
Since the 18x LVC features RS-232 polarity signals, we design around this. For example, the Oscilloclock Control Board features inverters on the receive and transmit lines, to allow the microcontrollers to process the signals as if there were TTL serial:
Hey, wait a minute – if the 18x LVC is pretty much TTL serial compatible from a voltage standpoint, and it’s just a matter of signal inversion, then we could use one of many TTL serial to USB adapters on the market! Some of them look very pleasant indeed. We would just need to invert the signals. And thus we have the next design:
Design 5. TTL serial adapter approach gets rid of the nasty DB9 connector, but require inversion!
Programmable Inversion
Doing just a little bit more research, it turns out that many of the common TTL serial to USB adapters on the market use a chip from FTDI, a company that specialises in USB bridging (interfacing) solutions. And the great news here is that FTDI chips support programmable inversion. We can eliminate the extra hardware needed to invert the signals!
Design 6. Brilliant! Off the shelf, got power, AND inverts signals! Just what we need!
FTDI provides a nifty app to program these inversion settings. We’ll see it in action soon.
CMOS vs TTL, and noisy signals
We noted earlier that the Garmin 18x LVC output swings between 0 and 5V. This is the same voltage range that TTL serial expects. All good, right? No, there is a slight difference that we may need to account for, to make the interface reliable.
The LVC has a CMOS output, while the FTDI chips have a TTL input. These acronyms describe the circuit configuration inside logic gates, and they differ in terms of the voltage ranges that logic gates deem acceptable when interpreting “low” vs. “high” signal levels.
There is an excellent writeup here that explains the difference in signal voltage levels in detail. The article explains that in an ideal world, connecting a CMOS output directly to a TTL input is not an issue. But our world is not ideal, and in our case we have a problem: TTL inputs are not very tolerant to noise compared to CMOS inputs.
And in reality, the LVC’s output signal is noisy! There are many possible factors:
The 5m-long cable may be lossy
The 5m-long cable may be picking up stray signals (like an antenna)
The LVC designers probably expected us to process signals with an RS232 interface or directly connect to a microcontroller – both having (less noise-sensitive) CMOS inputs
I’ll spare you an oscilloscope screenshot, but the concept is illustrated to the extreme in this figure. The actual voltage (in green) has AC noise superimposed, and is not even able to keep up with the small burst in the middle.
Probably the most serious ramification of this for us is that the voltage can actually exceed 5V. This is a big no-no for standard 5V TTL logic, where (unlike CMOS) the maximum input is a strict 5V. Behaviour is undefined or erratic above that level.
There are some impressive ways out there to solve this – for example, introducing a CMOS buffer right in front of the TTL gate. But our goal is to keep it simple yet reliable. How about a simple resistive voltage divider?
Design 7. Reducing noise impact on the TTL input with a resistive voltage divider
This reduces the risk of exceeding 5V by dropping the input voltage by about 20%. It also subdues stray signals picked up by the cable, by decreasing the input impedance.
One last improvement, anyone?
If we really want to go for aesthetics and elegance, we could tear apart the TTL serial to UBS adapter, and house it into a stunning custom case of our own design. And this would allow us to install a Hirose receptacle into the case, that the GPS can simply plug into directly! How cool would this be?
Design 8. Add a custom case. Blow everyone’s minds… but also blow the budget!
Unfortunately, this compromises our goal of making the solution easy to build and low in parts cost. After all, why design an adapter that costs almost as much as the actual GPS unit we’re trying to program?! So we’ll forgo this design.
We have a winner – Design 7!
To be continued… Don’t miss the final episode, where we build the adapter!
A few months ago, [Andrew] – of Metropolis Clock fame – reached out for help. He had just pulled his lovely Oscilloclocks out of storage to put on display, when he observed odd behaviour in both units: the time was accurate, but the date was stuck – to some random date back in 2003!
What on earth was going on?
What’s going on was not “on Earth” after all! [Andrew]’s clocks synchronise time and date against satellites, using an external Garmin GPS unit. And this unit happened to have a serious flaw. In this series of three articles, we’ll look closer at this accessory, identify this issue, and see how we were able to resolve it. Enjoy!
Our longevity dream
We want your Oscilloclock up and running as long as you are – and even beyond! Our dream is to see these beloved devices inherited by loved ones, and even available on the second-hand market as antiques one day.
In an era of throw-away technology, we flaunt an unthinkable target: Decades of trouble-free* operation.
* Excluding the CRT itself – although we really try hard with that as well, as this post explains!
To maximise usable lifetime (and safety!), we construct Oscilloclock units from the finest materials and components available. As part of this, we also select manufacturers that guarantee their components and provide decent after-sales support.
And Garmin is one such manufacturer…
Welcome to the Garmin GPS ‘Puck’
All Oscilloclock models that synchronise time using an external GPS unit have so far been supplied with a Garmin 18x LVC GPS unit, colloquially known as a ‘puck‘. (Note: to extend the lifetime of the pucks, we do not recommend using them on the hockey court.)
Now, this is not the smallest external GPS unit on the market today. But it has been available from Garmin since 2007, and is even being manufactured today! It is one of the most sensitive, robust, and well-supported units out there.
(Of course, for every new Oscilloclock delivered we evaluate afresh based on the latest devices available.)
This puck has a special connector …
How many times have you relegated an expensive laptop, phone, or other random device to the trash just because the power socket or headphone jack failed? Some of the weakest components of any electrical device are its connectors – plugs and sockets.
To combat such failures, your puck is wired with an exceptionally high quality connector from Hirose. This connectivity solution is not only robust, it even feels good! There’s a lovely audible and tactile ‘click’ when you engage the plug, and it locks securely in place. And unlike cheap chrome-plated connectors, we’ve proven that these babies do NOT corrode, even after a decade.
-- We don't scrimp - we only crimp!
A particularly insidious flaw!
No component or accessory of an Oscilloclock is perfectly future-proofed and completely immune to design flaws, software bugs, or unforeseen changes in global infrastructure.
The Garmin 18x is no exception, and there have been regular firmware updates through its lifetime so far, documented at Garmin’s Uploads & Downloads Page.
A particularly insidious issue occurred in 2019, when some older 18x devices could not handle the GPS Week Number Rollover, when a counter from the year 1980 reached its limit and reset to 0. (Remind anyone of Year 2000?)
A notice to update firmware in affected devices. Garmin released the full statement here.
This was the cause of the issue that [Andrew] observed!
This issue was particularly annoying because it affected only the date, not the time. An Oscilloclock owner could not turn off only the date synchronisation, so turning off the entire automated sync feature was the only way to be able to (manually) set a correct time.
Oscilloclock GPS and time configuration screens – GPS is either On and Off, for both date and time [Andrew] left GPS turned On, and valiantly tried to set just the date manually… but to no avail!
But… How do you update the Garmin 18x?
In some cases, like [Andrew]’s, a puck really needs a firmware update. But some Oscilloclock owners just want to keep their gear up to date. How? There are two ways:
They can send the puck back to the Oscilloclock lab for a free upgrade. We only charge for the return shipping! But in these days of reduced shipping options, the journey can be pricy.
Owners can obtain an optional Oscilloclock Garmin 18x USB Adapter. Plug the puck into a PC, download the latest firmware, and update it themselves – whenever they wish! This is especially useful for [Andrew], who has more than one puck. (We just love folks who purchase multiple Oscilloclocks!)
Enter the Oscilloclock Garmin 18x USB Adapter
The Oscilloclock Garmin 18x USB Adapter consists of a specially-programmed USB-to-serial interface unit and a custom adaptor cable with a jack that matches the connector on the GPS puck.
This particular cable features two connector styles to suit [Andrew]’s Oscilloclock models
If you have this adapter already and you’re looking for detailed usage instructions, let the Support -> Garmin 18x Puck page quench your thirst!
To be continued… In the next episode, wego through the design of the adapter!