OLA ICM-20948 Distance Traveled by Forklifts

Hello, I searched thru the forums but could not find an answer for this, hoping someone can help.

I am trying to use an accelerometer to capture the distance traveled by a forklift. I am only concerned with the total distance traveled. The direction, true position, and orientation are not important.

The goal is to gather data about how far our forklifts travel, average speed, and total time in motion over a 24hr period.

I purchased the OLA ICM-20948 because it was supposed to be an off-the-shelf solution, but I am not understanding the data it outputs. The acceleration values are unitless and fluctuate around a few hundred to a thousand depending on the axis.

How do I process the data from the ICM-20948 to measure speed?

Thank you for your help with this :slight_smile:

Check out the format/config options here https://learn.sparkfun.com/tutorials/op … figuration (it’s all good info, but be sure to scroll down to IMU section)

You’d need to calibrate the accel output while standing still; then at full speed on the fork lift, and 50% speed values to accomplish what you’re after

Also note that we sell a kit https://www.sparkfun.com/products/18294 that accomplishes this same thing :smiley:

You could also add in some wheel encoders and use/send their analog signal to the OLA to do the same with only a couple $ more in parts

Thank you for the reply.

I see now in the hookup guide that the units are milli-gs, so that helps a little.

The IMU section says to adjust the “Full-Scale Values”, what does that do?

It also talks about enabling the “DMP”, do I need to do that to achieve what I am wanting?

How do I “calibrate” this at 50% and 100% speeds? There are no instructions for calibrating it.

Thank you,

I purchased the OLA ICM-20948 because it was supposed to be an off-the-shelf solution

Where on earth did you see that?

You’d be much better off counting wheel ticks to get distance and wheel ticks per unit time for speed.

Using an accelerometer to get speed and distance isn’t going to be accurate.

If you’re operating outside all the time GPS would work. If you’re indoors at all don’t bother with GPS.

See the link below for one of the places I saw it. They said you basically just plug it in, no coding required, and it gets acceleration data that can easily be processed into speed.

I am beginning to think you are correct that counting ticks or some sort of encoder is a better solution. Do you have recommendations on some boards I could use for that?

Thank you in advance.

https://www.sparkfun.com/news/3361?_ga= … 1671826249

OK, that link is for a product that also happens to have a ICM-20948 included on it and also has been pre programmed to spit out/log data from the sensor. I was thinking you just had the bare ICM-20948 sensor bord on it’s own.

An IMU will give you acceleration, rate of turn and direction of orientation relative to the earth’s magnetic field but won’t give you speed with out a bunch of math and even then it won’t give speed very accurately.

Off the top of my head I don’t remember what the openlog outputs but it’s probably 9 separate numbers separated by commas. 3 of those numbers will be acceleration in G, 3 will be (probably) degrees per second turning and the other 3 will be units of gauss (magnetism). The 3 numbers corresponding to the X,Y and Z axes of movement.

The reason you can’t get speed/distance is that measures drift over time an that will affect accuracy. The other reason is once you speed up and hold the same speed and direction, pretty much everything will read the same as if you were not moving at all.

Not sure what sparkfun has for wheel ticks, but if you’re able to put something on an axel that sends out one or more pulses per revolution of your tires, a little math can turn that into a speed and distance. A hall effect sensor or a Reed switch along with one or more magnets on an axel would do the trick.

For example, if one tire revolution takes you 1 foot in distance, you know that you’ve gone 1 mile every time you count 5280 revolutions. If you now you’ve made 22 revolutions in 1 second (at 1 foot per revolution) that comes out to 15 miles per hour.

I’m not aware of a product that does all that out of the box so you’d need some sort of micro controller and a bit of software to do the sensor reading and calculations to give you speed and distance.

TS-Russell:
You could also add in some wheel encoders and use/send their analog signal to the OLA to do the same with only a couple $ more in parts

Is there a way to make the OLA work with the encoder in the link below?

If not, does Sparkfun sell any other solutions for easily data logging encoders?

https://www.amazon.com/Polyurethane-Pos … e2f90&th=1

Not really. I mean it will record that the encoders sent pulses but that data won’t mean anything without further processing. You really need an arduino and to write a bit of software to “decode” the data from the encoders and calculate a speed and distance.