Announcement

Collapse
No announcement yet.

GPS with PPS mod for NTP Timeserver DIY

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GPS with PPS mod for NTP Timeserver DIY

    Just a quickie note relating to utilizing a GPS for NTP.

    Note that utilizing a GPS without using PPS is still providing more accurate NTP time sync than using the internet.

    Over the last few years I have used a dedicated NTP server as an internal time base.

    Recently migrated firewall over to PFsense and decided to move GPS over to the firewall such that it is the NTP server.

    The GPS I utilized for said is the Sure Electronics MB-CM12118.

    It is $34.90. It comes with a USB cable for power and GPS antenna.

    http://www.sureelectronics.net/goods.php?id=99



    I modified it for PPS putting the pulse on DCD (Pin #1 of the RS-232 interface).

    The DIY for two means of utilizing PPS is here:

    http://www.satsignal.eu/ntp/Sure-GPS.htm

    The GPS is mounted on an attic rafter next to the GPS antenna. Gets 8-12 GPS satellites in about 10-15 seconds. I utilize an RS-232 to Cat5e cable with a connection to the firewall in the basement. The cat5e run is some 75-100 feet.

    Recently a PFSense user modified the GPS / NTP configurations to provide a bit more granularity for configuration of the GPS and said use for NTP.

    I purchased this board a few years back and it worked fine (without the PPS adjustment) until one day it just quit working. I had a close look at it last week and noticed that the mini power USB port was falling off. That said I wired a new power port. It still didn't work; as the 3.3VDC led wasn't lit. I baked the board in the oven at some 485 F for about 5 minutes and it came back to life. Note that the circuit board baking is a last ditch effort, very low WAF. You have to vent the area while doing this relating to the toxic fumes. You also have to "protect" the pieces on the main board with bits of aluminum foil and not preheat oven; but rather start with the circuit board in the oven. I personally didn't protect a new USB power cable enough. It melted and I had to desolder and install a new one.

    You can also make your wintel HS3 server your time base by using Tardis and configuring it at 9600 baud with DCD/PPS.

    http://www.kaska.demon.co.uk/

    Ideally you want to wire the RS-232 port directly to the Homeseer server. I did test the connection using a Quatech serial server.

    PPS modification I used:

    1 - Wired PPS from RS-232 Pin #1 to TP-9.
    2 - Tested for PPS on DCD using the following application - tested with a Quatech serial port configuration before connecting it to the PFSense firewall.

    The purpose of the patches is to provide a true RS-232 level PPS signal on pin 1 (DCD line) of the connector. Whilst the PPS signal on test point TP9 could be used, it is at CMOS level and not RS-232 level, and may not be recognised correctly by the RS-232 receiver chip in your PC. You can try it if you like, of course. I have provided a Serial Port LEDs program to show the status of the RS-232 control lines. Fortunately, there is an unused CMOS-to-RS-232 level converter gate available in U6, with its input on pin 11 and its output on pin 14. However, as this is an inverting gate, and we want a positive going PPS signal, it should be driven with a negative going PPS signal. That available at TP9 is positive going, however it is also used to drive the ridiculously bright blue LED through a CMOS inverter gate in U5, so by taking the output from that inverter on pin 8 of U5 we have the required negative-going PPS signal to drive U6.
    One person has reported that he has obtained satisfactory results connecting the TTL-level positive-going signal on TP9 directly to pin 1 (DCD) of the RS-232 connector. This may be easier if your soldering abilities are not as good as you wish, as the connection points are larger and easier to solder to. This does work with the serial ports on many PCs, but may result in a lower protection against electrical noise if you have a long lead from the Sure board to your PC. A couple of metres lead length should be fine for this method, but possibly not an 80 metre run near interference sources such as electrical machinery - i.e. anything with power switches or motors. Try it and see, but use at your own risk.
    Simple program to show the state of the serial port LEDs. Intended for watching the pulses on the DCD line from a pulse-per-second GPS used for NTP.
    Please note: If you are using Windows for NTP with a PPS signal, the DCD line must flash briefly on, not be mostly on flashing briefly off as inverting the PPS signal is not supported by the Windows NTP port.


    http://www.satsignal.eu/software/SerialPortLEDs.zip

    The additions for PFSense are here:

    http://forum.pfsense.org/index.php/topic,67189.0.html

    BTW I have left the GPS board in the attic on a beam tacked on with a drywall screw and the GPS antenna is on the top of the beam next to the GPS board. It is not in any sort of enclosure.
    Attached Files
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
    Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

  • #2
    Just a graph relating to syncing on newest setup.

    This got me to look at the carpc clock stuff as the carpc autosyncs the car clock when it boots up.

    Initially looked at the messages on the bus from the built in GSM phone stuff (emergency call stuff), GPS and the satellite radio that is built in.

    Looks to be easier to just add another GPS with a direct connect to the carpc for time syncing.

    This all because of WAF and telling me that the car clock was 2 minutes off.
    Attached Files
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
    Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

    Comment


    • #3
      Thanks for this post Pete! I am setting this up, and your nice guide makes it almost brainless. I am so busy with a million projects, home life, and not to mention my real job these days that I wouldn't have time to sort this without your post.

      Comment


      • #4
        Yup first GPS used for time sync here was a very old Trimble. Looked a bit like this one but it was a Trimble SVeeEight Plus



        I used an already run RG-6 cable with in line amps to the roof of the house with one of these.



        Playing with another GPS device (well its more than a GPS) that just puts out GPSD on the network.
        Attached Files
        Last edited by Pete; April 16th, 2014, 07:45 AM.
        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
        Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

        X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

        Comment


        • #5
          26th of August, 2014.

          PFSense with the GPS / PPS connection continues to work fine with most current release of PFSense V2.1.4.

          I have upgraded the motherboard to an intel core duo BCM.

          Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
          2 CPUs: 1 package(s) x 2 core(s)

          I am now running VPN: IPSec on the box and it is doing well. PlugnPlay set up.

          Looking to do some WAN load balancing / failover on the box.
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
          Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

          Comment


          • #6
            Good to hear. I had got a few of the same PPS boards that you have Pete, and they have been great so far. At some point in history, on a separate round of experimentation, I had started to play with PFSense, but never got back to it. Cool that both play together on a box nicely. I might have to look into that.

            Comment


            • #7
              Yup; here was only familiar with the commercial side of firewalls etc and only Smoothwall / DD-WRT for the home side.

              Relating to time sync / PPS stuff started playing initially at home with it in the early 2000's while concurrently playing with a flight vectoring piece of software (catia) at work (old at the trees) and noticed that it was dependent on an accurate time signal. I liked it so much that I brought the methodology over to using it for time management on the routers/switches/wintel DNS stuff at work being much more accurate than the internet at the time. My only real issue at work was taking the GPS signals from the top of one building (3-4 stories) to an underground facility more than some 500 feet which was a real PITA.

              Recently now playing with OpenWRT on the home side of firewalls and learning much on the PFSense side at home.

              The features set of PFSense rivals the commercial side. (and in many aspects way better)

              That said always have seen that commercial side as functional but a kludge as if it was made for continued paid for support. (IE F5 load balancers are truely basic devices)

              Off the main topic here I still don't remember what I did to my cheaper RFID stuff to make it work as it works today (well good).

              I do have a few extra receivers that I can modify per your specifications and document if you let me know what you did I will post the modification of the addition of a new TTL to RS-232 output on these devices.
              Last edited by Pete; August 29th, 2014, 07:01 AM.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
              Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

              Comment


              • #8
                13th of September, 2014

                VPN Tunneling and VPN methodologies available on PFSense

                Putting this as a placeholder.

                I did set up IPSec VPN tunneling on my box and tested it to work fine.

                I did notice the old documentation / new revision levels of methodologies didn't agree always.

                That said I am only going to write what I did to make it work.

                This interplay with Homeseer will allow stuff like a HSTouch connection from whatever device to your home via a VPN tunnel. The convenient piece to this is that you just create one VPN tunnel and VPN is configured on the firewall.

                There is no need then to create a separate box rules set making your firewall and access to Homeseer a bit of a pleasant plug n play experience.

                Parts list

                1 - PFSense - most current version running on whatever box. Here I just built a new box and add two 4 port Intel Gb NIC cards to the box that came with 2 Gb network ports. You really need to be familiar with PFSense; GUI is laid out logically and is plug n play.

                2 - VPN software to run on the other side. (can be whatever OS).
                - Pete

                Auto mator
                Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
                Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

                X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

                Comment


                • #9
                  17th of March, 2015

                  An update relating to GPS with PPS mod for NTP Timeserver DIY and using PFSense. PFSense has included GPS / PPS package in base of PFSense these days.
                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
                  Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

                  X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

                  Comment

                  Working...
                  X