Search results

  1. D

    Teensy 4.1 NTP server

    That's a nice graph, low amounts of short term change as well.
  2. D

    Teensy 4.1 NTP server

    Yup, that's jq. On windows, you can use powershell like this: PS C:\Users\abob\Downloads> (Invoke-RestMethod http://teensy-1.lan/state.json).pidD 0.000010007 Or if you want to still use jq: PS C:\Users\abob\Downloads> (Invoke-WebRequest http://teensy-1.lan/state.json).Content |...
  3. D

    Teensy 4.1 NTP server

    jq is a very useful command line tool
  4. D

    Teensy 4.1 NTP server

    The stats are all exported via json at /state.json: https://github.com/ddrown/teensy-ntp/blob/master/WebContent.cpp an example using the commands curl and jq: $ curl -s http://teensy-1.lan/state.json | jq .pidD 0.000010005 you could also do this with python
  5. D

    Teensy 4.1 NTP server

    Yeah, I'm also using the magnetic-mount antennas on a windowsill. LeoNTP is another low cost NTP server, and I've seen some good results from other people's tests of them. Yup, NTP client will meet most everyone's needs these days. Of course, those NTP clients need to get time from...
  6. D

    Teensy 4.1 NTP server

    Those are some good GPS signals Interesting that .65 claims a round trip time of 59 microseconds. I wonder if it's lying about the transmit time on the response. The RPIs and the Teensy seem to agree to the time within 100 microseconds and were all polled at around a minute of each other...
  7. D

    Teensy 4.1 NTP server

    Yeah, from my study of the GPS modules I have, I haven't seen much value from the reported dop in terms of measuring time quality. Using a different timer is a tradeoff between getting a faster timebase to make measurements in but you lose the ability to use the same timebase that your network...
  8. D

    Teensy 4.1 NTP server

    Ok, updated the code with the *dop data: GPS pdop=1.8, hdop=1.5, vdop=0.9
  9. D

    Teensy 4.1 NTP server

    Wow, you have a very strong signal there. It should be easy to pull HDOP out of GSA, it's already parsing that message.
  10. D

    Teensy 4.1 NTP server

    Building on the JSON data, I added a webpage that will poll /state.json and build graphs. You can reach the web page by putting your teensy's IP address in your web browser. As well as general stats: PPS To GPS: 405 ms millis() at PPS: 902.225 millis() at GPS Timestamp: 903689 millis()...
  11. D

    Teensy 4.1 NTP server

    I've added a webserver to the code to make it easier to get data from the NTP server. /state.json from the teensy returns the following structure: { "ppsToGPS": 396, // milliseconds between PPS timestamp and GPS's uart message showing the date "ppsMillis": 177223, // local millis() counter...
  12. D

    Teensy 4.1 NTP server

    That's interesting, the teensy should be more than able to keep up with an iburst. PPS would be able to tell you a lot at a glance Some other ideas for LED indication: * offset between local clock and GPS under a threshold (say 100ns) * GPS in 3D lock * GPS has >3 satellites with >20db SNR *...
  13. D

    Teensy 4.1 NTP server

    Excellent, glad to hear it is working for you. Those are low delay and jitter numbers, I like to see that.
  14. D

    Teensy 4.1 NTP server

    You're correct, I've updated that example.
  15. D

    Teensy 4.1 NTP server

    My two have a tempco of 0.154ppm/C and 0.206ppm/C, so that fits with your 0.195ppm/C. Wander being 0.005 ppm in an hour is pretty impressive.
  16. D

    Teensy 4.1 NTP server

    Nice! Good idea with the cinderblock, that should add a lot of thermal mass
  17. D

    Teensy 4.1 NTP server

    I'm curious why you assume the frequency changes are coming from the GPSDO and not from the Teensy's crystal. Could you explain why you suspect the one but not the other?
  18. D

    Teensy 4.1 NTP server

    chisquare values are in counts (25MHz) so 42.9 counts = 1.7us. Those values look reasonable to me. I'm considering dropping old samples when the chisq value is high. This usually happens when the local clock is changing frequencies quickly. For instance, when this dropped from 8600ppb to...
  19. D

    Teensy 4.1 NTP server

    This code is only built as an NTP (not PTP) server. But I do have different code for the esp8266: https://github.com/ddrown/esp8266-clock It uses an NTP client to keep the local clock in sync, and displays the time on a SPI based display. Wifi has a lot of extra latency and jitter, but I was...
  20. D

    Teensy 4.1 NTP server

    I let this run for 5 days, and these are interesting results. I have two different Teensy 4.1 boards running this code. Temperature vs frequency over 256 second intervals: Just using a linear fit gives a pretty good result for this temperature range. If the room these are in had a larger...
  21. D

    Teensy 4.1 NTP server

    I've added this line to updateTime: Serial.printf("PPS: %u %u %.2f\r\n", gpstime, lastPPS, tempmonGetTemp()); I've collected this type of data in the past for other crystals, so I'd like to redo the plots below for the teensy: 32khz RTC crystal: 12MHz TCXO:
  22. D

    Teensy 4.1 NTP server

    That looks good, thanks for trying it out!
  23. D

    Teensy 4.1 NTP server

    Sure, the short term phase noise from the crystal will be much lower than the GPS. But I think what is causing the larger offsets are the frequency change due to temperature changes. It would be worth testing covering the teensy's crystal to lower the convection. Looks like it normally wanders...
  24. D

    Teensy 4.1 NTP server

    The phase offsets happen at the same time as the frequency changes, which has me thinking that my synchronization code needs some tweaking. I suspect PPS from a GPSDO wouldn't change much unless the system clock also came from the GPSDO.
  25. D

    Teensy 4.1 NTP server

    The RMC message taking more than 1s would generate those lag error messages. The LAG messages can also be caused by no pps due to signal lock loss. I'm surprised you're getting B (bad time) though. Is your GPS module resetting itself somehow?
  26. D

    Teensy 4.1 NTP server

    Yes, I'm using the firmware defaults for the adafruit GPS, which is 9600 and no ZDA message. I'm also using an external antenna on a windowsill. Without an external antenna, I get bad reception. Yeah, 300ms ish is pretty typical. As long as it is within 950ms, this code will accept it. I...
  27. D

    Teensy 4.1 NTP server

    I setup a second teensy with an Adafruit GPS. I added the GPS_USES_RMC define to settings.h to support it. Originally I took the timestamp of the GPRMC message, but it would often be delayed into the next second, which caused the software to think the clock was off by 1s. So now it's taking...
  28. D

    Teensy 4.1 NTP server

    The columns from that output: T41 raw counter value at PPS (25MHz) seconds offset between GPS PPS and virtual T41 clock (which is the first graph). The third graph is the measurement over the network, which will combine that offset with the network measurement noise frequency measurement in...
  29. D

    Teensy 4.1 NTP server

    I wanted to use the teensy_loader_cli but the soft reboot option wasn't working for me. I didn't dig very far into why it wasn't working, but I put together a workaround. If you send the character "r" to the serial, the teensy reboots into the bootloader. static void bootloader_poll() {...
  30. D

    Teensy 4.1 NTP server

    I ported the embedded NTP stratum 1 server that I originally wrote for the stm32f407. It uses the 1588 ethernet hardware for RX and TX timestamps. I'm also using the 1588 event input capture to measure the reference PPS in hardware. My first task was to get the clock synchronized with my...
  31. D

    Teensy 4.1 Ethernet and bandwidth delay product

    I went the osh park + digikey route to get an Ethernet connector for the Teensy 4.1, and I can report that it does work that way :) After getting the lwip_iperf example working, I had to tune lwip for maximum performance. I thought I should document that in a thread. First run, I got 68Mbit/s...
  32. D

    Teensy 4.1 Pinout

    Looks good, thank you!
  33. D

    Teensy 4.1 Pinout

    I just noticed this too. D2 is EMC_25 and D1 is EMC_28, which are also on the schematic.
  34. D

    sending USB HID page 0xC key codes above 0xFF

    When sending to a windows machine, the bit-mapped keys above 0xFF (Search and Home in my case) work, but the bytecode ones (range 0x0-0xFF) do not work under windows (volume, play/pause/stop/ff/rev/skip) It works under Android, however.
  35. D

    sending USB HID page 0xC key codes above 0xFF

    Hello! I have a Teensy 2 using the Arduino environment. I want to use it to send key codes to an Android device. Specifically, I want to send keycode 0x223 (Android calls it KEYCODE_HOME) under the Consumer page (0xC). I also want to send a bunch of other keycodes under the consumer page. I...
Back
Top