Shop OBEX P1 Docs P2 Docs Learn Events
Speedometer - Longboard — Parallax Forums

Speedometer - Longboard

ArsinArsin Posts: 10
edited 2008-12-09 02:03 in BASIC Stamp
dsc03715cg1.jpg

So I was planning on doing something like that
Black = magnet
Red = Hall Effect Sensor

Now since Ill be riding it my wheel's will eventually be losing rubber, since my math will be based on when the sensor gives a value of 1 it means it has traveled .000267km (26.7cm) then divide that by the time. Since Ill be losing rubber the distance traveled per revolution will decrease is there a better way to set this up?

Also I'm working on a flow chart and I'm going to say this now before I get yelled at, I suck a flow chart's I just did w.e I thought looked right still new to all this jazz please tell me what's wrong but don't flame OMG YOU SUCK NOOB thanks.

Here it is...

33020378qu4.jpg
w575.png

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-12-07 06:29
    These forums are friendly forums... [noparse]:)[/noparse]

    Anyway, one thing you could do is to measure how many revolutions are in the life of a wheel, and the change in diameter over the life of the wheel. Simply find the difference between the start diameter and the end diameter, and divide by the number of revolutions, and you get the change in size for each revolution of the wheel.

    Of course, this requires that you ride the wheel through it's life, and wear it out, before you can do any sort of speed measurement. It also assumes that all wheels wear at the same rate, and that this rate is constant. The upside is that you don't need any other sensors or hardware.

    I'm thinking that it's probably very difficult and inaccurate to measure the wheel circumference directly. What about this strategy: You set it up to count the max RPM, and then you ride down a hill with a GPS that can tell you the max speed. Then you can just do some math to figure out how big your wheel is to a much more precise value.
  • remmi870remmi870 Posts: 79
    edited 2008-12-07 06:51
    the fundamental problems with doing any rotational based project is measuring the pulses from the sensor, even tho the wheel will be rotating at relatively low rpm (ie a 2" wheel· at 20 mph will be rotating around 5 rps, or 21 ms per revolution, however the pulse may only be around the 2-4 ms depending on the sensor. this would be very dificult to record and over the lifetime of a wheel you could have many skips or missed pulses that would change your math all together.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-12-07 14:06
    You can add magnets [noparse][[/noparse]evenly spaced] to increase resolution (more pulses/rev.)

    Know anything about car speedometers?· They're not dead-on absolute.· The actual speed is less than that indicated.· Don't get bogged down with side-issues like "loosing rubber vs. long-term accuracy".

    Start with the counter circuit and use the COUNT command.· Then you can bridge to the next element in your flow chart.· Go step by step by step, one foot in front of the other.
  • ArsinArsin Posts: 10
    edited 2008-12-07 20:00
    So which basic stamp should I buy?

    I was looking at one of these LCD Screens cgi.ebay.ca/20x4-LCD-Display-Microcontroller-for-Basic-Stamp_W0QQitemZ250335229833QQcmdZViewItemQQptZBI_Electronic_Components?hash=item250335229833&_trksid=p3286.c0.m14&_trkparms=72%3A1215|66%3A2|65%3A12|39%3A1|240%3A1318 so then I need a minimum of
    16 pins there
    then like 2 pins for two hall effect sensors (Correct me if I'm wrong)
    and 1 for a push button (start/end)
    = 19 pins

    Will I need anymore pins?

    So far I need
    (1) Basic Stamp ____
    (1) LCD Screen
    (2) Hall Effect Sensors
    (2) Magnets

    What else do I need to add on my shopping list?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-12-07 20:38
    The LCD takes up only 7 I/O lines (see pic attached.)

    Why "like two" Hall switches?· [noparse][[/noparse]Seems one should do, but it's your project.]
    665 x 354 - 34K
  • ArsinArsin Posts: 10
    edited 2008-12-07 20:42
    Although it's unlikley that Ill be doing over 100km/h once I do get better I'll probably go up to 105 in which case I can just make the sensors read .000 113 5km per time it touches a sensor but I guess by then Ill be using a proper GPS to get more accurate results so ya I guess Ill just stick with one. Which basic stamp should I buy?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-12-07 21:11
    I've been reviewing your design goal/s.· Any BS2 would be good for making a speedometer with, but you listed a number of other specs, too (elapsed time, odometer, speed and other logging.)· That's just begging for "parallel processing", a Propeller.· Things can be worked out to one end or another, but you have to understand that a Stamp can only do one thing at a time (it can be busy counting, then calculate, then send results to LCD, then...).· It does things quickly, but everything takes time.

    A GPS won't get you better speed results, it's an average over appreciable distance/s.

    (100km/h, 60mph?)

    I don't want to talk you into or out of anything.
  • ArsinArsin Posts: 10
    edited 2008-12-07 21:15
    Since I don't even know PBasic perfectly or basic for that matter, learning a new language wont be too bad, but how hard is to compared to PBasic
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-12-07 21:24
    "Spin" is a different environment.· Maybe people who go into it with a blank slate do better?· You could run a speedometer program in one cog (there are 8), an odometer in another an LCD program in another, and so.· And you could build up as go on, that way, too.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-12-07 21:24
    Arsin,

    You're going to suffer more inaccuracy from turns (inner wheels turning more slowly than outer wheels), bounces (wheels losing contact with pavement), and skids than you will from wheel wear; so I wouldn't worry so much about the latter. Just keep it simple, and you'll have a more satisfying outcome.

    -Phil
  • ArsinArsin Posts: 10
    edited 2008-12-07 21:26
    So what do you suggest I do? Buy a GPS?
  • SRLMSRLM Posts: 5,045
    edited 2008-12-07 21:37
    What about having two encoders on two different wheels for accuracy. If you have a GPS already, you can figure out how what the average rotation per second is for a particular speed (given by the GPS). However, it all depends on how accurate you want/need it to be, and how much effort you want to put into it.
  • ArsinArsin Posts: 10
    edited 2008-12-07 21:52
    How can I get RPS with a GPS?
  • SRLMSRLM Posts: 5,045
    edited 2008-12-07 23:39
    You don't. You use the wheel encoders to calculate RPS, and the GPS to tell you how fast you are going for a given RPS. Then, you can create a linear approximation:

    When I'm going 10 mph, my wheels are rotating at 10 rps. Therefore, I know that 1 RPS is one mph.

    By doing it this way, I think you can get a more accurate speed measurement than just by measuring wheel circumference directly.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-12-08 16:02
    I guess my only concern would be regarding the forces on the main board and LCD...I've seen what skateboards go through. =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • flying_flipflying_flip Posts: 36
    edited 2008-12-08 23:36
    Mount the project box on the board with rubber spacers...
    It's like a bolt on each end with rubber in between.

    I used them in FIRST Robotics for mounting the CPU/Controller

    Phil
  • SRLMSRLM Posts: 5,045
    edited 2008-12-09 01:47
    You could also mount it on a long bolt, with springs on either side. More travel than rubber.
  • ArsinArsin Posts: 10
    edited 2008-12-09 02:03
    My plan was a wooden box the size of the breadboard or w.e it sill I'll be using then just rubber to press it so it wont jiggle around and holes for the wires to wheels.
Sign In or Register to comment.