xendelaar

tips on building a trip master/ tachometer/ odometer

Recommended Posts

1 hour ago, Shpaget said:

Kudos for getting some hardware on line!

I wouldn't be surprised with the difference in odometer and your hall sensor device. Odometers are not particularly accurate devices and there could have been some error in your measurements of the tire diameter. You could and probably should calibrate your device by comparing its data to some known and well measured distance such as a football field or a decent stretch of straight road and compare it to GPS data or even Google maps measure tool, which is certainly better than 7% accurate over a few kilometers.

Great job anyway!

I think you're right about that. I also later found out that my tire was rather flat, so that could also explain some of the deviation. These things are all pretty easy to solve. I just need some way to calibrate the system. Using a football field or google maps are both really great ideas. I was thinking of using the hectometer signs on the freeway. Maybe I'll check all of the options. :)

 

 

Share this post


Link to post
Share on other sites

Glad to hear you’re making progress. As I went through this thread I also thought of the ABS sensor, great minds and all that. But now to the point...

When determining your wheel/tire radius, it’s important to measure the loaded radius. Measure from the center of the wheel to the ground, not the top of the tire. That will give you the most accurate result when calculating circumference. Remember you want to be at rally weight, so have someone in the drivers seat and anything else that might be aboard. 

Of course, calibrating against a known distance as suggested above is also a great idea. 

Share this post


Link to post
Share on other sites

 

On ‎4‎/‎18‎/‎2018 at 2:46 AM, StrandedonEarth said:

Glad to hear you’re making progress. As I went through this thread I also thought of the ABS sensor, great minds and all that. But now to the point...

 

Yeah, wel.. i ran into a wall (is that a correct English expression) when I went to car shop and learned that they couldn’t retrieve the ABS signal for me. Especially knowing that GoSlash showed that it should be possible! Maybe I asked the wrong questions or maybe the mechanic didn’t feel like doing it.. I don’t know… It was kind of frustrating.

 

On ‎4‎/‎18‎/‎2018 at 2:46 AM, StrandedonEarth said:

When determining your wheel/tire radius, it’s important to measure the loaded radius. Measure from the center of the wheel to the ground, not the top of the tire. That will give you the most accurate result when calculating circumference. Remember you want to be at rally weight, so have someone in the drivers seat and anything else that might be aboard. 

Interesting idea! So you’re saying that the radius from the ground to the middle of my tire determines the frequency at which my wheel revolves? Fascinating!

I will definitely have to look into that. I don’t think it will be necessary for the “rally” though. During the rally, I have a description of the route as a text document. The document gives directions of where we need to go. For instance:

  1. At the red house, turn left

  2. At speed limit sign go right

  3. At chapel turn left

  4. Etc

  5. Etc

During the first 5 km(or so) the exact distance is given per direction, so:

  1. At the red house, turn left (0,51 km)

  2. At speed limit board 50 kmpu go right (1,43 km)

  3. At chapel turn left (4,78 km)
    <entering unkown zone>

  4. at crossing go left

  5. Etc

I can use these distances to calibrate the system. The real circumference of the wheel is in this case not relevant, since this is the free variable I use to fit my Arduino data with the given data.  

I will use the wheel circumference for testing purposes. It's Always better to start with a near calibrated system!

 

On a completely different note: I finally mounted all everything onto the car and wheel. Tomorrow I will perform my first tests (YEAY).

If anybody is interested: I will post some pictures and results afterwards. I will post them even if you guys are not interested.. ;)

Share this post


Link to post
Share on other sites

yesterday I mounted the sensor and magnet onto my car and performed a test.  the results were perfect! check this out.  

here you can see the sensor being activated by the magnet!

http://imgur.com/a/cFvfqFR

 and here you can see the results from de arduino versus the tachometer measurements! it's almost perfect

http://imgur.com/a/PQZIDeJ

 

Edited by xendelaar

Share this post


Link to post
Share on other sites
On 1/26/2018 at 5:03 PM, Shpaget said:

 

What you do need to worry about and take seriously is the electrical noise of the car itself. Spark plugs and alternator are quite messy and you'll need to filter that out.

 

@Shpaget funny that you mentioned this.  I got much noise from the computer Power plug! it totally messed up the readings.i think it's caused by the alternator switching 12V dc to A.C.220v to 19V DC... 

ill have to find a way to shield the  arduino signal from that noise

Share this post


