Shop OBEX P1 Docs P2 Docs Learn Events
Tachometer — Parallax Forums

Tachometer

ArchiverArchiver Posts: 46,084
edited 2002-06-19 15:07 in General Discussion
>>>
Date: Fri, 10 Mar 2000 18:10:45 -0800 (PST)
From: Alejandro Vazquez <alexvazquez@y...>

I have to do a tachometer for my school, but I dont
want to use the BS2,, How can I build it......
<<<<

A common way to do this is by discharging a capacitor,
which has been charged to a fixed voltage before
discharge, into a moving coil meter. The number of
discharges per time averages in the meter to
give a reading proportional to number of pulses per
time.

This can be done with a single pole double throw
relay [noparse][[/noparse]or solid state circuitry] so that the
capacitor is first charged to a reference voltage
and then discharged through the meter. [noparse][[/noparse]The capacitor
is put to the relay pole and one throw goes to the
meter, the other to +Vref. other end of the capacitor
goes to Vref- as does the other side of the meter].
The realy coil is actuated off and on at the frequency
to be measured.

There is also a tachometer IC the LM2917 [noparse][[/noparse]LM2907 8pin].
Look up the data sheet at the National Semiconductor
web site. [noparse][[/noparse]Frequency to voltage converter]. good luck.

________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-05-13 04:17
    I need urgent help for a school project of a
    tachometer.

    I already have the input pulses,,, I get the pulses
    from a opto sensor and then a 555 timer to convert the
    signal from the opto sensor to a square signal.

    I tried to connect the BS2 to the input pulses using
    pulsin but I dont know how to get it in RPM.

    The other problem I saw is that I put a disk on the
    opto sensor and I spin it about 1 revolution per
    second and in the BS2 I cant get any response,,,, only
    when the disk is going faster.....


    Please Need Help


    Thanks
    Alex

    __________________________________________________
    Do You Yahoo!?
    Send instant messages & get email alerts with Yahoo! Messenger.
    http://im.yahoo.com/
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-13 07:34
    Here is some code I am using on a PICBasic Pro program to give me a tach
    readout. I am using a disk that is 1/2 reflective and 1/2 non-reflective so
    the pulse I am measuring is the period of 1 rotation. Also, due to the way I
    am handling the math I only get a sensitivity of 10 rpm increments.

    i is a word variable and markings is the number of divisions on the wheel (2
    in this case). The reason I check for a value over 10000 is that I was
    getting some erroneous readings and it was always a ridiculously high number
    (Think it has to do with my poor opto sensor mounting, I keep wiggling as I
    hold it). So I decided that the max RPM I would ever use this on is 10K and
    this code makes it keep reading and calculating until I get a value that is
    in my range of plausibility.

    Tach:
    PulsIn PORTB.0,0,pulse
    i = (6000/((pulse/100)*markings))*10
    IF i > 10000 Then
    GoTo Tach
    EndIF

    That should get you a tach readout.

    Tim
    [noparse][[/noparse]Denver, CO]

    >
    Original Message
    > From: Alejandro Vazquez [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=JyjMjlGc6IBvZgMYHfB7jdM2QTnho5TznxEg8-olpAdahhSMyXx6xUhzi-12TOKbCmTlGqSeQgaXB3Y]alexvazquez@y...[/url
    > Sent: Friday, May 12, 2000 9:18 PM
    > To: basicstamps@egroups.com
    > Subject: [noparse][[/noparse]basicstamps] Tachometer
    >
    >
    > I need urgent help for a school project of a
    > tachometer.
    >
    > I already have the input pulses,,, I get the pulses
    > from a opto sensor and then a 555 timer to convert the
    > signal from the opto sensor to a square signal.
    >
    > I tried to connect the BS2 to the input pulses using
    > pulsin but I dont know how to get it in RPM.
    >
    > The other problem I saw is that I put a disk on the
    > opto sensor and I spin it about 1 revolution per
    > second and in the BS2 I cant get any response,,,, only
    > when the disk is going faster.....
    >
    >
    > Please Need Help
    >
    >
    > Thanks
    > Alex
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Send instant messages & get email alerts with Yahoo! Messenger.
    > http://im.yahoo.com/
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-13 18:45
    Alex asked:
    >I tried to connect the BS2 to the input pulses using
    >pulsin but I dont know how to get it in RPM.
    >The other problem I saw is that I put a disk on the
    >opto sensor and I spin it about 1 revolution per
    >second and in the BS2 I cant get any response,,,, only
    >when the disk is going faster.....

    The maximum allowable value of PULSIN is 65535+2=0.13107 second. So your
    pulses have to arrive at about ten per second, or else the Stamp won't
    catch them right.

    Tim suggested:
    >Here is some code I am using on a PICBasic Pro program to give me a tach
    >readout. I am using a disk that is 1/2 reflective and 1/2 non-reflective
    so
    >the pulse I am measuring is the period of 1 rotation. Also, due to the way
    I
    >am handling the math I only get a sensitivity of 10 rpm increments.> Tach:
    > PulsIn PORTB.0,0,pulse
    > i = (6000/((pulse/100)*markings))*10
    > IF i > 10000 Then
    > GoTo Tach
    > EndIF

    The resolution can be improved by making the numerator as large as
    possible, in this case 60000 instead of 6000:

    i = (60000/((pulse/100)*markings)) ' markings=2

    That gives 45 RPM to 10000 RPM, when the "pulse" value ranges from 300 up
    to 65535. The best resolution for PBASIC in solving Y=C/X comes when the
    value of X is near the square root of C. The resolution can be improved
    both mechanically and mathemtically by using more markings. There are ways
    to improve the math by "faking" a larger numerator or by using long
    division.

    -- Tracy Allen
    Electronically Monitored Ecosystems
    http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-13 19:56
    Tracy,

    Thanks for the tweak on the formula. I just updated my program with it and
    added a loop to average 6 reading and it is now giving a nice stable readout
    that looks much better than just seeing everything as a multiple of 10 RPM.
    I am driving a MAX7219 with it and plan on using it for a readout of my RPM
    on the mill head of my Shoptask 3 in 1 machine. I put on a variable speed
    motor in place of the stock fixed speed and stepped pulleys. My maximum
    spindle speed is about 5000 RPM and my minimum is about 100 RPM so the range
    will work perfectly.

    Tim
    [noparse][[/noparse]Denver, CO]

    >
    Original Message
    > From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=DZLTh2v317CCyDM2Y1I-IZqeIg_R-dKdCgfdLyzUNsMOicXnsxfLx9oQX0qZsZL1x7aj0nrQfqqsRKM]emesys@c...[/url
    > Sent: Saturday, May 13, 2000 11:45 AM
    > To: INTERNET:basicstamps@egroups.com
    > Subject: RE: [noparse][[/noparse]basicstamps] Tachometer
    >
    >
    >
    > Alex asked:
    > >I tried to connect the BS2 to the input pulses using
    > >pulsin but I dont know how to get it in RPM.
    > >The other problem I saw is that I put a disk on the
    > >opto sensor and I spin it about 1 revolution per
    > >second and in the BS2 I cant get any response,,,, only
    > >when the disk is going faster.....
    >
    > The maximum allowable value of PULSIN is 65535+2=0.13107 second. So your
    > pulses have to arrive at about ten per second, or else the Stamp won't
    > catch them right.
    >
    >
    > Tim suggested:
    > >Here is some code I am using on a PICBasic Pro program to give me a tach
    > >readout. I am using a disk that is 1/2 reflective and 1/2 non-reflective
    > so
    > >the pulse I am measuring is the period of 1 rotation. Also, due
    > to the way
    > I
    > >am handling the math I only get a sensitivity of 10 rpm
    > increments.> Tach:
    > > PulsIn PORTB.0,0,pulse
    > > i = (6000/((pulse/100)*markings))*10
    > > IF i > 10000 Then
    > > GoTo Tach
    > > EndIF
    >
    > The resolution can be improved by making the numerator as large as
    > possible, in this case 60000 instead of 6000:
    >
    > i = (60000/((pulse/100)*markings)) ' markings=2
    >
    > That gives 45 RPM to 10000 RPM, when the "pulse" value ranges from 300 up
    > to 65535. The best resolution for PBASIC in solving Y=C/X comes when the
    > value of X is near the square root of C. The resolution can be improved
    > both mechanically and mathemtically by using more markings.
    > There are ways
    > to improve the math by "faking" a larger numerator or by using long
    > division.
    >
    > -- Tracy Allen
    > Electronically Monitored Ecosystems
    > http://www.emesystems.com
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-20 16:14
    you will need an a/d for each channel of data
    the a/d will probably be 0-5 volt or 0-10 volt
    a simple divider resistor network will allow you to cut down the tach output
    to max level for the a/d. You will need to decide how much resolution you
    require (either 8 or 10 or 12 bit)


    Richard



    Original Message
    From: "Production Technology, L.L.C." <fixemerd@a...>
    To: <basicstamps@yahoogroups.com>
    Cc: <fixemerd@a...>
    Sent: Monday, August 20, 2001 11:37 AM
    Subject: [noparse][[/noparse]basicstamps] TACHOMETER


    > Fellow Stampers,
    >
    > Does anyone have a good idea how to read a tachometer. This
    particular
    > tachometer outputs a voltage ±14.00 volts proportional to speed and
    > direction. I assume I need a ADC, however, am not sure if that is
    correct,
    > and if it is, what ADC will let you compare two inputs?
    >
    > David Fixemer
    > fixemerd@a...
    > 402-472-8239
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-20 16:18
    whoops, Now I realize what you are asking

    you will only need one channel a/d

    I believe that you need to offset the output by 14 volts so that it swings
    from 0 to 28 volts.

    Now use the advice that I gave about the voltage divider, resolution, etc.

    your code will know that now 14 volts is stationary and that 0 volts is full
    speed cw and that 28 volts is full speed ccw


    Richard



    Original Message
    From: "Production Technology, L.L.C." <fixemerd@a...>
    To: <basicstamps@yahoogroups.com>
    Cc: <fixemerd@a...>
    Sent: Monday, August 20, 2001 11:37 AM
    Subject: [noparse][[/noparse]basicstamps] TACHOMETER


    > Fellow Stampers,
    >
    > Does anyone have a good idea how to read a tachometer. This
    particular
    > tachometer outputs a voltage ±14.00 volts proportional to speed and
    > direction. I assume I need a ADC, however, am not sure if that is
    correct,
    > and if it is, what ADC will let you compare two inputs?
    >
    > David Fixemer
    > fixemerd@a...
    > 402-472-8239
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-20 17:37
    Fellow Stampers,

    Does anyone have a good idea how to read a tachometer. This particular
    tachometer outputs a voltage ±14.00 volts proportional to speed and
    direction. I assume I need a ADC, however, am not sure if that is correct,
    and if it is, what ADC will let you compare two inputs?

    David Fixemer
    fixemerd@a...
    402-472-8239
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-20 19:24
    Or you could use a A/D that can be configured to bipolar mode and
    scale the output of the tach to use a -2.5/+2.5 input range. Sample a
    part in from Maxim or Analog Devices. Cheaper that way when you find
    out that a $40 A/D isn't going to work. Also you probably want to use
    a serial A/D so that you only have to use 3 I/O pins on the BS.

    Jason

    --- In basicstamps@y..., "Richard Friedrich" <rfriedrich@a...> wrote:
    > whoops, Now I realize what you are asking
    >
    > you will only need one channel a/d
    >
    > I believe that you need to offset the output by 14 volts so that
    it swings
    > from 0 to 28 volts.
    >
    > Now use the advice that I gave about the voltage divider,
    resolution, etc.
    >
    > your code will know that now 14 volts is stationary and that 0
    volts is full
    > speed cw and that 28 volts is full speed ccw
    >
    >
    > Richard
    >
    >
    >
    >
    Original Message
    > From: "Production Technology, L.L.C." <fixemerd@a...>
    > To: <basicstamps@y...>
    > Cc: <fixemerd@a...>
    > Sent: Monday, August 20, 2001 11:37 AM
    > Subject: [noparse][[/noparse]basicstamps] TACHOMETER
    >
    >
    > > Fellow Stampers,
    > >
    > > Does anyone have a good idea how to read a tachometer. This
    > particular
    > > tachometer outputs a voltage ±14.00 volts proportional to speed
    and
    > > direction. I assume I need a ADC, however, am not sure if that is
    > correct,
    > > and if it is, what ADC will let you compare two inputs?
    > >
    > > David Fixemer
    > > fixemerd@a...
    > > 402-472-8239
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@y...
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-22 05:30
    Correct me if I'm wrong here, The BS is a great device but isn't
    multi-tasking so you will loose RPM data while the BS is running the
    serial in/out command. There are micro controllers that are
    multitasking, which are more suitable to use for RPM data acquisition.
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-22 05:30
    Correct me if I'm wrong here, The BS is a great device but isn't
    multi-tasking so you will loose RPM data while the BS is running the
    serial in/out command. There are micro controllers that are
    multitasking, which are more suitable to use for RPM data acquisition.
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-22 17:06
    At 00:30 08/22/01, tunatunup2000@y... wrote:

    >Correct me if I'm wrong here, The BS is a great device but isn't
    >multi-tasking so you will loose RPM data while the BS is running the
    >serial in/out command. There are micro controllers that are
    >multitasking, which are more suitable to use for RPM data acquisition.

    But... it would be a bit unusual for the RPM to change so drastically
    during serin/serout time that this short interruption matters
    significantly. I'd be inclined to average several determinations, then
    display that average, average several more, display that average, or maybe
    keep a running 3 or 5 sample average that is displayed after each internal
    update, whatever. Otherwise you are likely to get a jittery readout that
    is very annoying in a digital display device. Jittery not because the RPM
    is really changing, but because the conversion process isn't precisely
    repetitive. A bit of the BS's time spent resolving this issue will be a
    good thing, not a bad thing.

    73 de Jim, KB3PU
  • ArchiverArchiver Posts: 46,084
    edited 2002-06-19 15:07
    Hello Stampers!

    I've seen a few postings for petrol engine tachometer projects, and wondered
    if anyone has had sucess with tachometer design using a Stamps.

    It occurred to me that one fairly simple method would be to connect a 10K
    resister at the point where the contact breaker meets the coil. I would
    then diode clamp the output to make a 5v. squarewave. I might need to
    debounce the contacts using a 555 monostable and would probably need to slow
    the pulses down to Stamp speed with a divide by 100 prescaler before the
    pulses hit the Stamp.

    Any thoughts?

    Tony
Sign In or Register to comment.