Connect with us

Fast frequency measurement

Discussion in 'Electronic Design' started by Chris Carlen, Nov 18, 2003.

Scroll to continue with content
  1. Chris Carlen

    Chris Carlen Guest


    I want to measure the speed of an engine to see how much it slows down
    during the compression stroke. It is spun by a dyno, and we suspect the
    speed regulation isn't so good when the load gets heavy on compression.

    I tried a LM2907 F-to-V converter, but the ripple is too high at the
    bandwidth required. I would like the bandwidth to be not much less than
    the frequency being measured, so this points toward a digital period
    measurement. Ideally it could output the 1/t result on the fly as well,
    as an analog signal, but a simple period output would be acceptable.

    The device would need to handle frequencies up to 21.6kHz, with minimal
    delay from the end of a period to the update of the analog output.

    A ready-made instrument would be best, a chip with minimal support
    circuitry needed to use it good, and having to make it myself the last
    option. I just want to be sure I can't buy this before I go spending
    time designing it. If I do have to do it from scratch, it should make a
    good CPLD project to exercise my slowly growing logic skills.

    Comments appreciated.

    Good day!

    Christopher R. Carlen
    Principal Laser/Optical Technologist
    Sandia National Laboratories CA USA
  2. I would suggest small microcontroller measuring period of signal and
    calculating frequency.
    It might be tricky, as at 21.6KHz 1% in frequency change is only 0,5uS
    change in period length,
    but today micros can still do it... Consider ATMEL AVR's or CYGNAL C8051F300

  3. John Larkin

    John Larkin Guest

    I assume you have a once-per-rotation pulse. One way to do stuff like
    this is to 'time stamp' each pulse. Imagine a free-running clocked
    binary counter whose value is stashed every time a pulse arrives. The
    list of values is then the list of arrival times of the pulses, and
    you can process that all sorts of ways. The counter frequency should
    be high enough to keep jitter down to whatever you can tolerate. I'm
    doing this now for blades on a jet engine, to sub-ns timestamp
    resolution; I'm not quite sure why. I also make a tach module that
    uses an 8-channel time stamper, in an FPGA, internally; it's a nice,
    simple architecture for streaming time measurements.

    Put a VR pickup on a gear somewhere and get real fractional-rotation
    resolution; then you can resolve rotational acceleration!

    How about an old HP 5372 modulation-domain analyzer? They do exactly
    this, and graph the results. There must be some simple timer-counter
    PC plugin card that does this, too.

  4. scada

    scada Guest

    How about an A/D converter inputed to a laptop, running ploting software!
  5. Chris Carlen

    Chris Carlen Guest

    I didn't specify that or my desired resolution. I have either a 720
    pulse per rev encoder or 1024 pulse per rev tach to work with.

    I'd like to get close to 1 part per 1000 resolution.

    I'm thinking of just settling for a 16MHz counter using an AVR with
    input capture. I can probably whip this together in a day, once I get a

    Thanks for the input!

    Christopher R. Carlen
    Principal Laser/Optical Technologist
    Sandia National Laboratories CA USA
  6. Chris Carlen

    Chris Carlen Guest

    Yes, perhaps the timer capture function can be used. A 16MHz AVR can
    probably output the result to a parallel DAC in plenty of time for the
    next event.

    The trouble is, I'd like to get closer to one part per 1000 resolution.
    I could clock the timer at a full 16MHz, which gives 741 counts at my
    highest frequency, which might be good enough.

    Ok, I'm convinced.

    Thanks for the input.

    Christopher R. Carlen
    Principal Laser/Optical Technologist
    Sandia National Laboratories CA USA
  7. Genome

    Genome Guest

    Which sums you up.

  8. I asked this same question, here in sed, in June 2000,
    needing to measure (say) 12KHz in less than 5mS.

    The subsequent thread produced a wide variety of useful
    suggestions, more than I hoped for.

    Google for. "PIC; Fast frequency measurement"

    Had the job proceeded I was going to go for the scheme
    with two counters, where a whole number of complete
    Fin cycles is used as the gate for a high speed timer.

    The calculation Fin = Fclock*CounterA/CounterB is then
    done in software.

    ISTR that Speff? made the useful suggestion that if CounterB
    is always forced to be a power-of-two then the division in
    the calc is just a shift.
  9. Bill Sloman

    Bill Sloman Guest

    The obvious tool for the job is a counter-timer with a gate input, so
    you can can measure the period between encoder/tacho outputs at varius
    points around the compression cycle.

    The Agilent 53132A might be interesting

    It offers 150psec time interval resolution,which is 0.3% on 21.6kHz.

    Vernier chronometers offer much higher resolution time-interval
    mesurements - this would seem to be what John Larkin is talking about
    - but simple logic can do a lot better than 150psec.

    Tom Bruhns may know if Agilent does something faster.

    IIRR F-series TTL and ACT-series CMOS can give you wide 50MHz
    synchronous counters, which is a time resolution of 20nsec - more than
    you are asking for. With Motorola's ECLinPS you may be able to push
    this to 500MHz - I did the sums for a string of 8-bit 100E016
    counters, though now you can buy the faster

    fro $5.80 in small quantities from Newark (who seem to have 50 in

    You'd need to load all the outputs to use it as a synchronous counter,
    which may compromise the maximum frequency. The parts haven't got
    enough pins to offer differential outputs, and loading unbalanced
    outputs puts ripple on your Vcc rail.

    The six-bit 100E136 counter

    seems to be twice the price and half the speed, if a bit easier to

    You can probably make something faster than 50MHz with the right
    programmable logic device - maybe even 500MHz, though it seems
  10. Chris Carlen

    Chris Carlen Guest

    You mean ns, of course.

    Thanks for the input Bill.

    I think 0.1% resolution, which can be acheived with a 20MHz counter,
    would be plenty.

    I have determined to avoid discrete logic if at all possible. Xilinx
    XPLA3 CPLDs do 5ns propagations and 200MHz count speeds. Such devices
    should make a 20MHz counter a piece of cake.

    But I have found something even better. A ready made instrument:

    Good day!

    Christopher R. Carlen
    Principal Laser/Optical Technologist
    Sandia National Laboratories CA USA
  11. Bill Sloman

    Bill Sloman Guest

    I apologise for the mistake - 150psec in 46.3usec is 3 ppm, three
    orders of magnitude better than the 0.3% I mistakenly calculated.

    The Agilent 53132A data sheet definitely says 150psec. Why I was
    processing it as 150nsec I'll never know. See below, where I've
    corrected a really silly proposition back to what I actually meant.

    They used to be the Philips CoolRunner CMOS parts. Very nice. I've
    been itching to use them for years. I'd be inclined to go for 50MHz or
    64MHz - Farnell sells packaged crystal oscillators for these
    frequencies at $5 each.

    If you poached a few ideas about carry-propagation from the 74163-type
    counters, you might be able to screw 100MHz out of the CoolRunner, but
    I wouldn't bet too heavily on making that sort of speed.
    It lacks the gated single-period measurement capability that you get
    with the Agilent 53132A - that can be very useful.
  12. Fred Bloggs

    Fred Bloggs Guest

    Actually unless you're already set-up for CPLD work, a discrete solution
    would be trivial. You need only 3x 4-bit counters to do a 4096 count at
    20MHz which takes you down to 5KHz tach output. This will be a piece of
    cake for 74F logic. As John Larkin suggested- let the counter just roll
    over continuously, use the leading edge of tach output to trigger data
    logger read of 12-bit counter contents. Then you end up with a sequence
    of unambiguous time interval readings-also know as period measurements,
    and a three-chip solution.
  13. Fred Bloggs

    Fred Bloggs Guest

    I think you may have said something about an analog output, so if that's
    the case just use the tach edge to latch the 12-bits into a DAC input
    register while simultaneously loading the counter with binary 1, fast
    release the LOAD for recovery to CLK in 50ns, and let it roll. Again-
    this is trivial to do with 74F.
  14. Ian Buckner

    Ian Buckner Guest

    Bill was right, it is 150picosecs. There is a 53131 with 500picosec
    resolution. Note that the 53131 only spits out readings at 200/sec,
    I can't see a spec for the 53132, but I expect it is the same. You
    have to "walk" a trigger across where you want to do the measurements,
    or some similar thing.

    There used to be counters that resolved single shot to 20picosec
    (5370) but that is discontinued.

  15. John Larkin

    John Larkin Guest

    There are lots of 5370's around still, often on ebay, and they are
    very nice boxes. SRS makes a picosecond-resolution benchtop counter,
    although its drift and jitter are a lot bigger than its theoretical
    resolution, and its actual sample rate is pretty low, as was the
    5370's. I make some VME stuff that does 48 ps with about 0.8 LSB
    jitter and pretty fast hit rates... maybe I'll put that in a box some

    The HP 5372 (I think that's right) would snapshot the time of every
    edge it saw, with ps resolution, up to 80 MHz, at least until its
    memory filled up. It was cool for watching stuff like PLLs settling.

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day