As is often the case, this project was a lot more work than I ever imagined it would be at the beginning. I learned a lot however and the results so far look at least moderately useful. It is certainly not ready for prime time yet however!
ESP32 + FPGA
The combination of an ESP32 board and an FPGA evaluation board is a powerful solution and the development tools for both are exceptional. I use PlatformIO for the ESP32 and as previously discussed the IceStudio open source tools for the Lattice ICE40 FPGAs. I am very happy with both of those.
The iCEstick from Lattice works great and the price is right but since it is really intended to be an evaluation board it is much larger than it needs to be for applications like this and also it needs to be powered via its USB connector.
I have also been using the TinyFPGA board which is a much smaller form factor than the iCEstick and also worked well during my development. If I were going to make a smaller prototype I would definitely use the TinyFPGA or the UPduino board from Gnarly Grey (it is also a small form factor and lower price). I have one but I haven’t had a chance to try it out yet.
I really wish there was a board available that had both an ESP32 and a ICE40 FPGA on it! Or how about an add on “stack” for the M5Stack which could have an ICE40 FPGA and lots of header pins?
Circuit Board Design
In order to design the printed circuit board for my oscillators I had to pick an EDA tool. I chose KiCAD and I have to say it was a challenge to get started but I’m happy with my progress so far. My next board won’t be nearly as difficult to do.
ublox M8
I am really impressed with the ublox M8 series of GPS modules. Very few boards that have these modules on them however have the PPS signal brought out to a pin or connector. All of the ones that I’ve ever used however use the PPS signal to drive an LED to indicate that the module has a position solution available. There will most likely be a resistor between the LED and the PPS signal from the module and I have been able to successfully solder a small wire to the resistor to bring out the signal for use with the ESP32 and FPGA.
For the M8 series of GPS modules ublox provides some functions in their communications protocol to optimize their use for timing applications. In particular they recommend setting the navigation mode to ‘stationary’ and disabling SBAD. I have found that following their recommendations does provide a better result and in particular seems to improve performance while indoors. I haven’t tried to quantify this but it would be easy to do.
ESP32 boards
There are many different ESP32 boards available and the ones with the on-board OLED displays are great for testing. They are also inexpensive however I have found that every time I ordered some at least one was DOA and they are not very easy to package nicely in a prototype. One option is to use an ESP32 board without display and add an OLED externally however I found that the self contained M5Stack was perfect for that.