Top of the GNSS HAT with the Zhongke ATGM336H module, MMCX and U.FL connectors and PPS LED Bottom of the GNSS HAT with the 2x6 header socket and PPS hole Side view of the GNSS HAT showing the board above the header socket GNSS HAT on a Raspberry Pi 5 alongside an M.2 HAT+ with an NVMe SSD GNSS HAT on an NXP FRDM-IMX8MPLUS with a wire from the PPS hole GNSS HAT on a Radxa Cubie A5E

I designed a GNSS HAT with AI and got it fabricated by JLCPCB. It has been one of the most exciting and interesting experiences I have had with AI.

I am not a hardware person at all. I couldn’t design a basic circuit. I can just about solder on some header pins, but that’s about it.

On the other hand, I have had a lot of experience with using GNSS boards for timing, particularly with SBCs. For my own use, I wanted a HAT that was a bit different from anything out there. Key design goals:

  • dual-band GNSS module: dual-band is what makes the biggest difference to timing performance
  • cheap: the minimum order size is 5, and I didn’t know if it was going to work
  • compatible with a wide range of SBCs: there are lots of SBCs that have 40-pin headers, but are not fully compatible with the HAT specification, in terms of the use of all pins or the available space
  • provides flexibility for the PPS signal: when used with PTP hardware clocks, the PPS signal almost always needs to go somewhere board-specific, which is not pin 12; for example, with the Raspberry Pi CM4/CM5 it needs to go to the SYNC_OUT pin, and in the NXP FRDM-IMX8MPLUS shown above, it needs to go to pin 13

This led me to a design with the following key features:

  • very small in size
    • covers only pins 1-12
    • narrow in width
    • low profile
  • uses only pins 4, 6, 8, 10, 12 (5V, GND, TX, RX, PPS)
  • allows a Dupont header to be soldered on for an extra PPS output
  • GNSS module is the Zhongke Microelectronics ATGM336H-F8N76

The ATGM336H-F8N76 is a relatively recent dual-band model, in the same family as the very widely used ATGM336H-5N series (the same as used by TinyGTC, for example). This family uses the CASIC protocol, but the F8N76 uses a newer protocol version with many new messages. I have implemented this in SatPulse based on the Chinese-language documentation (which I used AI to translate into English). I believe SatPulse is the only open source software that supports this. The design could also work with the u-blox MAX-F10S, which is a dual-band module with similar functionality, but more than 4 times the price.

Key trade-offs I made to enable the small size:

  • no battery: power off means cold start; for an always-on time server, I don’t miss the battery
  • no SMA connector: the board has U.FL and MMCX connectors. A U.FL connector makes sense when the HAT is in an enclosure, and you have a pigtail to a bulkhead SMA connector on the case. However, when there is no enclosure, connecting the antenna cable to a U.FL connector is just too fragile. But an SMA connector would make things much bigger. MMCX is a good compromise, at the cost of requiring a less common cable.

I used Claude Fable to create the design with Codex Astra reviewing. They used KiCad, with Freerouting for routing. The design process was very interesting. I spent several weeks exploring different concepts and seeing what the possible trade-offs were. My role was basically product manager.

JLCPCB SMT assembly preview of a single GNSS HAT in the middle of a 3x3 panel Panel layout with the GNSS HAT between large frame sections

Fabrication with JLCPCB was quite smooth apart from one problem with depanelling. The PCB was two-sided, which meant I needed to use standard rather than economic assembly. With standard assembly and a small PCB, they make a larger PCB and then break off parts to leave you with the size you want. This is called depanelling. (I had no idea that this was a thing before I started.) In this design, the edge-mounted MMCX connector protrudes a millimetre or two beyond the PCB. This is so as to guarantee that there is no possibility, after manufacturing tolerances, that the PCB extends beyond the connector, which would interfere with mating. The first image above shows the panelling that they chose automatically. This would not have worked with a depanelling machine. The second image is the revised scheme that they proposed to address this. My point here is that even if you start from a position of ignorance, if you are curious and pay attention to the details, you can learn and understand.

I am under no illusion that I am a real PCB designer. I still have no understanding at all of many details. However, I do have a basic understanding of the process, whereas before I had none. I have found it fascinating.

I enjoy having coding agents successfully implement a software design, but the thrill of getting back a physical object after a couple of weeks and seeing it work was on another level.

Updated:

Comments