Shop OBEX P1 Docs P2 Docs Learn Events
Adding a speedometer in my BoeBot? — Parallax Forums

Adding a speedometer in my BoeBot?

John AstralidisJohn Astralidis Posts: 28
edited 2006-01-25 17:38 in BASIC Stamp
Hi guys!

The last few days I came across an idea adding a spedometer in my R/C nitro-gas car. My car will be controlled by the BasicStamp2(so be it for the code, so long), of my BoeBot Full Kit, and I want to add a speedometer to it as to get the speed of the car, like the one we use in bicycles.

So, I wonder what hardware I have to use, if I can connect that extra hardware in my BasicStamp and how to get that speed in my PC screen.

If you have anything in mind, please let me know. Anything would be highly appreciated.

Best Regards,

John.

Comments

  • TiboTibo Posts: 81
    edited 2006-01-21 14:52
    A magnet on the car's propulsion wheels.
    A Hall's effect sensor to detect the magnet every wheel rotation.
    Thus measuring the car's wheel rotation speed.

    Or a wheel encoder set on the propulsion wheels adding more resolution to your speedometer.

    Or a GPS input if your car will run outside.

    Or even a fifth wheel (not propulsive, not connected to any engine but totally free) set as the two first proposals (hall's effect sensor or encoder.
    This configuration has the advantage to get quit rid of the skid effect if well suspended on the ground but mechanics is more difficult to integrate.

    ++
  • JonathanJonathan Posts: 1,023
    edited 2006-01-21 16:48
    John,

    I hate to say it, but a Stamp might be too slow to control your car AND keep track of speed. I added a odometer (not speedometer) to a robot of mine using a roatry encoder and found that the Stamp was too slow to keep up, and it is a slow servo powered robot. I ended up using a PIC as a co-processor running at 20mHz, and it does fine.

    What about some kind of counting chip that would track the pulses and then the Stamp could query it for the count? Or perhaps a dedicated Stamp might be ok, get a fast one. Before you get one to try, figure out your sensor. If it is a encoder or a wheel with magnets etc, do a little calculation. Estimate the speed of the car, then take the diameter of the wheel and do a little math to see how fast the Stamp will have to count pulses, then take a look at the spec sheet of the Stamp you want to use and determine if the required sample rate can be done by the Stamp.

    Another possiblitly wuld be to gear down the sensor wheel and hence slow it down. As long as you can keep the resolution to 1-2 MPH, that should be OK for what you are doing.

    Even better would be to use an SX chip. It could do that standing on it's head.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • hank van burenhank van buren Posts: 57
    edited 2006-01-21 19:20
    You might be interested in this http://www.parex.org/weblog/archive/000033.html regards Hank
  • bulkheadbulkhead Posts: 405
    edited 2006-01-21 23:11
    Hey, John, I'm just curious, what car is it? Also, isn't it kinda dangerous to have a stamp control a nitro RC car?

    I don't think an encoding system would work, because the tires on RC cars are rubber and will expand because of the centripetal force at high speeds. If anything, it would be really far off (a 3in diameter tire can expand to 5in easily at top speed).

    The best approach would probably be a GPS system. Nowadays, you can purchase bluetooth GPS recievers (for car navigation via laptop) for relatively cheap. Your best bet would probably be to find a way to increase the range of one of these bluetooth recievers, so it could send the data all the way to your computer.
  • John AstralidisJohn Astralidis Posts: 28
    edited 2006-01-24 19:34
    Hank,

    I did not find anything particular in the link you posted.

    What am I missing ?

    John.
  • John AstralidisJohn Astralidis Posts: 28
    edited 2006-01-24 19:35
    bulkhead,

    the magnet or whatever will be put on the wheel not on the tire, as for the reason you mentioned.

    Also, could you please tell me how the GPS bluetooth receiver would make the trick that I want in my case?

    Thanks,

    John.
  • John AstralidisJohn Astralidis Posts: 28
    edited 2006-01-24 19:47
    Jonathan,

    I did a little math about my RC-car-wheels' circumference and its top speed (approximately).

    a) Wheel's circumference = 20,5 cm,
    b) top speed = 80 km/h = 2.222,2 cm/sec.

    According the above, each wheel's rotations per second (rps) at top speed would be: rps/s @ top speed = 2.222,2/20,5 = 108,4.
    So, my BasicStamp2 (BS2) will have to monitor 109 counts per second. I read in its specifications sheet that it's capable for 4.000 instructions per second. So, I think this is fast enough to keep up with my 109 counts/sec, that I want to monitor. Am I right ?

    All the above is an idea that I have, similar to the one you have proposed; to put a magnet or something like that to one of the car's wheels, as to send a high signal to a BS2's I/O pin, every time the magnet (or something else) faces a sensor that is directly connected to my Board-of-Education (and that with the BS2). Like, the examples with the IR-Detectors and obstacle avoidance (Robotics with the Boe-Bot). Except now, instead of an obstacle there is a magnet or something like to inform the sensor that a full rotation of the wheel was done.

    Is my thought implementable? What kind of sensor would it be as to connect with my Board-of-Education?Anything that wants more thought or care?

    Also, I want my BS2 to SEROUT that result of measured speed through its SERIAL port (9600baud, 8N1) to my Linksys WRT54GS Router that also has a COM port controlled by a MAX233A adapter and then the Router to transmit the result through a WLAN (802.11g) to my laptop.

    Should this rate of 108,4 counts /transmits/ per second be fast enough, as to get the data (speed) back to my laptop from the BS2 over the WLAN?

    Best Regards,
    J.A.
    blush.gif

    [noparse][[/noparse]IF ANYONE ELSE WOULD LIKE TO POST A REPLY, PLEASE FEEL FREE TO DO SO]

    blush.gif
  • TiboTibo Posts: 81
    edited 2006-01-24 20:11
  • John AstralidisJohn Astralidis Posts: 28
    edited 2006-01-24 20:46
    Tibot,

    really interesting. Thanks.

    [noparse][[/noparse]I wonder if I can make it on my one ???]

    John.
  • John AstralidisJohn Astralidis Posts: 28
    edited 2006-01-24 21:23
    Tibot,

    did u figure out where the Melexis 90217 Hall-Effect Cam Sensor is placed inside that black box , so as to senses the little magnet rpms?

    John
  • bulkheadbulkhead Posts: 405
    edited 2006-01-24 22:10
    Even if the sensor is placed on the wheel, the tire+wheel 's diameter (and circumference) changes depending on how fast you go. Your calculations now are based on a tire circumference of 20.5cm, but that may get larger as you speed up. How much larger the circumference gets will reflect how accurate your speed readings are. Some tires may expand to 50% its original diameter, which would give a speed reading off by 50% (or around there).
  • John AstralidisJohn Astralidis Posts: 28
    edited 2006-01-24 22:19
    So, what do u suggest?

    Let's say about the GPS thing?
  • TiboTibo Posts: 81
    edited 2006-01-24 22:37
    In operations, the sensor is closed to the path of the magnet so it can 'feel' it.
    In this case I beleive the magnet is set on the axis of rotation.

    I suggest you dont put it on the tire [noparse]:)[/noparse])
    Put it on a disk which may already exist (such as gear) or on the tire bead if you can.

    GPS can be use if you run the car outside. It wont work inside.
    Your will find many threads on this forum about interfacing a Basic Stamp and a GPS.
    There's even more : John William is running a 'GPS Helper' chip project and there is a thread about it.
    Use this search engine for better results : http://search.parallax.com

    ++
  • John AstralidisJohn Astralidis Posts: 28
    edited 2006-01-24 22:48
    Thanks Tibot.

    (The previous post of mine was for bulkhead.)

    As, for the magnet I will glue it in the wheel and have a distance between that and the sensor about 1,5cm. Do u believe that distance is ok?

    J.A.
  • TiboTibo Posts: 81
    edited 2006-01-25 10:36
    I'm sorry I cant tell since i've never used such a sensor, but, to my knowledge, it depends on the magnet strenght...
    You will find the sensor datasheet here : http://www.melexis.com/prodfiles/MLX90217_rev9.pdf
    Anyway, you will have to test, tune, fine tune, etc...

    ++
  • aridaiosaridaios Posts: 57
    edited 2006-01-25 15:12
    Dear Panagioti,

    I am working on a remote control project with feedback and I think maybe some products I study may help you too.
    Please have a look at the following links:
    1.·http://www.crownhill.co.uk/product.php?prod=434·· example code·at·http://www.rentron.com/Stamp_RF.htm
    2. http://www.active-robots.com/products/radio-solutions/radio-communication.shtml

    glad to give any help,

    Michail
  • John AstralidisJohn Astralidis Posts: 28
    edited 2006-01-25 17:38
    aridaios,

    did u post in wrong forum?

    If not, except from "Panagiotis ?" how the infoz u posted may help ?
Sign In or Register to comment.