Motor Response based on GPS coordinates

Hello, I am currently working on a “follow robot” project. I want a 2 wheel dual motor robot to follow a remote that is held on a person autonomously and would like to know if it’s possible via the following method. ( if there is an easier method please let me know thanks!)

I would like to have an Arduino on the robot and an Arduino nano in the remote, each having Bluetooth modules. I plan on also having gps modules. I want the robot to respond to distance between itself and the remote. I would like the robot to follow anytime the remote is 3-5 meters (or more) away from the robot and stop when the remote is at a distance of 3 meters or less.

Is this possible with the hardware I described? If not, is there any other way to accomplish this task? Thank you for reading!

Not really. The typical coordinate error of GPS modules is around +/- 2 meters, sometimes much larger, and that can change rapidly as signal paths change. Two identical GPS modules won't, in general, show the same errors even if close together.

Do you know if there is a way to accomplish this another way? Maybe via some sort of sensor.

People have done what you describe, and have posted the results. What research have you done?

Search for "suitcase follows you" for example.

Is your project for indoors or outdoors?

It is possible to get more accurate GPS sensing, for a price.

You should be able to do this with ultrasonics. The cheap HC-SR04 ultrasonic rangefinders are generally good for 4 or 5 meters round-trip. That should get you around 5.5 to 7 meters one-way. You need a way to trigger the tag on the person being followed at the same time as you trigger the two receivers. Use some trigonometry to calculate the distance and angle from the three sides of the triangle (two measured and one known).

Yes, but, as I recall, it is a subscription service and is not cheap.

If you want to try it with GPS modules, don't use the 'float' version of latitude and longitude. With the single-precision 'float' on the Arduino Nano you will lose some of your precision. I think either the TinyGPS or TinyGPS++ library will give you the latitude and longitude in billionths of a degree.

1 Like