Slow speed tachometer


Closed Thread
Results 1 to 10 of 10

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Slow speed tachometer

    Perhaps I do not wholly understand your purpose, but why is it necessary to use a timer for the display? It seems (from what I understand of your intent) that something like the pseudo-code below would suffice:

    Code:
    Set up interrupt on complete rotation
    Set up interrupt on Timer1 overflow
    
    RPM = 0
    
    Main:
      If (button pushed) and (Flag = 0) enable interrupts and Flag = 1
      if (button pushed) and (Flag = 1) disable interrupts and Flag = 0
      For Digit = 1 to 3   'multiplex display
        PORTA.Digit = 1
        Lookup
        . 
        . 
        .
        PortA.Digit = 0
      Next Digit
      XXXXXXX 'No pause here, it slows interrupts
    Goto Main
    
    On Timer1 Overflow:
      Timer1Overflows = Timer1Overflows + 1 'Timer0 may be used here, but will result in a higher multiplier
    Resume
    
    On rotation interrupt:
      RPM = Timer1Overflows * [Time to Overflow] + [Timer1 current value in mSecs]...  'Calculate new RPM
      Timer1Overflows reset : Timer1 reset
    Resume
    I would not question, but it seems at the very slow RPM you are measuring, the frequency of updating the display will happen many times and is not nearly so critical... It will take relatively many iterations before there is new information to display and there is no benefit (as I see it) to worry so long as the loop executes fast enough to avoid flicker. It seems, if I understand you correctly, that each rotation interrupt is a full rotation and yields new RPM data or am I mistaken?

  2. #2
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Slow speed tachometer

    I think you need to increase the resolution to increase the accuracy of the pulse read before 1 minute is up.

    Why deal with 36 pulses per minute ? I don't know how you are breaking the IR beam but maybe you could add extra pulses using extra beam breaks.

    1 pulse per revolution of conveyer "drum" wheel could be multiplied up to 10 pulses per revolution or whatever using more beam breaks on the "drum" ? Easier to read a RPM during the one minute period.


    Just thoughts.
    Last edited by tasmod; - 15th April 2014 at 10:41. Reason: Grammar
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

Similar Threads

  1. Tachometer with DT Interrupts?
    By DanPBP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th November 2009, 20:51
  2. Tachometer with Interrupts
    By serkanc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 28th August 2009, 09:10
  3. tachometer
    By aztaig in forum mel PIC BASIC
    Replies: 5
    Last Post: - 11th August 2008, 14:54
  4. Tachometer code problems.
    By PICy in forum mel PIC BASIC
    Replies: 3
    Last Post: - 28th January 2005, 16:29
  5. Tachometer code problems.
    By PICy in forum General
    Replies: 6
    Last Post: - 31st October 2004, 12:47

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