Measuring a variable freq/length pulse and generating more pulses.


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Measuring a variable freq/length pulse and generating more pulses.

    The system actually has three sensors in the format offset as per the diagram.

    However they are a royal pita to get out, so I'm looking at if one fails ignoring it, and creating the missing pulses from the remaining one/s.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Measuring a variable freq/length pulse and generating more pulses.

    some ideas
    if cmc is the missing pulse then c_replacement lag would be 2x the lag between a and b ,duration is cma duration
    if cmb missing then b_replacement lag is half the lag between a and c ,duration is cma duration (some info would be lost )

    all calc have t0 at rising edge of cma
    problem is to scale a timer to get sufficient resolution over minimum and maximum expected pulse widths

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Measuring a variable freq/length pulse and generating more pulses.

    another thought
    maybe some type of bucket brigade

  4. #4
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Measuring a variable freq/length pulse and generating more pulses.

    It seems to me that monitoring the sensors for failure and producing the pulse train you describe could be two functions. By assigning one pin to each sensor - the presence of a second pulse on any pin, at any rotational speed, will require that one pulse will have occurred on all other pins - except failed sensors. The speeds are not great, even at 600 RPM either of the list MCUs should not have issue. Likely, even without interrupts.

    I'm not sure how "error tolerant" the system is, but it seems that there will be need of some... as, when the shaft is speeding up or slowing down, calculating from the previous pulse will be flawed, unless you intend to use some pretty complex math - far beyond me, disregard post...

    Producing two pulses, offset by 20 degrees, does not require monitoring three incoming pulses. Monitor one - any one - and divide the rotational speed by (360/20) 18 to determine the offset; repeat on the second signal for the third. Or, you might take the time between any two functioning sensors directly. A pre- or post-scaler may help scale the numbers; I cannot recall if these are settable by software but, if so, add a bit to the prescaler on a timer rollover, deduct one as timer values approach 0; the manual approach, counting rollovers, will work as well.

    I may be way off in my approach, but I'm a little confused by the description you provided. In the initial post you describe 6 pulses per rotation, then later suggest 3 sensors provide the pulse pattern you attached. Neither is there any indication of scale or style of the pulses. The drawing seems to indicate square waves, like an encoder, but I would expect pulses from such a device to be equally spaced around the rotation and to have fewer sensors. Hall sensors would typically present a much shorter high (or low) pulse with variable time between pulses, but the drawing does not show this. Not exactly sure the hardware setup, so just some general thoughts...
    Last edited by Amoque; - 14th September 2014 at 13:08.

Similar Threads

  1. HSERIN for variable length string
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th February 2010, 05:58
  2. Replies: 9
    Last Post: - 26th October 2009, 19:38
  3. need help for measuring two freq at same time
    By vu2iia in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd January 2009, 04:48
  4. help generating low freq tones
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 23rd June 2007, 08:45
  5. Measuring pulse widths
    By Dangerous in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th June 2004, 12:10

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts