Maiden Voyage = Epic Fail

By aliasmrjones - Last updated: Thursday, April 2, 2009 - Save & Share - 3 Comments

In the last post, we finished all the initial programming and   It’s time for the maiden voyage of Deathpod3000!  The first test drive of the car was less than perfect…Ok, it sucked big time.   There are two videos showing all the fun.

Here is a little video of me showing the parts:

[youtube=http://www.youtube.com/watch?v=0AgaiBSmlYk]

And here’s a vid of the first drive, which mostly features driving around in circles:

[youtube=http://www.youtube.com/watch?v=i1jFA4j0P7g]

The main problem seems to be that the cpu only gets updates from the gps about once every 2 seconds and it is getting current heading data from the gps.

As the car turns, the gps computes heading based on where it was at the last fix and where it is at the current fix.  Unfortunately, while it’s turning, it is pointing way past this direction so it constantly overshoots where it is trying to turn.  This coupled with the fact that it only gets updates to its heading (as bad as that heading data may be) every 2 seconds means it can’t figure out where it is heading and spins around in a circle until it decides to spin around in a circle the other directions.

If the car is pointing where it should be going, it does drive straight.  So, it is computing where it wants to go correctly.  The problem is with the current sensor array, it can’t accurately point the car in the desired direction.

The good news is it looks like the basic programming and navigation software work.  So, it looks like we need to upgrade our sensor array.  I ordered a new gps that updates 5(!) times per second and a digital compass.  Hopefully more frequent updates from the gps will help.  More importantly, though, the digital compass should allow the cpu to get heading readings in real time so it can track to the desired heading accuratly.

The compass uses i2c, a synchronous serial interface and the gps is 3.3v, which will require a level converter.  In the next post, we’ll hook up the new hardware.

Share and Enjoy:
Posted in The Build • • Top Of Page

3 Responses to “Maiden Voyage = Epic Fail”

Comment from rosalinda
Time April 4, 2009 at 8:29 am

Interesting Read! Very detailed blog.
Thanks for sharing

Comment from frank
Time May 6, 2009 at 9:56 am

You need to scale the error to the direction drivers. A little error means turn a bit. A lot of error means turn a bit more, but not end stop… If the error changes after a while, change the amount you turn by. This is now control theory, not maths!

Also do lots of averaging if you only do an update every 2 seconds… Try to take the average bearing of at least 10 readings before making a decision. It means really slow motion if you take just 2 readings a second!

I’m simply trying to mess about with using an AVR as a GPS navigator. I’ve got a GPS engine- just need to figure out the maths (which is how I found this blog!).

Comment from aliasmrjones
Time May 6, 2009 at 10:06 am

I think you are misunderstanding. I am not taking a reading every 2 seconds, the gps will only give me information every 2 seconds. If you sample 10 times, that means you won’t get data for 20 seconds! If you read the other posts, you will see that I added a compass and do proportional steering as you suggest and it worked very well. I think if you try to use just gps you will have problems. There was another vehicle at the competition that had just compass and it did exactly what deathpod did with just compass – it drove around in circles.

Write a comment