So the speedometer quit working on my car. I tried everything I could think of to fix it. Replaced the sensor, followed the wiring through, read everything I could read on the internet... no dice.
So I rewired it.
I learned some interesting and important stuff while doing this project. But I'm still trying to figure out the best way to calibrate it. I have tried several things.
I measured the tire diameter at 23 inches, and calculated how many rotations per mile that should be. I'm not satisfied with the accuracy.
I had my speedometer count rotations while I drove a mile, and displayed how many there were. My city has a grid of major streets spaced one mile apart. Theoretically. In practice, I counted anywhere between 833 and 867 rotations. Those counts were consistent when I drove the route a second time, so I trust the counts, but not the distance.
I marked where the tire hit the road, drove 10 tire rotations, and marked it again, and measured between the marks. Again, I'm not really satisfied with the accuracy.
I would like to get within one or two rotations of accuracy in a mile. Is there generally a place that is measured very accurately that I could drive on? I would rather not use a circular or oblong track because one tire turns less than another on those tracks. I could try to find a place with those nice little green signs on the side of the interstate, if I could find a place that was easy to stop on the side of the road. But I was wondering if there are surveying markers somewhere I could use if I knew how to recognize them. Or something. Or if there is another way.
Remember the distance that matters is what's called the "rolling radius", ie the distance from the centre of the hub to the ground. This will be a bit less than half your diameter because the tyre compresses.
I did all the calcs and used that number to start. Then I tweaked the number over the first couple of drives over a long distance. For example I drove to the next town, the sign said say 100k and my speedo said 105k, so I adjust the magic number and now it's very close. Do this a 2-3 times and it will be as bang on as possible given the other variables like tyres heating up etc. I got to about 1% accuracy as far as I can tell.
In Oz there are often 5k calibration signs on the highways, do you have them in the US?
If you have a GPS as Crossroads said that would be easier than going all the way to the next town.
drove 10 tire rotations
Nowhere near enough to allow for errors, at least 100 would be required I reckon.
Actually I probably won't, you have to take all the other computer stuff as well and I don't trust it. I just bought a "new" Landcruiser and I deliberately got a '95 model because they have bugger-all electronics.
In Britain there are markers on almost all roads the Police use to 'calibrate' their speedometers, usually it's just a mark on curb or pole but sometimes there are signs as well to say statute mile.
I've seen them in USA but nowhere near as frequently (Police in US 'are the law' instead of upholding the law XD)
I had this challenge too. After building the circuit needed to calibrate the speedo, I was left searching for ways to confirm accuracy. I ended up using several things: I downloaded half a dozen free speedo apps on my iPhone and used those that read consistently. I also drove by a few speed-radar signs that flash how fast you're going as you drive by (to encourage compliance with the speed limit). Then I also had a friend with a brand new car pace me on the highway at several known speeds. I can't say my speedo is scientifically accurate, but I'm confident it's at least if not more accurate than the great majority of cars on the road.
Those are some serious LEDs! I might have to look into those when I build my final project. Good point about the rolling radius. That's one reason why I measured the point-to-point of actual distance of ten rotations. But it was a big enough pain to measure 10 cycles. My measuring tape is only 25 feet long and it was over 60 feet. 100 rotations would take me hours.
When I was using millis() to determine deltas for rotation, it would flip back and forth between 49 and 50. I guess that's the jitter your project page was talking about. After I switched to micros() it is SMOOOOTHE. I'm using the Honeywell SS441R hall effect sensor, and I like it a LOT! It just works. No debouncing, no averaging, just measure the delta time and divide.
@ArduinoTom,
That's a pretty impressive project. But if my car is ever going 160 MPH, it's going to hurt when we hit the ground! I expect you're right--my car is probably more accurate than a great majority of the cars on the road. But if I could just get one accurate mile...
You need to measure the circumference of the tyre rather than the radius or diameter which can vary. With radial tyres the circumference is held constant by the interior steel or kevlar structure. So measuring the distance for a number of revolutions should work. You should get a good measure of consistency of measurements if you try, say, 5, 10 and 15 revolutions.
As someone else suggested, I would use a GPS. It might be best to use it to measure distance (if you can find a long quiet straight road) because it would be difficult to hold speed constant without a speedometer.
Perhaps compare the wheel rolling measurements with the GPS measurements.
Another thought is to make a reasonable guess for the settings of your Arduino speedometer and then take it for a drive to compare it with the GPS. After a few recalibrations it should be OK.
TanHadron:
I would like to get within one or two rotations of accuracy in a mile.
Bear in mind that tyre radius (and hence rotations/mile) varies with type pressure. So even if you measure to this accuracy, you won't consistently achieve it.
Also bear mind that in many jurisdictions, speedometers are not permitted to under-read at all. There may be exceptions made for cars manufactured before the current regulations came into force.
As far as I know the rolling circumference of radial tyres does not vary with pressure.
...R
dc42:
Bear in mind that tyre radius (and hence rotations/mile) varies with type pressure. So even if you measure to this accuracy, you won't consistently achieve it.
Long highway trips without cruise control are tiring on the legs, can never relax & stretch.
You've clearly got the wrong kind of vehicle, then. My trike has lots of room for me to move my legs around. Of course, not being able to let go of the handlebars is a pain sometimes. Good thing I've got cruise control.
Robin2:
As far as I know the rolling circumference of radial tyres does not vary with pressure.
As far as I know, too.
Here in the UK we have 100m distance markers along all motorways and they make it very easy to do this sort of calibration just by measuring how long it takes to drive a known distance. Even if you don't have anything like that where you are, it ought to be possible to establish a known distance of a mile or two that doesn't involve any lane changes or significant curves. GPS is very widely available these days and that offers a much more direct and immediate way to do the calibration.
Robin2:
As far as I know the rolling circumference of radial tyres does not vary with pressure.
...R
dc42:
Bear in mind that tyre radius (and hence rotations/mile) varies with type pressure. So even if you measure to this accuracy, you won't consistently achieve it.
Tyre pressure certainly does affect the rolling radius. Some cars use the ABS sensors to warn about tyre deflation by detecting differences in the rotation speeds. Load also affects the rolling radius. The effect is quite small in both cases, for example 0.5% for a large change in load or pressure. So I guess an accuracy of 0.2% might be achievable assuming the pressure is kept about right.
dc42:
Tyre pressure certainly does affect the rolling radius.
I am reminded of the story of the old lady looking with dismay at the flat tyre on her car - she was going to be late for church. Her non-driving friend said "why don't you turn it round, there's nothing wrong with the top".
dc42:
Tyre pressure certainly does affect the rolling radius
Yes, but the magnitude of the effect is negligibly small in the context of speedo accuracy. It's certainly not as simple as saying that the flat spot has reduced the 'rolling radius' between the road and the axle, which is a common misconception.
More significantly, the calibration will be affected quite noticeably by tread wear. In the UK cars are usually designed so that they may over-read but will never under-read. That means you would need to calibrate the speed so that it was about right with brand new tyres; it would then gradually start reading high as the tread wore away.
Robin2:
As far as I know the rolling circumference of radial tyres does not vary with pressure.
...R
dc42:
Bear in mind that tyre radius (and hence rotations/mile) varies with type pressure. So even if you measure to this accuracy, you won't consistently achieve it.
Tyre pressure certainly does affect the rolling radius. Some cars use the ABS sensors to warn about tyre deflation by detecting differences in the rotation speeds. Load also affects the rolling radius. The effect is quite small in both cases, for example 0.5% for a large change in load or pressure. So I guess an accuracy of 0.2% might be achievable assuming the pressure is kept about right.
Yes, my 2000 Buick uses the ABS sensors to warn of low tire pressure. It can't tell me which tire is low and when it first detects the lower tire you can't really tell by eye which it is (if cause by say a slow tire valve leak) but a quick check with a tire gauge indeed will flush out the slightly lower tire. Pretty cool trick in that it didn't require any additional hardware, just extra software in the car's computer(s).