Shop OBEX P1 Docs P2 Docs Learn Events
Measuring pulse accurately — Parallax Forums

Measuring pulse accurately

Hi All,
I would like to measure a rotating disk accurately. I will use a photo-transistor to trigger counter. Should I use two counters?

Comments

  • kwinnkwinn Posts: 8,697
    muttvac wrote: »
    Hi All,
    I would like to measure a rotating disk accurately. I will use a photo-transistor to trigger counter. Should I use two counters?

    Depends on what you are measuring, the programming language, and how fast the disk is turning. Two counters would work for any of those choices.
  • Also how accurate do you need to measure it? The XO driving the propeller will be only accurate to some 10 to 100ppm. Just sayin'.
  • jmgjmg Posts: 15,173
    guenthert wrote: »
    Also how accurate do you need to measure it? The XO driving the propeller will be only accurate to some 10 to 100ppm. Just sayin'.

    Good point.
    The OP can connect a GPS 1pps to another COG, and measure that too, then calibrate the XO to well under 1ppm.
    Should do for most disk measurements, maybe even thermal expansion ones... ?

  • Thanks all, wind speed not really that fast.
  • kwinnkwinn Posts: 8,697
    muttvac wrote: »
    Thanks all, wind speed not really that fast.

    Single counter to count pulses and waitcnt for timing. Spin is fast enough for this so C or pasm would be more than fast enough.
  • If you can measure the time at 2-4 marks around the disk, you may be able to infer the wind direction as well.
  • jmgjmg Posts: 15,173
    If you can measure the time at 2-4 marks around the disk, you may be able to infer the wind direction as well.
    Interesting idea, but would not work with the generic 3-equal-cup wind speed sensors.

    You also need to extract phase info, as well as speed, but maybe a skewed-cup design plus a variant of single-track-gray-code, can give velocity wobble with enough phase information to get wind direction ?

    Elevates the timing from fairly trivial, to something more Prop like :)


  • Just use motor minder

    It looks for a positive edge to trigger counter b, just change it if you need too.
Sign In or Register to comment.