Now that I'm doing hardware-in-the-loop testing with the GPS simulator, the bugs in my code are showing up quickly, just as they should. Here's one small-but-deadly one I found this eve: all the code using the FT639 servo controller chip should have a special serial port configuration line that's different from the one we use for the GPS module. Turns out that the GPS module runs at 4800 baud and the FT639 runs at 2400 baud. Sigh. That'll teach me to read the spec sheets.

For the BS2p chip that we use, you need to insert the line "FTBaud CON 17405" and switch all the "Baud"s in the SEROUT commands to that chip to "FTBaud". I've updated both of the autopilot programs here that use the FT639 chip appropriately, so they should both work fine now. If you've been having trouble with the code, download the latest versions from that post, and see if this doesn't fix the problem.

Here's what's been tested so far:

1) Channel 5 turns the autopilot on and off
2) When in RC mode, the Basic Stamp passes through the rudder and elevator commands from the receiver to the servos. Jerkyness is minimal.
3) When in autonomous mode, GPS data is recorded, correctly parsed, and commands are send to the rudder and elevator servos.

Next to test: whether the waypoint navigation routines are working right.

The picture above shows the test setup with two servos, a RC receiver, and a GPS module. For GPS simulation, you just replace the GPS module with a USB-to-serial board, and then use GPS simulation software to generated the GPS data as described in this post. Here's what the setup above looks like with the USB-to-serial board replacing the GPS module:

Views: 302

Comment by rad man on February 8, 2008 at 6:04pm
what is so important about gps simulation?
Comment by Simon Pan on February 8, 2008 at 6:40pm
It's to catch bugs in the code in a safe testing environment, or else you would have to test it in the air, where you risk crashing.
Comment by rad man on February 8, 2008 at 6:41pm
ok thanks for clearing that up

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service