View Full Version : Adding a speedometer in my BoeBot?
01-21-2006, 09:22 PM
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.
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.
01-21-2006, 11:48 PM
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.
www.madlabs.info (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot
hank van buren
01-22-2006, 02:20 AM
You might be interested in this http://www.parex.org/weblog/archive/000033.html regards Hank
01-22-2006, 06: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.
01-25-2006, 02:34 AM
I did not find anything particular in the link you posted.
What am I missing ?
01-25-2006, 02:35 AM
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?
01-25-2006, 02:47 AM
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?
[IF ANYONE ELSE WOULD LIKE TO POST A REPLY, PLEASE FEEL FREE TO DO SO]
have a look here : http://www.parallax.com/html_pages/robotics/machining/RPM_display.asp :)
01-25-2006, 03:46 AM
really interesting. Thanks.
[I wonder if I can make it on my one ???]
01-25-2006, 04:23 AM
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?
01-25-2006, 05: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).
01-25-2006, 05:19 AM
So, what do u suggest?
Let's say about the GPS thing?
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
01-25-2006, 05:48 AM
(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?
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...
01-25-2006, 10:12 PM
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
glad to give any help,
01-26-2006, 12:38 AM
did u post in wrong forum?
If not, except from "Panagiotis ?" how the infoz u posted may help ?