Calculating Bearing and Distance to a Latitude Longitude Waypoint with AVR Atmega C

By aliasmrjones - Last updated: Tuesday, May 19, 2009

This post will show how to calculate bearing and distance to a latitude longitude waypoint using C on an Amtel AVR microcontroller.  Deathpod3000 uses the formulas I gave in the last post, but with minor changes to adapt to C on the AVR.  The code should be easy to adapt to other microcontrollers like PIC, or even other languages such as basic or java.  So, let’s get to the real work – the code!

Read the rest of this entry »

Filed in Navigation • Tags: , , , , , , ,

How to Calculate Distance and Bearing to a Latitude Longitude Waypoint in Excel

By aliasmrjones - Last updated: Thursday, April 30, 2009

In testing code for Deathpod3000, I found it very valuable to have a quick and easy way to calculate correct distance and bearing to a latitude longitude waypoint to compare to results I was getting from my Atmega32 C code.  In this article, I will explain a little about the formulas, show them working in Excel and at the end of the article you can download a spreadsheet and play with them yourself.

Read the rest of this entry »

Filed in Navigation • Tags: , , , , , ,

Video of First Deathpod3000 Run

By aliasmrjones - Last updated: Tuesday, April 21, 2009

Someone shot video of 2 of the first round trials at the Sparkfun Autonomous Vehicle Competition including the first run of Deathpod3000.  The video is from a cell phone so it is a little grainy, but it’s fun to watch.  I especially like his comments while he’s shooting.  :-)  The first bot is RAD and then at about 2:30 remaining Deathpod’s run starts.  Thanks to Robert for shooting this!  Click either the pic or the link to view the video…

Deathpod3000 taking off at the start line

Deathpod3000 taking off at the start line

RAD and Deathpod3000 (at 2:30 remaining)  first round runs at Sparkfun Autonomous Vehicle Competition

Filed in The Build

Deathpod3000 Specs

By aliasmrjones - Last updated: Sunday, April 19, 2009
Deathpod3000 Top View

Deathpod3000 Top View

There were some requests on the Sparkfun site for the specs of the vehicles so I thought I’d list them.  All the info is in the build posts, but the design changed along the way so here is what we ended up with: (Click More…)

Read the rest of this entry »

Filed in The Build

Race Day

By aliasmrjones - Last updated: Thursday, April 16, 2009

Race day finally arrived.  To be honest, I had been spending so much time on the car, I was happy that spending every spare minute on the build was finally over.  The ir sensors that we added in the last post were working well for avoiding obstacles and curbs so it looked like we had a really good shot to at least complete the course.  It was a really fun day.  Click “More…” for lots of pics of the vehicles and some video of our runs.

Deathpod3000 at the finish line

Deathpod3000 at the finish line

Read the rest of this entry »

Filed in The Build

Adding Infrared Distance Sensors to an AVR Atmega32

By aliasmrjones - Last updated: Thursday, April 16, 2009

After the test run on the actual race course, it was clear that GPS was not going to be accurate enough to keep the car out of the pond.  I tried sonar, which is great for general obstacle avoidance because it will detect basically anything in a 45 degree cone, but it didn’t work well for this specific case.  Infrared distance sensors turned out to be perfect, but I had one other problem to overcome.

Read the rest of this entry »

Filed in AVR Sensors • Tags: , , , , , ,

How to read rc servo pulses with an AVR Atmega32 and final board construction

By aliasmrjones - Last updated: Monday, April 13, 2009

In the last post we took a run around the race course and found out we will need obstacle avoidance.  I forgot one step – putting the final board together.  In this installment I will show how I read rc server pulses from the receiver allowing me to use the rc transmitter as a failsafe kill switch and also show putting the final control board together.

Read the rest of this entry »

Filed in The Build • Tags: , , ,

Test run at the track

By aliasmrjones - Last updated: Monday, April 13, 2009

After installing a new gps and compass in previous posts, we took the Deathpod to a parking lot for a test run around a simulated track.  The results were not bad.  The car went around the track at 30% throttle and 50% throttle.  At 50%, it tended to spin out and fishtail in the corners so I added some logic to slow down as it approaches a waypoint.  As testing went on, the gps error started causing problems.  The car starting hitting some cones, which represented the building.  But, there were some laps where it missed hitting any cones so I thought things were looking good.  I decided to head up to Boulder for a lap around the real course.

Sparkfun

Sparkfun

Read the rest of this entry »

Filed in The Build

Adding an I2C Compass to the AVR Atmega32

By aliasmrjones - Last updated: Monday, April 6, 2009

The new 5hz gps module I added in the last post is working.  Now, to tackle the biggest problem discovered during Deathpod3000’s maiden voyage, we need a way to get very fast heading updates during turns.  While the faster refresh rate of the new gps will help, it is never going to give us accurate heading data in a turn.  In order to do that we need a compass.  In this post, I’ll describe how I added a digital i2c compass to Deathpod.

Read the rest of this entry »

Filed in AVR Sensors • Tags: , , ,

Adding a 3.3v GPS to a 5v AVR Atmega32

By aliasmrjones - Last updated: Monday, April 6, 2009

So the maiden voyage of Deathpod3000 was a disaster.  The problems seemed to be twofold.  One, gps updates were too slow and two and probably most importantly, heading info coming from the gps was way too slow to be useful in turns.  The net result was that it mostly drove around in circles.  I decided to add a gps with a faster refresh rate and a digital compass.  In this installment, I’ll add the gps.  The main issue I had to deal with is the gps is 3.3v and the rest of the electronics are 5v…

Read the rest of this entry »

Filed in AVR Sensors • Tags: , , , ,