Hi.

I apologize in advance if there are other posts relating to my query for I am very new to this and may not have understood all that I have read.

I have recently got a joystick connected to my pc to control servos connected to my Arduino. This got my brain ticking!

I want to build a model plane that can be controlled from my pc joystick. I would like to have virtual instruments on my screen similar to those in a real aircraft. Ie. Artificial Horizon, Airspeed, Altimeter, Compass and Rpm gauges.

Firstly: Is it feasible to have the following...


Basically all data will be sent from the ArduIMU and Airspeed Sensor through the Xbee back to the PC where it will be displayed appropriately. Meanwhile the Joystick will be controlling the servos.
Later I would like to program the aircraft based Arduino to act as a autopilot once control signal is lost.

My main question is: Can the arduIMU V2 flat  (with a GPS) be easily connected to an Arduino, and will I be able to read the following off it: Ground Speed, Altitude, Pitch, Roll (both in relation to the horizon) and Current Course??


I look forward to your responses.
Many Thanks!
Chris

Views: 1990

Reply to This

Replies to This Discussion

Yes and Yes.

But why would you use a Duemilanove when the ArduPilot board has the same processor and is set up for an AP?

And if you don't already have an ArduIMU, then you should look at the ArduPilot Mega / oilpan combination.
Hi Doug.

Thanks for your reply.

Ok great!

The reason that I initially didn't consider the ArduPilot was becasue i wasn't sure how configurable it is..
1) If I used an ArduPilot or the ArduPilot Mega? will I still be able to code it, so that I can fly the plane through the Xbees?

2) The Oilpan looks amazing! Is there considerable improvement with the "situational awareness" (ie. more stable pitch and roll readings?) over the arduIMU V2?

3) If I opted to stay using a Duemilanove would it also be compatible with the Oilpan? Or would I have to use an Arduino Mega?

4) If I control the servos through the Xbees, Might I encounter hectic delayed response?

Thanks very much again!
- I know responding to silly questions is a pain!
Chris
The oilpan goes with the arduPilot Mega board, not the arduinoMega...theres a big difference between the two.
Thanks Taylor.
I realize that difference... however please read the entire discussion, and you will understand what i was getting at...
If I wasn't clear I apologize. I meant..
Is it possible (without hacking things to pieces..) to connect the Duemilanove or the Arduino Mega to the Oilpan? and if so can I receive the following data into the Duemilanove or Arduino Mega: Ground Speed, Altitude, Pitch, Roll (both in relation to the horizon), Current Course and Coordinates.
Thanks
Chris
Please keep us informed of your progress as I intend to do a similar project over the next few months. Best wishes on your success.
Hey.

i think it would work, but have a look at this site.

They mounted a xbee pro to a plane and monitored (is that correct in english?) it over the flight.
Answer again to your question is NO. You cannot connect Duemilanove or Arduino Mega to OilPan. Ok well you can but it will be really difficult.

ArduPilot Mega IS same as Duemilanove and Arduino Mega together. So in ArduPIlot Mega there are both processors.

For hacking and coding, it is just same as you would code Arduino Mega. Difference between Arduino Mega and ArduPilot Mega is that APM has totally different PCB layout and it has 2 CPU's on board.

Now for the connecting point. Because ArduPilot Mega and Arduino Mega uses same processor, it is possible to connect OilPan to Arduino Mega but it is really difficult due you need to have about 100 hundred jumper cables.

Receiving those ground speeds, pitches etc totally depends on what other devices is connected to APM. For having current course, Ground speed etc you need to connect GPS. For Altitude, Pitch, Roll you need to have gyros, accelerometers, pressure sensors and those all are on OilPan. So it's more like software issue than anything else.

ArduPilot Mega program code for fixed wings does all this for you already, it navigates via waypoints, it flies steadily your planes among many others things. Only thing what it does not do is to receive commands from PC/Joystic it uses inputs from normal RC Radio for that.

Can it be programmed to do that, for sure can.. can you do it, well that's one thing you need to find out. Hardware and basic software is there already :)
I decided to try to do this despite hearing that the Xbee wasn't up to it. I bought the 900mhz pro's so that in case it doesn't work: I can use off the shelf 2.4ghz gear without interference, and just dedicate my Xbee's to telemetry.

