Shop OBEX P1 Docs P2 Docs Learn Events
Pulsin questions and incline meter — Parallax Forums

Pulsin questions and incline meter

ArchiverArchiver Posts: 46,084
edited 2002-04-16 22:17 in General Discussion
I'm looking at making a bicycle speedometer with a BS2. I plan on having
a reed switch on the fork activated by a magnet on a spoke. It looks
like the pulses have to occur in less then .131 seconds for the pulsin
command to pick them up. This would be 34mph! just as a starting point
(not very good for a bicycle). So I am looking for a way to pick up
slower pulses with a stamp, my goal is a range of 1.6sec/rev-.08sec/rev
with a lot of steps between.

The pak-7 for Al Williams might fit the bill but I couldn't really see
the range that it handles. I also liked the multichannel properties of
this IC as in the future I might want to add cadence (pedal RPMs) and HR
to the list of functions. There may be better solutions than this but
alas I am a beginner at this.

Also I would like to implement a incline meter to detect the steepness
of hills. There were recently some posts about a similar topic but it
seemed the incline meter took a back seat to other solutions. Is there a
good solution for this? A bicycle is subject to a lot of different
accelerations so it seems like getting an accurate reading from a steel
marble in a tube could be challenging.

TIA,
Dan

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-04-15 21:56
    I'll address the tilt sensing part of your question.

    The analog devices ADXL202 is an extremely small dual axis +/- 2g tilt sensor
    that is very easy to interface with the stamp. I've done it, and I've seen
    application hints, etc., indicating that others have done it as well. Look at
    the following:

    Analog Devices web site
    Google search for ADXL202 and "basic stamp"
    Search the archives from this list.

    Good luck.

    Clark Hughes

    Daniel Stark wrote:
  • ArchiverArchiver Posts: 46,084
    edited 2002-04-15 22:18
    Dear Dan

    How about using more than one magnet? How about using an optical couple
    and counting the number of spokes?

    leroy

    Daniel Stark wrote:
    >
    > I'm looking at making a bicycle speedometer with a BS2. I plan on having
    > a reed switch on the fork activated by a magnet on a spoke. It looks
    > like the pulses have to occur in less then .131 seconds for the pulsin
    > command to pick them up. This would be 34mph! just as a starting point
    > (not very good for a bicycle). So I am looking for a way to pick up
    > slower pulses with a stamp, my goal is a range of 1.6sec/rev-.08sec/rev
    > with a lot of steps between.
    >
    > The pak-7 for Al Williams might fit the bill but I couldn't really see
    > the range that it handles. I also liked the multichannel properties of
    > this IC as in the future I might want to add cadence (pedal RPMs) and HR
    > to the list of functions. There may be better solutions than this but
    > alas I am a beginner at this.
    >
    > Also I would like to implement a incline meter to detect the steepness
    > of hills. There were recently some posts about a similar topic but it
    > seemed the incline meter took a back seat to other solutions. Is there a
    > good solution for this? A bicycle is subject to a lot of different
    > accelerations so it seems like getting an accurate reading from a steel
    > marble in a tube could be challenging.
    >
    > TIA,
    > Dan
    >
    > 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 2002-04-15 22:45
    Leroy,

    More than one magnet might work, they would have to be as close to
    even-spaced as possible I still would like to find a different solution
    so that HR and Cadence can be done. The optical is also an intriguing
    idea so long as you don't switch wheels to one with a different spoke
    count.

    -Dan




    On Monday, April 15, 2002, at 04:18 PM, Leroy Hall wrote:

    > Dear Dan
    >
    > How about using more than one magnet? How about using an optical couple
    > and counting the number of spokes?
    >
    > leroy
    >
    > Daniel Stark wrote:
    >>
    >> I'm looking at making a bicycle speedometer with a BS2. I plan on
    >> having
    >> a reed switch on the fork activated by a magnet on a spoke. It looks
    >> like the pulses have to occur in less then .131 seconds for the pulsin
    >> command to pick them up. This would be 34mph! just as a starting point
    >> (not very good for a bicycle). So I am looking for a way to pick up
    >> slower pulses with a stamp, my goal is a range of 1.6sec/rev-.08sec/rev
    >> with a lot of steps between.
    >>
    >> The pak-7 for Al Williams might fit the bill but I couldn't really see
    >> the range that it handles. I also liked the multichannel properties of
    >> this IC as in the future I might want to add cadence (pedal RPMs) and
    >> HR
    >> to the list of functions. There may be better solutions than this but
    >> alas I am a beginner at this.
    >>
    >> Also I would like to implement a incline meter to detect the steepness
    >> of hills. There were recently some posts about a similar topic but it
    >> seemed the incline meter took a back seat to other solutions. Is
    >> there a
    >> good solution for this? A bicycle is subject to a lot of different
    >> accelerations so it seems like getting an accurate reading from a steel
    >> marble in a tube could be challenging.
    >>
    >> TIA,
    >> Dan
    >>
    >> 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/
    >
    >
    > 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 2002-04-15 23:21
    Since a bike computer can be had for $30 or less, why waste a Stamp and an
    LCD?

    If you want really cool and have some bucks to toss, you could use a GPS
    receiver, which would give you a speed and altitude output and allow you to
    calculate distance and incline.

    Original Message

    > More than one magnet might work, they would have to be as close to
    > even-spaced as possible I still would like to find a different solution
    > so that HR and Cadence can be done. The optical is also an intriguing
    > idea so long as you don't switch wheels to one with a different spoke
    > count.

    > > How about using more than one magnet? How about using an optical couple
    > > and counting the number of spokes?

    > >> I'm looking at making a bicycle speedometer with a BS2. I plan on
    > >> having
    > >> a reed switch on the fork activated by a magnet on a spoke. It looks
    > >> like the pulses have to occur in less then .131 seconds for the pulsin
    > >> command to pick them up. This would be 34mph! just as a starting point
    > >> (not very good for a bicycle). So I am looking for a way to pick up
    > >> slower pulses with a stamp, my goal is a range of 1.6sec/rev-.08sec/rev
    > >> with a lot of steps between.
    > >>
    > >> The pak-7 for Al Williams might fit the bill but I couldn't really see
    > >> the range that it handles. I also liked the multichannel properties of
    > >> this IC as in the future I might want to add cadence (pedal RPMs) and
    > >> HR
    > >> to the list of functions. There may be better solutions than this but
    > >> alas I am a beginner at this.
    > >>
    > >> Also I would like to implement a incline meter to detect the steepness
    > >> of hills. There were recently some posts about a similar topic but it
    > >> seemed the incline meter took a back seat to other solutions. Is
    > >> there a
    > >> good solution for this? A bicycle is subject to a lot of different
    > >> accelerations so it seems like getting an accurate reading from a steel
    > >> marble in a tube could be challenging.
  • ArchiverArchiver Posts: 46,084
    edited 2002-04-16 08:15
    >I'm looking at making a bicycle speedometer with a BS2. I plan on having
    >a reed switch on the fork activated by a magnet on a spoke. It looks
    >like the pulses have to occur in less then .131 seconds for the pulsin
    >command to pick them up. This would be 34mph! just as a starting point
    >(not very good for a bicycle). So I am looking for a way to pick up
    >slower pulses with a stamp, my goal is a range of 1.6sec/rev-.08sec/rev
    >with a lot of steps between.

    Hi Dan,

    Check out this URL for some info on tight timing loops in program code:
    http://www.emesystems.com/BS2speed.htm#longpulse
    There are also links to other external timer chips for you to consider.

    -- Tracy
  • ArchiverArchiver Posts: 46,084
    edited 2002-04-16 22:17
    > >I'm looking at making a bicycle speedometer with a BS2. I plan on having
    > >a reed switch on the fork activated by a magnet on a spoke. It looks
    > >like the pulses have to occur in less then .131 seconds for the pulsin
    > >command to pick them up. This would be 34mph! just as a starting point
    > >(not very good for a bicycle). So I am looking for a way to pick up
    > >slower pulses with a stamp, my goal is a range of 1.6sec/rev-.08sec/rev
    > >with a lot of steps between.
    *****************

    For what it's worth:
    Before bike speedos were cheap, we built one using an opamp, counters, and a
    display chip. The sensor was made from an old relay coil, magnetically
    biased with one of those Radio Shack toroidal magnets. It was mounted on a
    fork and counted spokes on one side of the wheel. Since we used it on two
    bikes, the divide ratio had to be set with a switch since each bike had a
    different number of spokes. It has much better resolution and accuracy than
    the commercial units which receive only one or two counts per revolution.
    It would be easier to implement today using a Stamp.

    Good luck,
    Ray McArthur
Sign In or Register to comment.