PDA

View Full Version : Autonomous Aerial Vehicle



extreme
04-18-2007, 09:28 AM
Hi all.

What I want to do:
I have undertaken a project to build a UAV. Right now, I am taking things slowly. I basically want to do this:
1. Take-off manually.
2. Fly to a region in space. (Destination point is provided using GPS values).
3. Land manually.
4. Turn on a switch that would allow me to turn the 'autopilot' ON or OFF, midflight.

Once that is successfull, I would like to add:
2a. Fly a predetermined path. (like figure 8 or 0 or 4). GPS values are not available, unless offcourse if you were to use math plus GPS position of the aircraft before undertaking the flight.


What I know:
I am a programming guy. I know C, C++, Java. I dont particularly like circuits and things like that. I have used old motorolla chips before (in university course) to do things like turning on particular LED lights etc. That was done in assembly language mostly.

What I need to know: (and thus, need your help)
Well, lots of things really, but the important ones are:
1. I first thought that a BS2 OEM would be good enough for me to begin work with. Then I searched on this forum and found that I would need Propeller chip instead. Is this right? Also, since I would like to reduce my headaches by not having to worry about connecting different components, is there something available (in Propellers) similar to the BS2 OEMs ? What would I need to buy in order to get the basic controller working?
2. Just going over the site's products page, I figure that I would need the GPS Reciever unit, the Hitachi H48C Tri-Axis Accelerometer and perhaps the Servo Controller. Is that all I would need for the current requirements of my flight, or am I going to need more? If so what? Also, if either of these three units I mentioned is not required, of if there's a better unit available for cheaper cost, do say so.
3. Propeller provides a SPIN high level language. Does this mean, I can simply program things like "Get GPS Co-ordinates" or "IF GPS co-ordinate is greater than xyz, then do blah" or "increase aircraft speed by 10 units" or "pitch aircraft by xyz units" etc?? Or is it different? How so (just a brief from the top will do, preferrably using examples)?
4. What I would like to achieve is (point 4 above):
4a. When the plane in on ground next to me, I basically load the program with all the GPS-inputs it requires.
4b. I manually take off the plane.
4c. Once the plane is in the air, I turn on the 'autopilot' using a simple switch.
4d. The plane does its things using the program I wrote and the GPS-inputs provided earlier. After finishing it returns.
4e. I land the plane manually.
So, the question really is that when I turn on/off the 'autopilot', do I lose the program (and values) I gave it? I read in some thred that this might happen so I just wanted to know it for sure. And if it does, is there any way to counter it using some other controller?



(PS. sorry if this thread is in wrong place or has been discussed several times).

Mike Green
04-18-2007, 10:26 AM
1) Probably a PropStick USB would be the best in that it's mostly self contained once you provide a +5V power supply. It includes the USB programming interface, clock crystal, and basic EEPROM (for the program).
2) What you need depends on what you want to really do. A GPS receiver and tri-axis accelerometer is a start at providing current position data.
Don't forget that the "autopilot" will also have to take over control of the control surfaces from the R/C receiver.
3) High level is in relation to assembly language. Spin is very similar to C and you should expect a similar level to the stuff you'd have to provide in C.
4) The program and values remain in the Propeller's RAM as long as there is power (or you reboot it). The Propeller is capable of changing its clock speed "on the fly" and its power consumption (see the datasheet in the Download section off the main Propeller webpage) depends on the clock speed. It's pretty low compared to the other stuff you'll be running (like the GPS receiver, motors, etc.) You can add additional EEPROM (up to 512K bytes) very easily and use it to store debugging information.

Loopy Byteloose
04-19-2007, 12:11 AM
There is an SX Contest Prize winner that created a semi-automatic flight control. He programed in C. The example is all there with a good system for level horizon recognition.и Search the Parallax SX area for it.

You might also visit Spark Fun as they have gyro and accelleration sensor combos that have been used with automatic flight control of small helicopters.

Mike Green is recommending the Propeller because it really can do much more than the BasicStamp or the SXes in a flight controller situation. And, the software is extremely user friendly. If you can program in C++ and JAVA, you with likely find SPIN quite fun.

Fundamentally, JAVA and C are intended to port across many platforms. In the world of microcontrollers, having software that allows intimate control of all the silicon is more important due to the limited silicon and unique qualities of each processor.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.и Not enough?и Eat the manual."ииииииии


ииииииииииииииииииии Tropical regards,иииии G. Herzog [и黃鶴 ]иin Taiwan

extreme
04-19-2007, 01:20 AM
[quote]2) What you need depends on what you want to really do. A GPS receiver and tri-axis accelerometer is a start at providing current position data.
From the top of my head, I am thinking I am going to require to do:
1. Fly level.
2. Fly from current position to destination point (provided by GPS).
3. Fly figure 8 and predefined flight paths.


Does the software allow me to simply use functions to get/set values ? Like for example, in Java you simply call array.getLength() or something to get the length of the array. Similarly using this software, does it allow me to simply grab values, like GPS.getcurrentposition() or something?

Mike Green
04-19-2007, 01:48 AM
You need to start downloading manuals, tutorials, and sample code from Parallax's website. They have a GPS receiver with an interface that presents either raw GPS information or slightly processed data as a serial character stream. The Stamps have built-in commands for reading serial character streams and the Propeller has library routines to do the same. You would have to extract the pieces you need from the GPS data stream.

The Propeller does have a built-in function to give the length of a string, to compare two strings, and to move a block of memory from one area to another. That's all for strings. There is an extension "wrapper" for the serial I/O routines that provides for conversion of number strings to binary.

You keep speaking in terms of very very high level operations like "fly level" or "fly figure 8 and predefined flight paths". In order to figure out what resources you will need to do this, you are going to have to break down these goals into smaller operations and lists of necessary information. For example, do you want to do anything about altitude? If so, what and how?

Capt. Quirk
04-19-2007, 03:05 PM
Given your programming experience you should look at the Javelin (http://www.parallax.com/javelin/applications.asp) and it's ability to use Virtual Periferials like the SX

Loopy Byteloose
04-20-2007, 09:00 PM
Have you done much flying [real or R/C]. You really need to have some actual air time to get good results.

I have an R/C airplane that has been crashed about 15 times in the process of understanding the limits and sensitivities involved.

If you haven't gotten this part down, as a starter you should build a 'Foamy Flier' that will allow you to reconstruct and repair cheaply.

Back when I had Flight Simulator on my computer, I never did land the plane. I always seemed to crash on the runway.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.и Not enough?и Eat the manual."ииииииии


ииииииииииииииииииии Tropical regards,иииии G. Herzog [и黃鶴 ]иin Taiwan