It's a cool programming project, and worst case scenerio: you can only use them for telemetry which most people eventually want anyway...
Hey Chris,

I also want to have a similar setup. I have thought about doing exactly what you describe, but I want a quick and simple solution with out a whole lot of programing to figure out. You might want to check out this site for connecting a joystick to a radio. This is if you already have a radio transmitter for RC planes.

As for the on-screen display, are you looking to have a first person view video transmission or just have the gauges with the information that you want to see? If you are going to have a video transmission there are a bunch of companies that sell OSDs (on-screen display) which will give you the information that you want; the DIY drones store sells one called Remzibi's OSD which is some what basic. Unless there is some way to have a splitter for the GPS unit it will have to have its own, separate from the one that you need for the ArduPilot. I have found another OSD system call EzOSD which has some nice features that would come in handy if you go the FPV route.

If you just want to see the gauges like in a cockpit as you said, then my guess would be that you have to use the telemetry data sent via the Xbee in a program that would figure all of the items you want to see in a nice display (you probably would have to write the program yourself unless there is one out there).

I also would like to have some way of coding the ArduPilot to have a return to home feature when radio signal is lower than a set value or lost completely. Maybe someone can give some insight on how to accomplish this.

I hope some of this information helps.

Kyle
very nice.

my brother and i are working on a similar project.
im using a 6dof board from sparkfun and a gps unit that i cracked open to get the connection that has the NMEA data

arduino mega for the main board. its gettin there!
hows your project goin?
Arducopter team is also planning to develop this functionality (plus many others)
see their software roadmap:

http://code.google.com/p/arducopter/

Kyle, this might help you:
http://code.google.com/p/ardupilot-mega/wiki/Failsafe
http://code.google.com/p/ardupilot-mega/wiki/FlightModes
Im working on a Quadrotor project that has ArduIMU V2 and Arduino Duemilanove for control. So how should i approach to do that right ?

I changed the config file in Ardu IMU V2 to print binary output to have pitch, roll, and yaw. (where it says make the value 1 to use it with ardupilot) Should i get binary output values (like ardupilot) from IMU to use in Duemilanove ?

Since i dont have magnetometer, GPS and Radio Transmitter (no need for ppm encoder or etc) that was all i needed. I read pitch, roll and yaw using Duemilanove from Ardu IMU. Values are correct and serial transfer is pretty good too. I checked it. So when i try to stabilize my quad using pitch PID and roll PID running in Duemilanove i dont have nice results. I change the PID parameters and it still oscillates and its unstable.

The question is where im doing wrong ? Is it because PID parameters not tuned or Duemilanove isnt enough to do this right ?


Notes : Serial baud rate is 38400

PID for pitch is this :

int myPID_pitch()
{
double integ, deriv;
long pr_time, error, pr_error, input_1;
double dt = 0.02; // I set pid sample rate cause i have ultrasonic sensor connected too.

float Kp = 10, Ki = 0.5, Kd = 0; // Enter PID parameters
long setpoint = 0; // Enter setpoint
imu_read(); // Gets pitch value from Ardu IMU V2
input_1 = pitch; // Enter input

error = setpoint - input_1;
integ = integ + (error * dt);
deriv = (error - pr_error) / dt;
output_1 = long( (Kp * error) + (Ki * integ) + (Kd * deriv) );
pr_error = error;

return output_1;
}

And I wrote this in main loop for Motor 1. ( front motor)

myPID_pitch();
pwmcontrol_1 = (HOVER) + (0.1 * output_1); // HOVER is pwm value that found by ultrasonic sensor yield desired height. I multiply pitch pid output with some constant, so pwm value wont overflow. (Duemilanove AnalogWrite has 8 bit PWM resolution (0,255) = (0, 5V) )

Any help greatly appreciated. Thanks...


( I also checked Jose Julios topic, he had only IMU, i have Duemilanove + IMU, so its kind of different, but im still working on it.)

Reply to Discussion

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service