Shop OBEX P1 Docs P2 Docs Learn Events
GPS Time Converted to Video Timecode? — Parallax Forums

GPS Time Converted to Video Timecode?

DavidicusDavidicus Posts: 20
edited 2007-02-15 15:13 in BASIC Stamp
Hello,

I need to convert the information that is sent every second from the GPS receiver into video timecode which divides seconds into increments of 1/30th of a second. I will be using the information to timestamp events that occur live so that they can be edited into video later. But, I need more precision than just 1 second. If any of you can direct me in the right direction, I would sure appreciate it.

DH

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-14 23:08
    You'll need another time source that gets synchronized periodically (maybe every second) with the GPS signal. Here's a simple time base, presented here as a 1 second pulse source. You can easily change the taps on the counter and the crystal frequency to get pretty much any pulse rate you want. You would override the reset pulse from the Stamp on the GPS one second decode. That would recalibrate the time source every second.
  • DavidicusDavidicus Posts: 20
    edited 2007-02-14 23:44
    Thank you for the quick reply. One quick question: As far as I can tell from the Parallax GPS module, there is no 1 pps output. Is it possible to put the module in RAW mode and use the Serial data stream to reset the counter? If so, I do I get the counter to reset only once per second?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-15 00:04
    You're going to have some difficulty keeping things properly synchronized without a 1pps signal, mostly because there's some delay in getting the time information serially out of the GPS receiver. The crystal clock is going to be pretty accurate as long as the temperature doesn't vary wildly. Probably the best course is to use the GPS information over a long period of time (minutes to hours) to determine a correction factor and adjust the low order bits of the 1/30 second timer feedback to reset either one count early or one count late to speed up or slow down the timing slightly. Essentially, the Stamp will keep a time in seconds since the last correction and compare that to the GPS elapsed time since the last correction, then maybe once an hour change the feedback bits to compensate. If you need a more accurate time, you can always speed this up by using a higher tap on the counter and adjust the feedback more quickly.
  • JonathanJonathan Posts: 1,023
    edited 2007-02-15 00:32
    Another source of a cheap 1PPS signal is just about any clock that is synched to WWVB. The clock itself will take care of keeping synched, you just count the pulses. Don't know if this is appropriate for your situation, but I thought I'd mention it.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • DavidicusDavidicus Posts: 20
    edited 2007-02-15 01:04
    Is there a way to reset the 1/30 second timer using the first received bit from the serial stream since the stream should be arriving every second? I can check this for latency and program an offset if required. I'm just not knowledgable enough to figur out the way to accomplish the reset.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-15 04:15
    You can use an NPN switching transistor with its emitter grounded and its collector connected to pin 9 of the 74HC14. Its base is connected to a Stamp pin through a 4.7K resistor. The Stamp should set this pin to output a low logic level, then use a PULSOUT to produce a high logic level pulse about 2us wide (wider is ok) to reset the timer.

    From what I can determine, you may not get an accurate one second pulse. There's a whole data stream coming in with all kinds of information depending on what satellites are visible and the current time/date is just one packet of information and may be delayed by other information queued for serial transmission. I would not try to reset the timer based on the presence of serial data. As I described, I'd look at the actual time and use it to adjust the 1/30 second clock.
  • CCraigCCraig Posts: 163
    edited 2007-02-15 15:13
    Are you thinking to automatic sync as with Avid etc.? If so, it's going to take a lot of work. Are you sure you're using 1/30 not 29.97 drop frame? Or are you just recording 1/30. Chances are you will still have to sync by hand.

    It all depends on the time sources of your camera and sound equipment. (usually not very good). That's why they use a time burst, either cabled or wireless.

    If you don't mind having to hand tweek it, here's what I do:

    1. Set the camera to 'free run'. The frame clock is always running even when not recording.
    2. Set the clock to time of day. Careful if your shoot is going to continue through midnight. Most editor software burp on the time code jumping back to 00:00:00. So if you start shooting a 10:00pm, set it to 10:00am.
    3. Get all cameras, sound recorders and your wristwatch etc, and (with their remotes if possible) set them to the same time.
    4. If you cheapo sound recorders are like mine, they won't time stamp the files. You or the boomperson, will have to read their watch and announce the time at the start of each take. You'll have to listen to the first few seconds of the file and change filename to start time code.

    Gotya's :

    -The time sources in the cameras will drift. You may have to re-sync at the lunch break. It only takes a minute or two.
    -They might will be good all day. Mine are.
    -You (the editor) will still have to hand sync.
    -If one single take is longer than 10 to 15 minutes (depending on the clocks), your video may be longer or shorter by a number of frames. Now you have a audio file that doesn't match you video, being X number of frames off at the end. Your audio/video software can correct this with no problem. I have shot for 20 minutes (a very long take for me) and wasn't off but about one frame. (we didn't adjust it). It's the luck of the draw. I've heard of guys being out at ten minutes and others shooting for 30 with no problems.
    -Battery changes in some cameras, RESET the clocks or stop 'free run'.

    How do you plan on recording the timecode? Remember if you're going to record LTC or any type of sync pulse to an audio channel, keep it low so it doesn't bleed over.

    IF you are using pro cameras and equipment, things are somewhat different than explained. (easier). Their motors are controlled by the clock. We're stuck with free running motors/circuits (mine are solid state) and recording timestamps. Even if you get a nice signal out from the GPS, it may or may not be in sync with the camera.

    And lastly, the Parallax GPS unit does not send a pps. I've been playing ... er working with it lately.

    HTH, Chris

    Post Edited (CCraig) : 2/15/2007 3:20:56 PM GMT
Sign In or Register to comment.