Link to post
Share on other sites
On 5/5/2018 at 8:00 AM, Shpaget said:

Yeah...

Are you using interrupts or are you polling your sensor? Try debouncing techniques. 

Do you have access to an oscilloscope?

Give this thread a read:

https://forum.arduino.cc/index.php?topic=391811.0

I tried making an emitter follower and fried my hall sensor. So excluded that thing during the next iteration. :D I just read your post after finding another (potential)  solution. I attached the cars 12 volt directly to the laptop.  So this way, I don't need an DC to AC to DC converter. It seems to work, but I'll  have to perform a big experiment tonight in order to be sure!
12 Volts is not enough to charge the laptop (which needs 19 Volts) but I'm hoping it will prolong the battery life by a couple of hours!

I will read into your advanced techniques! It sounds fascinating! I do not have access to an oscilloscope, but my colleague told me I could make one from a simple microphone plug and a computer? I'm not sure what he was talking about though hehe.

Share this post


Link to post
Share on other sites

Last week I performed several tests with my Arduino setup. I drove 20 km and performed measurements with the cars odometer and my arduino for every km. The only free variable I have is the circumference of my tire.  So, after 20 measurements I adjusted the theoretic circumference of the tire so that the Arduino measurements fitted the odometer perfectly, using the root of least squared method. I got a perfect fit (R^2 = 1,0000 and y = 1,000 * X ) in every case.

 

I did this experiment 3 times during one week. 2 days were sunny days, while one day was rainy. The results were a bit troublesome.

I noticed the circumference is different every day/experiment:

Day 1: 2,07369 m (a comma is a dot in the netherlands)

Day 2: 2,07301 m

Day 3: 2,07265 m (cold and rainy)

 

The theoretic circumference also changes during the test:

 

  • At the hot days the circumference increased while driving until it reached a certain ceiling after a couple of km’s (>5 km)

  • At the cold day the circumference decreased while driving until it reached a certain plateau after a couple of km’s (>5 km).

     

    So I notice a difference in the calculated circumference of 1 mm, which doesn’t sound like much, but adds up to a deviation of  >200 m in 200 km’s, which is quite unacceptable.

     

    I’m thinking this deviation could be caused by two things:

     

  1. The air inside the tires expands and contracts due to the hot or cold/wet weather
     

  2. It could be that the difference is caused by the fact that I’m only measuring the right back tire and neglecting the influence of corners. For instance.. when I only make left turns, the right wheels spins faster than the left tires, which could cause for non-correctable deviations compared to the odometer of the car.

     

    If the deviation is caused by the temperature, then I can’t do anything about it. It still is a bit weird that the theoretic circumference varies while the cars odometer isn’t influenced by the temperature. So come to think of it.. It quite unlikely that this is the case…  

    If the deviation is caused by measuring at only one tire, I could make another sensor and stick it onto the left back tire.

    Tomorrow I will perform another test. I will drive 10 km’s… fit the data to get a correct theoretic circumference and then drive 10 km to test is the fit stays perfect! If it deviates. I’ll have to change my setup…

     

    Well.. I just wanted to get this of my chest. If anybody has any suggestions or ideas, I’m all ears! :D

     

Share this post


Link to post
Share on other sites

What if you got an optical mouse, attached it to the bottom of the car (focus the sensor to the ground with a lens or something) and use the Y displacement as distance?

I think Willian Osman did something like this

 

Share this post


Link to post
Share on other sites
9 hours ago, xendelaar said:
  1. If the deviation is caused by the temperature, then I can’t do anything about it.

     

Actually, you can.

Go to a local tire shop thing and ask them to fill your tires with nitrogen. It's not terribly expensive.

Air contains quite a bit of water which is a significant factor in thermal expansion of air.

Share this post


Link to post
Share on other sites
15 hours ago, Shpaget said:

Actually, you can.

Go to a local tire shop thing and ask them to fill your tires with nitrogen. It's not terribly expensive.

Air contains quite a bit of water which is a significant factor in thermal expansion of air.

Thanks for the reply!
Wouldn’t the pressure being governed by the ideal gas law (p * V = n * R * T)? In that case, the pressure would be independent of the gas composition, assuming all vapors remain gaseous during the trip, right? If condens is formed then you're completely right off course! :D

Also, if the composition/temperature or pressure does change the circumference of the tire, the same error would be measured by both car odometer and Arduino. In other words, the error would occur in both systems at the same order of magnitude so you wouldn’t measure any differences at any given temperature or pressure.

