I have a relay contact closure event that needs to be timestamped accurately ( 1 msec) with a GPS and the PPS output... I am not sure how to feed the relay contact output to a microcontroller and then synchronize the microcontroller clock to the GPS ...plus how to get the UTC afterall? Can you please help me. thanks
Accurately measuring Time for an event ( relay contact closure) using GPS PPS
230 Views Asked by Rastin At
1
There are 1 best solutions below
Related Questions in GPS
- identify GPS mobile phonegap
- Android runtime permissions on android versions below M?
- iOS Distance between two GPS Location
- GPS not showing current location on map
- java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setTextColor(int)' on a null object reference
- using Gps Getting Latitude and Longitude
- Position marker in Google Map is not disapearing when position is lost
- How to set/get GPS Accuracy on Android Emulator?
- GPSTracker Class not working
- How to Switch ON and OFF GPS
- GPS App compile errors
- OpenGTS platform
- FusedLocationProviderApi Fatal exception: GoogleApiClient is not connected yet.
- SQL LINESTRING() versus multiple rows
- Trouble connecting to gpsd
Related Questions in MICROCONTROLLER
- HOW to connect my UPS with my android device
- What is the difference between USB host VS USB OTG support when it comes to Microcontrollers?
- STM32F4 Handling peripheral error while making a DMA Transfer (RX)
- USB Full Speed polling interval
- Which is better? int8_t vs int32_t in 32 bits MCU
- Detecting EEPROM data and address bus short circuit
- Incrementing an int in a C code for microcontroller only moves the LSB
- Using SD card as external storage for Beaglebone Black
- arm-none-eabi-ld: section .ARM.exidx overlaps section .data
- FT801 chip id error on Arduino
- lpc17xx frequency detection of square wave using polling
- How to debug C program on microcontroller
- Char array of array values to pointer array
- Embedded software program block, I2C?
- Reset vector not working though RCHW is loaded with start address in MPC5777M?
Related Questions in GPS-TIME
- Cumulative error between SYSTEM_TIME and companion computer time in Dronekit
- Android: Put GPSTimeStamp into jpg EXIF tags
- Where can I find some GPS unit test data?
- GPS hardware requirements and custom download link
- Correctly reading GPS_time from LiDAR .las file using laspy (python)
- GPS is searching for too long
- Find nearby users of an app (iPhone and Android)
- How to check if "Use GPS-provided time" is selected in "Automatic date & time" programmatically?
- How to find a start and stop od a break in GPS tracker data?
- BlackBerry Refresh location via GPS or Cell Tower
- Header and repeating time information removal from a GPS TEC rinex file
- Set the time on my Android from GPS
- Exact time on different devices
- Leap seconds in timestamp
- Accurately measuring Time for an event ( relay contact closure) using GPS PPS
Related Questions in TIMESTAMPING
- Trusted Timestamps - understanding the format (rfc3161)
- Modifying AndroidManifest.xml with build tag causes infinite rebuilding in Eclipse
- Give priority to the (software) time stamping thread in e1000e net driver
- Add up sum of time in android SQLite database
- Python for generating Timestamps for a manually transcribed .wav file
- ObjectContext's SavingChanges: find out which columns have changed?
- How to validate a TimeStampToken using a .cer file from filesystem?
- How to check whether a dynamic web-page was updated?
- Purpose of IP_RECVERR message when working with TX timestamps
- Digital Signature With TSA Timestamping and building revocation information for PDF with OID pdfRevocationInfoArchival in Java
- MySQL Timestamping
- Timestamps Misbehaving
- Current Time Stamp is not returning?
- Accurately measuring Time for an event ( relay contact closure) using GPS PPS
- Whether/how to avoid SHA-1 signed timestamp when code signing?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If your microcontroller has at least two interrupts based on hardware pins, you could connect the relay to one of the interrupt-generating pins, and the PPS to the other interrupt-generating pin.
You will need to connect the NMEA (or other proprietary protocol of your GPS) to the corresponding port in your microcontroller. Some common buses are UART or SIP.
Then, every time that you get a PPS interrupt, you enable a global flag that can be used in the main loop to reset a counter. This counter will tell you how far apart from the PPS the relay switched (if it happens within that second). If you know the base frequency of your counter, you can convert the counter into fractions of seconds. Note that if both edges of the relay state change have to be detected, you will need an interrupt source capable to interrupt on both edges (or use two interrupts)
Then, if the Relay interrupt goes off, you can get the value of the counter upon interrupt, and save it in storage, send it to host, etc. (Note, it would be best to save the value in RAM, lift a flag of "value present", and leave the sending/storing to the main loop, then turning off the flag).
Finally, when you receive a complete NMEA message (this could be being parsed in your main loop by a state machine for instance), you can send this information to the host or storage along with the counter that you saved to time your relay state change. Note please that the NMEA message will be generated and decoded with a certain delay from the PPS, so you will need to compensate for that.