GPS Device for NTP Servers

I’ve made a few posts over the years about using GPS devices for precision timekeeping for NTP Stratum 1 servers, and recently the topic came up again with some colleagues to potentially build another one.

My previous builds have been based on Raspberry Pi computers, but with the Pis currently being unobtainium, and some recent drama around their foundation, I got to thinking about alternatives for building a Stratum 1.

Of course, you can buy Stratum 1 servers from various vendors, but their prices are much higher than I’m interested in. Likewise you can buy inexpensive off the shelf GPS devices to plug into USB or a serial port, but they often don’t properly expose the precise timing signals required. Mostly for the enjoyment of it, I decided to build a middle-ground device that would connect to either a USB or RS232 serial port, properly expose the timing signals, and pair it with some good documentation on how to set this up with any linux server.

The design, code, and instructions are open source. You can find them on my GitHub repository.

Posted in Electronics, Projects, Technology | Leave a comment

Growing Salt Crystals

I recently read an article about growing salt crystals and was impressed with the quality of growth they were able to achieve. It seemed like an interesting thing to try, and could add to my rocks and minerals collection.

I won’t rehash everything the article talks about, as they go into good detail on the process, but I will add some bits of commentary on my experiences trying it.

You start with boiling some water and adding salt to it until no more will dissolve. I used regular tap water, but I am curious if places with more mineral content in the water might get different results, for me tap water worked fine.

I aimed for a temperature that gave me a very low boil. I didn’t want a big roiling boil, and it really took a lot more salt than I expected. I left it boiling for some time, stirring occasionally, to make sure it really got as much dissolved as possible. The article talks about starting to see crystals forming on the surface of the water, which I saw as well, and was a good indication.

The saturated salt solution was put into a pyrex dish, covered with a lid, and left to sit for a day to stabilize. We expect a bunch of disorderly crystals to form here as the solution cools and equalizes with room temperature. The room temperature water can’t hold as much salt, so crystals start to drop out of solution.

After a day the solution has come to a reasonable equilibrium and we can filter out any crystals and transfer just the liquid solution into a new container.

Now that we have our stable and saturated salt solution, we need to grow some seed crystals.

From here on out, we are controlling crystal growth by controlling evaporation. Temperature plays a role in how much salt the water can carry as well, as we know from the initial boil, but we’re assuming that everything is in a reasonably temperature stable environment. So with the temperature stable, what controls how much salt the water can hold on to, is how much water there is overall. As water evaporates from the solution, there will be left too much salt for the remaining water to hold in solution, and it will have to crystalize out. We control the growth by controlling how fast the water can evaporate.

I used some inexpensive petri dishes from Amazon as my containers for growing my crystals. These petri dishes have three tiny little bumps on the inside of the lid that allow for just the smallest bit of an air gap when the lid is on. This seems to be a good setup for the later growth stage, but here where we’re trying to get a large number of seed crystals to start, we want a bit more evaporation. I just propped up one side of the lid a bit to allow for a little more air exchange.

Within a day or two, I had a large number of tiny seed crystals in this starter dish. Here you’ll need to take some time looking carefully and select a small number of the most perfect ones you can see. Prepare another dish with the salt solution, and place your seed crystal(s) in. Because I was using larger containers than the original article, I did four crystals per dish, rather than the one crystal they describe. They are difficult to see here, but there are four crystals I’ve selected and spaced apart in this dish.

We put the lid on all the way to limit evaporation, and now it’s a waiting game. Keep them undisturbed, and check on them every few days to a week to keep tabs on the progress.

After 5 weeks, I ended up having to move the dishes to make room for another project, and the disturbance seems to have been enough to set off a bunch of new crystal formation. I started seeing new seed crystals forming, as well as non-uniform growth on the larger existing crystals, so I ended this run at 6 weeks.

The crystals were pulled out, blot dried on a paper towel, and left to finish drying overnight. These are complete, ready to handle, and be put on display in my collection.

Overall I’m very impressed with the results. It’s a reasonably straightforward process and is a fun little experiment to end up with very nice large single crystal chunks of salt. It’s also easily approachable for anyone at home with basic kitchen utensils, and could also make for a good science project for a school aged child as well.

If I repeat the process, I would try to improve things by getting the growth dishes into a place where they won’t be disturbed. Additionally all of my crystals have a hollow on the underside where they were flat against the dish and were unable to get fresh solution to them to allow growth. I might also experiment with occasionally turning the crystals over to see if that can be mitigated.

Posted in Projects, Random | Leave a comment

Inexpensive Lightning Arrestor

