[HELP] Autonomous Vehicle to run on a course track with GPS + Electronic Compass

Hi there, I'm Sean.

Firstly, I would like to sincerely apologize for my English as it isn't my first language, also it is 3am in the morning right now.

So let's begin, my group project is to tasked to build an autonomous car/vehicle to travel a predetermined course track, the goal is to travel without any fences in a square like maze in a zig-zag pattern from parking the car from "home" then it has to travel the entire course and finally go back home, so basically the aim of this project is either built for regular consumers or agriculture purposes, such as harvesting, or smart lawn mower.

Where the device, moves in a zig-zag motion to complete its task and heads back home once its done.

It should be demo-ed inside a small classroom (else, I need to have a talk with the teacher to see we have a second option to do a video demo instead). And we are pretty much new to arduino and its C++ coding, and we are on our own, without any much guidance from our teacher as for this course, we only able to meet our teacher once a week.

Currently, my group are having trouble interfacing with the GPS Module to plot the GPS coordinates to make turns within the zig-zag course as shown in the video.
The GPS module should be working fine at the moment.

As there are limited guides on that online, so I hope the community would help.

We are using 'NEO-6M GPS Module' from ublox and "Arduino GY-271 3-Axis Electronic Compass Module", and some two way motors for the wheels of the vehicle...

Current we found code online for the 'NEO-6MV2 GPS Module' from ublox and "Arduino GY-271 3-Axis Electronic Compass Module", but we have no idea how to interface it like a simplified program to plot GPS Coordinates and determine a track and implement it back into our code.

Like the video shown below:

Progression on 21/June/2018:

  • Start to learn Arduino Coding Language.
  • Having trouble with 'NEO-6MV2 GPS Module' from ublox' with codes available online, found a working code on https://www.roboshala.com/arduino-gps-module-interface/ but the library given doesn't work for me
  • Still haven't figure out how to plot GPS points for my vehicle can follow
  • Successfully soldered 'NEO-6MV2 GPS Module' and 'Arduino GY-271 3-Axis Electronic Compass Module' on my first try with a soldering iron
  • The current code I found online so far are working after trial and errors.

Next agenda:

  • Work on Mapping
  • Purchasing a body to house arduino, shields and motors.
  • Figure out how to config the vehicle

Not an Arduino answer, but, are you sure GPS can even tell if you are in the square or out of the square?

Paul

it must be demo-ed inside a small classroom

GPS does not work indoors, and even out of doors, you can't count on positional accuracy much better than +/- 3 meters under good conditions.

Paul_KD7HB:
Not an Arduino answer, but, are you sure GPS can even tell if you are in the square or out of the square?

Paul

Hmm, I can always get a flat empty floor to put the project into a larger scale like an empty basketball court, like 10 m x 10 m. I doesn't need to be in a square, I just need it to run in a zigzag pattern from end to end, try to be in a straight line at most of the time.

Btw, was planning to mimic something like an agricultural farming harvesting tractor or a lawn mower.

jremington:
GPS does not work indoors, and even out of doors, you can't count on positional accuracy much better than +/- 3 meters under good conditions.

Oh god, any better suggestions like how to pin point a proper 'invisible pathway track' for it to run?
Else I might need to convince my teacher to watch a video recording on how it works...

If this happens...

Buy some sort of wheeled platform with motors, motor drivers and wheel encoders, so that you can keep track of distance.

Use a magnetometer (electronic compass) for orientation and that should be enough to get you started.

As a beginner with Arduino and C/C++, expect at least a month of hard work before you get to the stage of traveling out a determined distance, reversing course and then successfully returning to the starting point.

jremington:
GPS does not work indoors, and even out of doors, you can't count on positional accuracy much better than +/- 3 meters under good conditions.

Oh god, any better suggestions like how to pin point a proper 'invisible pathway track' for it to run?
Else I might need to convince my teacher to watch a video recording on how it works...

If this happens...

Delta_G:
That course looks like it could be run with a compass and dead reckoning if you had to. The bot just needs to know the dimensions of the course and have a way to tell how far it has traveled. Oh, and write code to make the turn with some accuracy.

So, the "Arduino GY-271 3-Axis Electronic Compass Module" should be pretty much sufficient to navigate through the course? I just need to work with making it turn, and the code algorithm for the track course.

Delta_G:
Then why did you write this?

Can you please try to be honest and sincere when posting. It is really aggravating to try to help someone only to find out that you're on a wild goose chase because they didn't give you the real story in the opening post. Think about the volunteers trying to help you out. Their time is worth something too.

Technically, all demos should still be done in a small classroom.
I can talk with my teacher just to accept that my project works by filming a video of my project running outside, and get away with it.
So I won't need to demo in real live in class.

I don't really want to give you guys a wild goose chase.
I'm sincerely sorry for the inconvenience.