Share this post


Link to post
Share on other sites

I think you could make a system that combines the trace from GPS and the wheel turns.

 

TBH most odometers on wheeled vehicles uses the # of wheel turns. Even Mars rovers uses them...

Share this post


Link to post
Share on other sites

Yes, odometers and speedometers are usually geared to the output shaft of the transmission. Not sure why this would give a different result from your Arduino setup, aside from corners. The odometer would be taking the average of both drive wheels because of the differential gear in the middle. So having sensors on both back wheels makes sense so you can compare and/or average them.

Water changing to vapor when the tire heats up increases the tire pressure more than the ideal gas law would, so @Shpaget's suggestion about filling with nitrogen is valid (but then you can't pull a James Bond and breathe from the tires of your sunken car while the bad guys wait for you to drown). Ideally you want to calibrate things for hot tires and warm up the tires before starting measurements. Could you rig your computer set up to have hot/cold settings for different weather conditions?

Another thought on temperature: cold tires don't stick as well, and so may be slipping a tiny bit, especially when accelerating or decelerating.

On your three test drives, did you follow the exact same route each time, right down to lane changes? Different routes with a different number of corners could also skew measurements. Is it a manual transmission? Any rollback will not be registered by the odometer but will trip the arduino sensor.

Ideally, you want to find a straight stretch of road where you can mark off a true kilometer, with markings painted on the road. Perhaps ask a city surveyor for help with this, for the greatest accuracy and legality. Perhaps storm drains, lampposts or street signs can serve as markers. Then you can calibrate everything off your "true kilometer".

Sorry, I'm kind of rambling...

Share this post


Link to post
Share on other sites
On 5/15/2018 at 4:53 PM, YNM said:

I think you could make a system that combines the trace from GPS and the wheel turns.

 

TBH most odometers on wheeled vehicles uses the # of wheel turns. Even Mars rovers uses them...

GPS is not the right way to go for my  case. My odometer also works with the # of the wheel turns. :D only my setup uses only one wheel, whereas the odometer from my car probably uses all wheels or just the ones from the main shaft (I think).

On 5/16/2018 at 2:20 AM, StrandedonEarth said:

Yes, odometers and speedometers are usually geared to the output shaft of the transmission. Not sure why this would give a different result from your Arduino setup, aside from corners. The odometer would be taking the average of both drive wheels because of the differential gear in the middle. So having sensors on both back wheels makes sense so you can compare and/or average them.

 

 

Averaging the distance between two wheels would be the perfect solution! I'm sure of it!  Thanks for your Ramblings.

yesterday I did another test.

 

Aims of the test
Test the arduino over a large distance in urban area with a lot of corners. If the inaccuracy is less than 200 meters (0.124 miles) per 100 km (62.1 miles), then the setup is acceptable!

Method

  1. I drove 10 km (6.2 miles) on the freeway,
  2. I then calibrated the Arduino
  3. I drove into an urban area and started driving through the neighborhood. I took as many corners as possible. I didn't count the left or right turns and just drove a bit at random. This will happen also during the real "rally", but in less extreme extend..
  4. After 26 km I stopped and measured the difference between the Arduino and car odometer.

Results
The difference was 21 meter at 26 km. Which corresponds with  < 80 meter (0.05 miles) per 100 km (62 miles)..
This is far from perfect, but for my application is accurate enough... Well.. it is acceptable 

I would still like to install another sensor on the opposite wheel, but the car we are using isn't my own and the owner (my father in law) doesn't want another magnet on a tire. So there is little I can do about that..

What's next?
The rally will take place next week. There is little time to think of another way to measure the number of wheel turns on a car without placing a marker on the tire. I’ve been flirting with the idea of using sonar to measure the spacing between the tire rims, but I don’t know if this method is fast enough.
If I don’t find a way, the current method will perform ok, but it does feel a bit sloppy…

If any of you have any suggestions I’m eager to listen. :D

Edited by xendelaar

Share this post


Link to post
Share on other sites

just wanted to let everybody know we won the contest! 

the Arduino worked like a charm! we did have a fairly large deviation at the end if the day: 300 meters per 100 kilometers... we noticed that the error the route maker makes was larger than the error we made by only using a sensor on one tire...

still.. I will make an even better version next year! 

thanks again for all the help!

Edited by xendelaar

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.