0

Arduino, and speed over the ground
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Arduino, and speed over the ground

by marcelops on Mon Jul 29, 2019 2:35 pm

Hey guys,

What is the most accurate way of calculating speed over the ground with Arduino? I head lots of discussions about different sensors and techniques, but I would like to ask you what is currently the most accurate way of accomplishing that.

Thanks,
Marcelo

marcelops
 
Posts: 28
Joined: Thu Apr 23, 2015 6:25 pm

Re: Arduino, and speed over the ground

by adafruit_support_bill on Mon Jul 29, 2019 2:52 pm

It depends on the situation. Over larger distances outdoors, it is hard to beat GPS. If you are running on fairly smooth hard surfaces, you can do pretty well using wheel encoders.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino, and speed over the ground

by marcelops on Mon Jul 29, 2019 3:01 pm

I can't add a wheel to the system. It needs within a single sensor of some sort.

An object will be moving in the surface of the water, and it will change its directly constantly (let's say, after a few minutes or so). I just need to calculate the speed the object is moving.

marcelops
 
Posts: 28
Joined: Thu Apr 23, 2015 6:25 pm

Re: Arduino, and speed over the ground

by millercommamatt on Mon Jul 29, 2019 3:14 pm

How often do you need to update. What are your requirements for precision?

millercommamatt
 
Posts: 415
Joined: Tue Jul 31, 2018 4:57 pm

Re: Arduino, and speed over the ground

by adafruit_support_bill on Mon Jul 29, 2019 3:18 pm

On water there are paddle-wheel or propeller type speed sensors. I believe Garmin makes one. Of course that is speed relative to the water - not accounting for any currents.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino, and speed over the ground

by marcelops on Mon Jul 29, 2019 3:40 pm

millercommamatt wrote:How often do you need to update. What are your requirements for precision?


Update every second. Needs to be precise.

I have thought of using an accelerometer and integrate the linear acceleration to get velocity, but there is the problem of accumulating error in the approach, and the measure of speed would degrade over time.

Another option is GPS.

(I didn't want to say the sensors in my original post to avoid biasing the answers, as I am looking for suggestions for what sensors you think it's best.)

marcelops
 
Posts: 28
Joined: Thu Apr 23, 2015 6:25 pm

Re: Arduino, and speed over the ground

by marcelops on Mon Jul 29, 2019 3:41 pm

adafruit_support_bill wrote:On water there are paddle-wheel or propeller type speed sensors. I believe Garmin makes one. Of course that is speed relative to the water - not accounting for any currents.


I can't add hardware. Everything has to be enclosed in a box, and I will add the box to the moving object. No wheels of any sort can't be used for this project.

I am thinking of gyroscopes, accelerometers, GPS, etc...

marcelops
 
Posts: 28
Joined: Thu Apr 23, 2015 6:25 pm

Re: Arduino, and speed over the ground

by adafruit_support_bill on Mon Jul 29, 2019 4:57 pm

Inertial sensors are good for short times/distances. But errors do accumulate fairly quickly. This is worse if there is a lot of 'noise' as you might get from choppy conditions.

If you are outdoors and the speeds and distances covered are long enough, GPS is probably the best bet. But, since the resolution is on the order of a few meters, slow speeds and short distances won't give you accurate numbers.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino, and speed over the ground

by marcelops on Tue Jul 30, 2019 9:46 am

adafruit_support_bill wrote:Inertial sensors are good for short times/distances.

What is 'short' distance? 1 mile? 0.5 mile? 0.1 mile? A few feet?

adafruit_support_bill wrote: If you are outdoors and the speeds and distances covered are long enough, GPS is probably the best bet.

What is 'long enough' for the GPS to be accurate? 1 mile? 0.5 mile? 0.1 mile? A few feet?

marcelops
 
Posts: 28
Joined: Thu Apr 23, 2015 6:25 pm

Re: Arduino, and speed over the ground

by adafruit_support_bill on Tue Jul 30, 2019 10:23 am

For estimating speed via GPS, you probably want to average over 30-40 yards minimum.

Using inertial sensors, in tabletop smooth conditions you can probably go several minutes before drift becomes significant. In rougher conditions, the errors start to compound quicker.

Navigation systems often combine the two types of sensors so that the strengths of one compensate for the weaknesses of the other. Inertial sensors provide real-time updates, combined with periodic long-term drift correction from the GPS data.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino, and speed over the ground

by relaxing on Tue Jul 30, 2019 10:53 am

marcelops wrote:
adafruit_support_bill wrote:Inertial sensors are good for short times/distances.

What is 'short' distance? 1 mile? 0.5 mile? 0.1 mile? A few feet?

adafruit_support_bill wrote: If you are outdoors and the speeds and distances covered are long enough, GPS is probably the best bet.

What is 'long enough' for the GPS to be accurate? 1 mile? 0.5 mile? 0.1 mile? A few feet?

Both answers are a function of your demands for accuracy. Sophisticated algorithms can help drive down the error. If you have the budget, an off the shelf IMU solution would be the way to go. There are also terrestrial RF ranging systems like LORAN, but that's probably not practical for you.

The only way to get absolute accuracy would be to measure distance to a known point, the way a surveyor does, or time between laser break beam sensors, the way sprinters are timed. Can you have a distance sensor and a target on shore to measure against?

relaxing
 
Posts: 59
Joined: Thu Mar 24, 2005 11:22 am

Please be positive and constructive with your questions and comments.