(More Info) |
This page describes a low cost Thunderbolt monitor kit based on the original, widely deployed and shamelessly copied Thunderbolt Monitor described on this site.
Picture 1: the new STM32 based kit
The PWB is 3.8" (96.5mm) by 2.2" (56mm), about 10% smaller in height than the previous version of the kit.
There are 5 LEDs on the board. Two are used to indicate Minor and Major alarms from the Thunderbolt respectively. Another is used to indicate when the optional WiFi module is linked to your router, and another indicates when data is coming from the WiFi module. The last one is a power/heartbeat indicator, blinking at the once per second rate of the incoming data packets from the Thunderbolt.
The firmware includes in the menu the capability to select an epoch number to deal with the GPS Week Rollover issue. Every 19.6 years or so, you will have to bump the setting by one... This is not automated. The kit can be configured to give you an alarm in advance.
The pulse stretcher, useful for those wanting to use NTP is still there, now able to work from higher impedance sources (the original kit only worked with the very low output impedance of the Thunderbolt's PPS output).
By using a 32 bit ARM processor (an upgrade from the 8 bit 8051 of the previous kits), double precision floating point math becomes available so the kit can display the latitude and longitude as provided by the Thunderbolt receiver.
As a prototype feature, and taking advantage of the new found horsepower of the ARM chip the kit will let you display Sidereal time, using longitude information obtained from the Thunderbolt. The clock matches what I get from http://www.jgiesen.de/astro/astroJS/siderealClock/ but I have not yet verified that it works in all unusual cases so I do not guarantee it. Consider it a preview. The Sidereal time display is still clocked by the GPS seconds, so it displays sidereal time with fractional seconds at the time of the GPS receiver's second tick. Actually displaying changing seconds on Sidereal time (and outputting a Sidereal second tick) is a little more difficult so that will have to wait for a future software update.
Note that sidereal time display uses longitude information from the Thunderbolt. If the longitude fluctuates, sidereal time will fluctuate as well. To reduce noise, the longitude value used for sidereal time calculations is averaged 10 times. If that is not sufficient for your application, the best solution is to make sure your antenna is getting a good signal. There is only so much that we can do in software to compensate for poor antenna location.
I also offer a WiFi module as an option for $25. This is not the common ESP8266 module which has too many limitations in its current iteration. The module I selected has a full TCP/IP stack and supports SoftAP setup.The interfacing of the WiFi module and the microcontroller has been changed (see this page) to eliminate a nasty bug that showed up on some kits of the previous generation when the WiFi module was connected to another computer running Lady Heather. I have been running two kits (one of the older kits with the WiFi mod shown above and the new ARM based kit which uses the same interfacing) with WiFi connected through Lady Heather for over a month without issue. You can test it yourself by pointing Lady Heather to ko4bb.ddnsfree.com:45000. Only 3 simultaneous connections are available and I typically use one, so you may not always be able to connect.
I also developed a free Android app that can be used with the TBMon kit + WiFi option to monitor your Thunderbolt. See it at: Thunderbolt Monitor Android app. The app is currently available in Google's Play Store under the name TBMon (sorry, no iOS version).
In spite of the changes and inflation, the price for the basic module (no WiFi) remains at $80 + shipping. Shipping is $9.95 for delivery via USPS with insurance anywhere in the continental United States, $24.95 without insurance for delivery to Canada.
International shipping is no longer available. The Postal Service has returned the last 2 kits without clear explanations as to why.
The WiFi option allows the Thunderbolt Kit to become a server compatible with the Lady Heather Thunderbolt Monitor software and the app described here. It consists of a small PWB that is soldered on the back of the main PWB.
Picture 2: The WiFi module on the back of the main board
The WiFi module comes with a coaxial connector (type U.fl) and a small antenna that can be installed inside or outside a plastic enclosure (Figure 2a). If you want to mount the kit inside a metal enclosure, I recommend using an antenna better suited like the one shown in figure 2b usually available on eBay.
Picture 2a: The WiFi module with its antenna
Figure 2b: a WiFi antenna suitable for metal enclosures
Picture 3: LadyHeather monitoring my Thunderbolt via WiFi
The WiFi option has otherwise no effect on the kit's operation, which can still be used to monitor the Thunderbolt via its LCD and menu while the server is running.
The WiFi module can be operated with a fixed (static) IP address or with an IP address obtained via DHCP (the default for most home networks but not the most convenient in that application).
The WiFi module comes with a small PWB antenna and a ~4-6" coax cable which plugs into the WiFi module with a U.FL connector. The antenna can be easily replaced with a chassis mounted dipole of the type widely available on eBay and other places which allows mounting the TBolt kit inside a metal enclosure while keeping the WiFi functionality.
Aside from the method to obtain an IP address, the WiFi module has to be configured with the SSID and passphrase setup in your WiFi access point or router. The WiFi module is configured through the SoftAP feature. You only need a PC or tablet with WiFi to configure the WiFi module. The WiFi manual has instructions to walk you through the process.
The User Manual for the current firmware version is available here. There is a separate section for the WiFi module setup available here.
The schematic is shown in Picture 4.
Picture4: Schematic of the Thunderbolt Monitor kit version 5.1
Here are waveforms from the PPS extender:
Picture 5: The PPS from the Thunderbolt is the yellow trace (the pulse is about 10μS wide, it would not be visible on an analog scope at that time scale),
The purple trace is the voltage across the capacitor.
The blue trace is the output from the first stage of the MAX232.
The actual pulse from the production kit is a little narrower, around 1mS, still more than enough for NTP.
Picture 6: The leading edge detail showing the ~2µS delay between Thunderbolt PPS output (yellow trace) and RS-232 output (blue trace). Note that faster response is not necessary since this pulse will drive an RS-232 receiver in the computer, with similar characteristics.
Please note that only the leading edge of the output of the PPS Extender should be used for timing application as the pulse width is not well controlled (temperature dependant).
The pulse extender circuit is protected against PPS voltages as high as Vin + 5V and as low as ground. Exceeding these voltages may damage Q1.
The kit ships with a 2x16 blue LCD display as shown in Picture 1.
The interface is the standard Hitachi HD44780, which means many other types of displays can be used, including larger LCDs or Vacuum Fluorescent Displays (VFDs) like the one shown in Picture 7.
Picture 7: VFD Display, Manufacturer: Noritake, Part Number: CU16025-UW6J
The Noritake part shown in Picture 7 above is an almost exact fit for the stock LCD display, only the mounting holes are just a little too small for the (metric) mounting hardware coming with the kit, so you may have to file the holes on the display or use different hardware.
However, not all HD44780 compatible displays have compatible dimensions or the physical layout of the connector may vary. Therefore if using a different display, you may have to wire it to the board instead of simply plugging it in.
A compatible header type is the Samtec TSW series, like the TSW-150-07-T-S (available from Digikey and a number of other distributors.)
Finally, power requirements may vary. See the User Manual for further information.
To drive high current loads from the alarm outputs, or to provide isolation, I recommend using inexpensive relay modules like those shown in Picture 8, available on eBay. Simply search eBay for "relay module". Preferably power the relay board from a separate supply rather than use the kit's 5V regulated output.
Picture 8: an inexpensive relay module
The new microcontroller has extra serial ports (UARTs). One is routed to the port labelled UART/GPS. It is currently unassigned but if someone can come with a good use for it, such as outputting selected data from the Thunderbolt in a format more convenient for data logging, I would be interested to know. Use the email link at the bottom of the page for suggestions. One application I have in mind is connecting a standard GPS module outputting NMEA data sentences and using it as a cheaper satellite driven clock. If you just need a fraction of a second accurate clock but don't need the PPS or 10MHz output of the Thunderbolt, that could be a useful alternative.
The GPS system has few flaws. The week rollover is one of them. From the Trimble Thunderbolt manual:
This field represents the current GPS week number. GPS week number 0 started on January 6, 1980. Unfortunately, the GPS system has allotted only 10-bits of information to carry the GPS week number and therefore it rolls-over to 0 in just 1024 weeks (19.6 years,) and there is no mechanism built into GPS to tell the user to which 1024 week epoch the week number refers. The first week number roll-over will occur as August 21, 1999 (GPS) transitions to August 22, 1999 (GPS). The ThunderBolt adjusts for this week rollover by adding 1024 to any week number reported by GPS which is less than week number 936 which began on December 14, 1997. With this technique, the ThunderBolt will provide an accurate translation of GPS week number and TOW to time and date until July 30, 2017.
There is no fool proof way to automatically correct the wrongful information, unless you have another independent source of accurate timing. Since that is usually not the case for a small system like the TB Monitor kit, we have to come up with a manual patch.
The TB Monitor firmware version 4.2.0 and up has been upgraded by providing a new menu entry allowing you to select the epoch number applied to correct the date coming from the Thunderbolt. By choice, this correction only applies to the time displayed on the LCD display. If you are using the WiFi option, the data stream from the Thunderbolt will be unaffected. The reason being that the GPS data stream coming from the Thunderbolt simply has no provision for the extra epoch information. The majority of the GPS satellites currently in orbit do not send that information either. The good news is that any software that will use the WiFi data (like Lady Heather or my own app), most likely will already have a correction routine since this software has access to the current approximate date/time through the computer's operating system.
New firmware versions ares available for the older kits.
On occasion, bugs are identified or new features are added. The microcontroller used in the TBMonitor kit is an STM32F103C8, a very common part that is well supported by its manufacturer, ST Micro and a host of 3rd party vendors.
In order to update the firmware, you will need an ST-LINK device or compatible. These are available for just a few $US, shipping included from AliExpress.com, search for "ST-LINK v2". Here is an example (I do not vouch for any particular seller, there are many of them and they all sell the same part apparently):
You will also need the ST Micro Visual Programmer software that can be downloaded from their web site (you may need to register):
https://www.st.com/en/development-tools/stvp-stm32.html
Here are the connections between the ST-LINK device and the kit (follow the color code):
Finally you will need the firmware itself, which I will make available upon request to those who have bought the kit.
Note that you do not need to power the kit while programming it, it will get power through the ST-LINK device. However, the LCD display will not come up (the backlight will turn on but the LCD will not be visible). If you prefer, you can apply the external 5-9V to the kit.
In the ST Micro Visual Programmer software, open the hex file that contains the new code and click Program->Active Sectors. After a few seconds, the kit will boot the new firmware.
The kit's software includes Modified Julian Date conversion routines from Tom VanBaak's web site, LeapSecond.com. Tom also gratiously helped debug the Sidereal conversion routine.
Dan Karg provided valuable bug fixes in an earlier version of this project that have been mostly carried over. Thank you!