I’ve recently been working on a project involving GPS, and wanted to find an inexpensive lightning arrestor. It needed to have DC pass through to power the active GPS antenna, it needed to be able to pass the roughly 1.6GHz signals without much attenuation, and I preferred it to have SMA connectors as that’s what’s on the cables I’m using.

I was able to find a few cheap options below $20 on Amazon marketed at WiFi devices, and supposedly specified to 6GHz, which is well higher than I require. For that price point I decided it was worth buying one to test and see if it would work for my application, and I’m pretty pleased with the results.

The device itself looks to be of good quality for the price. It has a machined body and all the surfaces look pretty good. Inside is the center conductor with a notch for the gas discharge tube to press against.

Mechanically this is a real simple device, and looks to have been constructed reasonably well. Though I still needed to measure the RF performance to make sure losses would be acceptable in my application.

Here you can see a pair of thru plots I captured. The first being a larger sweep from 1 to 2000MHz, and the second being a ‘zoomed-in’ sweep of 1550 to 1600MHz covering the GPS L1 frequency at roughly 1575MHz. The 0.0dBm Display Line being the reference line for no loss, and 1dB divisions. In the wider graph, we see the worst case loss being at roughly 0.5dB, and in the more specific sweep, the loss at the GPS L1 frequency looks to be about 0.3dB.

I’m quite pleased with this performance, and at this price point the device seems like a no-brainer choice to use in my projects in locations that require some additional protection.

Posted in Electronics, Ham Radio | Leave a comment

Automatic Transfer Switch

After a recent conversation with a friend regarding some datacenter equipment that had only a single power supply, I was curious about building a simple Automatic Transfer Switch (ATS) that would accept two separate AC inputs, and provide a redundant output.

The simple version of this can be accomplished with a single DPDT relay with a 120V AC coil. Connecting the hot and neutral from the primary input to the normally-open connections, the secondary input to the normally-closed connections, with the common connection feeding to the output. Wire the coil in parallel to the primary input so it will activate the relay and connect the primary input to the output. When the primary fails, the relay deactivates and connects the secondary input to the output.

I tried this simple method to begin with, but found that the particular relay I chose did not switch fast enough (despite the specification sheet claiming it should).

To speak to the speed requirements, computer power supplies are designed to survive a loss of input power for around 16 milliseconds while keeping the system powered, usually called the “hold-up time.” This 16 millisecond timeframe roughly aligns with one cycle of 60Hz power. The oscilloscope capture here shows the time between the cursor where power was lost to the time it switches to the backup is roughly 40 milliseconds, and is far too slow to be effective for most computer equipment.

After this finding I started looking for references in Uninterruptible Power Supplies, as these devices also have to switch power sources in this time frame, as well as reaching out to the manufacturer of the AC relay as to how to achieve the switching times provided in the specifications. The manufacturer responded that the model I had is not capable of meeting the specifications and the spec is based on a model with a 24V DC coil. Similarly the UPS device I looked at used 24V DC coil relays.

Using 24V DC relays complicates the design as it requires a 24V power supply and the electronics to sense the input and trigger the relay. The 24V power supply, sensing circuit, and control for the relays fit on the circuit board along with the input and output connectors, and the relays. In this case, SPDT relays were used, so two relays are required to switch both the hot and neutral lines.

This new design works well and is able to meet the time requirements to switch in less than 16 milliseconds, providing output power from the primary or secondary as available. Here we see the relay switching in roughly 10 milliseconds from the time of the control signal.

Posted in Electronics, Projects, Uncategorized | Leave a comment

Programmable Holiday Lights

I’m far from the only person to use addressable LED strips as holiday lights, so I won’t delve too deeply into the details. The project has been on my mind for a few years, as the annual endeavor to fix/install traditional holiday lights comes around, I’ve wanted to replace old-style lights with addressable RGB LEDs so I could program the lights for any given holiday.

I ended up using three of the WS2815 strips in 5 meter lengths to cover the full length of the eaves of my house. These are 12V strips, and I feed the strips at both ends of each strip. They are controlled by an ESP32 in a weatherproof enclosure at one end of the strips.

I’ve read some reports that a level shifter is required if using a 3.3V microcontroller, but it appears that the strips I have are happy with 3.3V control signals.

I’m using a spare server power supply with a cheap power meter to run the string. I may swap the supply at some point as the fans a louder than I’d like, but otherwise it’s a good reliable power supply.

Now I’ll be able to program different patterns and color schemes for any given holiday without having to physically change out the lights. I’ve already made color schemes for Halloween and Thanksgiving, as well as a firework burst pattern for New Years.

Posted in Electronics, Projects, Technology | Leave a comment