jremington:
Buy some sort of wheeled platform with motors, motor drivers and wheel encoders, so that you can keep track of distance.

Use a magnetometer (electronic compass) for orientation and that should be enough to get you started.

As a beginner with Arduino and C/C++, expect at least a month of hard work before you get to the stage of traveling out a determined distance, reversing course and then successfully returning to the starting point.

Well hopefully, I can find these "wheel encoders" in my country tho.
Do you have a specific part name? As this project is kinda nearing its deadline.
As I only have 5-6 weeks left.

Hopefully I can make it in time...

Do you have a specific part name?

Wheel encoders. Google would be happy to help.

jremington:
Wheel encoders. Google would be happy to help.

Found this product costing me 180 MYR (45 USD) is it always this costly?
As this is a self funded group project...
Else I might need to find an alternative solution.

"IG32E-35K"

You can buy an entire robot platform with motors and encoders for that price. Consider the DFRobot 4WD platform with encoders.

For a higher price, you can buy the Zumo, a complete tracked robot with wheel encoders, navigational sensors, Arduino compatible computer, motor drivers and display. All you have to do then is program it to go where you want it to.

jremington:
You can buy an entire robot platform with motors and encoders for that price. Consider the DFRobot 4WD platform with encoders.

For a higher price, you can buy the Zumo, a complete tracked robot with wheel encoders, navigational sensors, Arduino compatible computer, motor drivers and display. All you have to do then is program it to go where you want it to.

Hmmm, I'll try to ask my group but not sure I can find any similar products for it.
Also, we are require to build a custom shield for the arduino board.

Thanks for the suggestion for now.

iSean:
Hmmm, I'll try to ask my group but not sure I can find any similar products for it.
Also, we are require to build a custom shield for the arduino board.

Thanks for the suggestion for now.

We sometimes build project circuit boards for seniors in electronic engineering at a university. You don't seem to be at this level of education. What is your electronic engineering level and experience?

Paul

As I only have 5-6 weeks left.
...

Also, we are require to build a custom shield for the arduino board.

Ask the teacher to give you another year, some good equipment and money for the project. Good luck!

Paul_KD7HB:
We sometimes build project circuit boards for seniors in electronic engineering at a university. You don't seem to be at this level of education. What is your electronic engineering level and experience?

Paul

Technically I'm in my first semester in my second year in E&E, but I think coding and arduino project building is more towards a personal learning based on my uni's course.
Apparently this course was shifted from Year 3 to Year 2 subject.
Where the lecturer set constrained topics for students to tackle and explore on without providing much guidance, unless I personally consult the lecturer for help, which might reduce my group's marks.
Also this is my very first experience working in arduino, while taking 'intro to C++ [for CodeBlocks]' which have a different structure to Arduino C++ Language.

jremington:
Ask the teacher to give you another year, some good equipment and money for the project. Good luck!

Unless I flunk the subject, by not making a workable product, and have to pay $400 to repeat the course...
Do note, I live in a 3rd world country, unis won't provide funding and good equipment.
I just need to get a good enough GPA that's all.

Since this is your first robot perhaps a simple line follower robot is sufficient. Search for "line following robot". There are dozens of similar projects.

gdsports:
Since this is your first robot perhaps a simple line follower robot is sufficient. Search for "line following robot". There are dozens of similar projects.

This is out of the question now, as the proposal we gotten was for agriculture purposes now... RIP.
I don't think you can make a vehicle drive in outdoor in an hay field in a line cutting crops lol.

GPS it is then...

Hi,
Can you post a copy of the project proposal, so we can see the exact requirements?

Knowing the whole picture may help with a solution.

Thanks.. Tom.. :slight_smile:

TomGeorge:
Hi,
Can you post a copy of the project proposal, so we can see the exact requirements?

Knowing the whole picture may help with a solution.

Thanks.. Tom.. :slight_smile:

Well do note that Proposals written are normally 'bluff' which doesn't really co-relate into the actual build we are doing.

Yeah here's the link below.

I'm not sure how 'grand' or an actual proposal is written in proper university tho, as academic writing for reports/proposals aren't taught here. So please don't laugh at my group's proposal, because it seems like its simply done...

Well let me post my current progression.

Bought a Electronic Compass and NEO-6MV2 Compass module.

First time soldering the connection pins was successful despite being slightly lousy.
Follow up by testing the modules if it was dead on arrival or not.
Was fortunate enough that non of them are dead, and my modules are all working.

Can't understand what's wrong with NEO-6MV2 for its code and library examples.
As most codes were based on NEO-6M (Version 1)

Eventually settled down with this working CODE : https://www.roboshala.com/arduino-gps-module-interface/

But sadly I haven't figure out how to plot it in a big map.

NOTE: I still haven't really studied the code structure of Arduino, but slowly progressing. My background now is from CodeBlocks.