Shop OBEX P1 Docs P2 Docs Learn Events
Frequency as control input? — Parallax Forums

Frequency as control input?

ArchiverArchiver Posts: 46,084
edited 2003-01-23 19:58 in General Discussion
I need to control a motor with a frequency input, and I was wondering
if anyone might be able to help me out. I have a sensor that
optimally reads 10kHz, and I need to turn a motor in one direction if
the freq is above 10k, and the other direction if it is under 10k.
Is the BASIC STAMP a feasable solution to this problem? If so, how
might it be implemented?

Any help would be much appreciated.

-Aaron

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-01-23 19:24
    i dont think that PULSIN will work as the BS2P maximum
    pulse width = 49.125 ms, F = 1/T = 20.35 Hz. so how
    about a hardware solution, how about a freq to voltage
    converter? digikey has several.
    http://www.national.com/ds/LM/LM231.pdf
    ross

    --- "ipschnug <ipschnug@y...>"
    <ipschnug@y...> wrote:
    > I need to control a motor with a frequency input,
    > and I was wondering
    > if anyone might be able to help me out. I have a
    > sensor that
    > optimally reads 10kHz, and I need to turn a motor in
    > one direction if
    > the freq is above 10k, and the other direction if it
    > is under 10k.
    > Is the BASIC STAMP a feasable solution to this
    > problem? If so, how
    > might it be implemented?
    >
    > Any help would be much appreciated.
    >
    > -Aaron
    >
    >
    > 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/
    >
    >


    __________________________________________________
    Do you Yahoo!?
    Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
    http://mailplus.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-23 19:30
    From what you said the sensor reads 10khz so what does the
    sensor put out ??


    Original Message
    From: "Klutch" <klutch66@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: January 23, 2003 11:24 AM
    Subject: Re: [noparse][[/noparse]basicstamps] Frequency as control input?


    : i dont think that PULSIN will work as the BS2P maximum
    : pulse width = 49.125 ms, F = 1/T = 20.35 Hz. so how
    : about a hardware solution, how about a freq to voltage
    : converter? digikey has several.
    : http://www.national.com/ds/LM/LM231.pdf
    : ross
    :
    : --- "ipschnug <ipschnug@y...>"
    : <ipschnug@y...> wrote:
    : > I need to control a motor with a frequency input,
    : > and I was wondering
    : > if anyone might be able to help me out. I have a
    : > sensor that
    : > optimally reads 10kHz, and I need to turn a motor in
    : > one direction if
    : > the freq is above 10k, and the other direction if it
    : > is under 10k.
    : > Is the BASIC STAMP a feasable solution to this
    : > problem? If so, how
    : > might it be implemented?
    : >
    : > Any help would be much appreciated.
    : >
    : > -Aaron
    : >
    : >
    : > 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/
    : >
    : >
    :
    :
    : __________________________________________________
    : Do you Yahoo!?
    : Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
    : http://mailplus.yahoo.com
    :
    : 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 2003-01-23 19:58
    >I need to control a motor with a frequency input, and I was wondering
    >if anyone might be able to help me out. I have a sensor that
    >optimally reads 10kHz, and I need to turn a motor in one direction if
    >the freq is above 10k, and the other direction if it is under 10k.
    >Is the BASIC STAMP a feasable solution to this problem? If so, how
    >might it be implemented?
    >
    >Any help would be much appreciated.
    >
    >-Aaron


    ' {$PBASIC 2.5}
    x var word
    do
    count 0,100.x
    debug "frequency= ",x*10
    if X>=1000 then
    ' do clockwise
    else
    ' do counterclockwise
    endif
    loop

    The count command above counts the input transitions on pin P0 for
    100 milliseconds.

    -- Tracy
Sign In or Register to comment.