PDA

View Full Version : Adding a speedometer in my BoeBot?



John Astralidis
01-21-2006, 10:22 PM
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.

Tibo
01-21-2006, 10:52 PM
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.

++

Jonathan
01-22-2006, 12:48 AM
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 (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

hank van buren
01-22-2006, 03:20 AM
You might be interested in this http://www.parex.org/weblog/archive/000033.html regards Hank

bulkhead
01-22-2006, 07:11 AM
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 Astralidis
01-25-2006, 03:34 AM
Hank,

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

What am I missing ?

John.

John Astralidis
01-25-2006, 03:35 AM
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 Astralidis
01-25-2006, 03:47 AM
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.
http://forums.parallax.com/images/smilies/blush.gif

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

http://forums.parallax.com/images/smilies/blush.gif

Tibo
01-25-2006, 04:11 AM
have a look here : http://www.parallax.com/html_pages/robotics/machining/RPM_display.asp :)

John Astralidis
01-25-2006, 04:46 AM
Tibot,

really interesting. Thanks.

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

John.

John Astralidis
01-25-2006, 05:23 AM
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

bulkhead
01-25-2006, 06:10 AM
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 Astralidis
01-25-2006, 06:19 AM
So, what do u suggest?

Let's say about the GPS thing?

Tibo
01-25-2006, 06:37 AM
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 :))
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 Astralidis
01-25-2006, 06:48 AM
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.

Tibo
01-25-2006, 06:36 PM
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...

++

aridaios
01-25-2006, 11:12 PM
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 Astralidis
01-26-2006, 01:38 AM
aridaios,

did u post in wrong forum?

If not, except from "Panagiotis ?" how the infoz u posted may help ?