View Full Version : Discussion Switching between manual and autopilot control
flatland2d
Oct 30, 2006, 02:00 PM
Hello again everyone. I posted a while back about my senior design group building a UAV. We are now pretty far into developing the IMU and will soon be creating a separate demo board to test our stability system.
As for the plane, we have decided on a NexStar. The benefits to this plane is longish flight times (as compared to electrics), decent payload capacity, and very easy to fly (to help relieve our PID controls from having to balance an very unstable system). A nice bonus is that you can buy the NexStar with a NexStar version of RealFlight in the package. I'm the only group member with RC airplane experience so this is nice for the other members to learn on. Paying another $200 for the full version is not where we'd like to spend our money.
So the big question. The NexStar package comes with a 4 channel radio and reciever. How could we go about switching between autopilot and manual control? I was hoping that maybe we could use the flaps channel to switch between modes but being a 4 channel radio, it doesn't have that, right? Maybe switching off the transmitter (and the receiver not getting a signal) would work? The autopilot would take over if it detected this happening. Lastly, we could use a long range modem like those on Spark Fun. They have ranges up to 1500m but they get a little pricey. The concern about range is that we wouldn't want autopilot to have control long enough that we couldn't switch it back into manual mode again. But if the range of the modem exceeds that of our transmitter, we'd be in trouble anyway.
Just trying to think out our design here. Any input would be welcome. Btw, our design goal is to build a low cost flight control module, so price is an issue. I will try and start a design log when we really get moving.
JeffElecRC
Oct 30, 2006, 03:17 PM
flatland2d,
I can understand and sympathize with your requirement for low cost, but from reading your requirements, you are really limiting yourself here. It's like you want to learn to run a marathon on one foot, which is fine, but you wouldnt shoot the other foot. Anyway, here's my thoughts:
- Get a free flight simulator such as FMS and forget paying for one.
- Buy a used airframe and used transmitter. You can get better equipment. This NexStar package sound gimmicky and may be overpriced compared to a used alternative.
- Many people in your local club may even be willing to donate a used airframe for your school or something.
- If you are really stuck with a 4 channel TX, then you could set up your flight controller to automatically mix aileron and rudder, then use the rudder channel to switch your autopilot (wire in a switch). Just avoid crosswind landings...
Unterhausen
Oct 30, 2006, 03:36 PM
That's a real problem, and I wouldn't want to take my chances. You are going to want to fly before your controller is really ready, and the switchover should be sure and quick.
kd7ost
Oct 30, 2006, 05:07 PM
The whole thing sounds like a nightmare.
You could do it with harware chips. You could monitor one of the receiver to servo pulses with a missing pulse detector. Something like a retriggerable Astable Multivibrator. 1/2 of a CMOS CD4528 would do the trick.
Then just use it's output (there is a high and its inverse) to switch a digital mux chip of your choosing to switch between the two. Transmitter off, autonomous package on.
It's still a nightmare to think about. Not very controlled. Maybe you should do switching with code written to a PIC or Stamp. Then you can look for a min and max pulse duration to call the pulse good. In my hardware idea above a noise spike could be treated as a pulse by the 4528. That would switch off the autonomous system when the transmitter isn't really there.
Dan
flatland2d
Oct 30, 2006, 09:27 PM
flatland2d,
I can understand and sympathize with your requirement for low cost, but from reading your requirements, you are really limiting yourself here. It's like you want to learn to run a marathon on one foot, which is fine, but you wouldnt shoot the other foot. Anyway, here's my thoughts:
- Get a free flight simulator such as FMS and forget paying for one.
- Buy a used airframe and used transmitter. You can get better equipment. This NexStar package sound gimmicky and may be overpriced compared to a used alternative.
- Many people in your local club may even be willing to donate a used airframe for your school or something.
- If you are really stuck with a 4 channel TX, then you could set up your flight controller to automatically mix aileron and rudder, then use the rudder channel to switch your autopilot (wire in a switch). Just avoid crosswind landings...
Yeah, so the low cost thing is a little ambiguous. What we're trying to do is beat the cost of a competitors product. Though I haven't done much research into crossbow, I've heard it's around $4000. We are shooting for around $1000 as a target. I think it's doable. Right now our IMU is around $140 which includes a 3 axis accelerometer, 2 axis gyro, LCD and associated hardware. Add a $55 GPS unit for the flight planning and a $350 plane and I think we will achieve our goal. There are plenty of other things we'll need, but those are the most expensive ones that come to mind.
Buying used equipment is a good suggestion and we'll try and look into it.
I just thought of the rudder mixing after I posted. We were planning on mixing it anyway, but I didn't realize until after that it could be sacrificed when getting the plane in and out of the air. Good suggestions.
That's a real problem, and I wouldn't want to take my chances. You are going to want to fly before your controller is really ready, and the switchover should be sure and quick.
We definitely plan on doing several test flights without our control system. We'll probably have the plane well before we finish the control system so we can get plenty of practice flights in and experience how the plane reacts, as well as monitor servo positions in real time to see what works.
The whole thing sounds like a nightmare.
You could do it with harware chips. You could monitor one of the receiver to servo pulses with a missing pulse detector. Something like a retriggerable Astable Multivibrator. 1/2 of a CMOS CD4528 would do the trick.
Then just use it's output (there is a high and its inverse) to switch a digital mux chip of your choosing to switch between the two. Transmitter off, autonomous package on.
It's still a nightmare to think about. Not very controlled. Maybe you should do switching with code written to a PIC or Stamp. Then you can look for a min and max pulse duration to call the pulse good. In my hardware idea above a noise spike could be treated as a pulse by the 4528. That would switch off the autonomous system when the transmitter isn't really there.
Dan
I see the problems you are talking about. After thinking about it more, I think we'll go with a long range modem to control the on/off status of our system. We are planning on having some type of wireless communication anyway to relay current position, bearing, altitude... all the variables we'll be keeping track of. We'll use the same wireless link to digitally switch between our control system flying and manual. The only potential downside is that the long range modem (the ones I'm looking at at Spark Fun) have a max range of 1500m, just under 1 mile. That's not too bad for what we're after. It'd be pretty hard to switch back to manual mode at that range and still be able to fly the plane from so far away. We may end up having to travel on the ground underneath our plane if we really want to do something long range. At the very least, we can always claim this is proof of concept and anything will suffice.
So, how do more professional designs accomplish this? Surely they all have some kind of manual override. Maybe they all have superior communication systems and wireless video that allows them to be flown at very long distances?
Thanks for all the help. Feel free to constructively criticize.
Myron
Oct 30, 2006, 10:22 PM
Hey guys,
In switching between full auto and RC mode we have a "rate damp" switch on the laptop that you click and we also have the same function programed into the Saitek joystick controller.. When clicking the switch you have semi-manual control in that you fly it with the joystick, but if you let go of it, the AP will keep it level.. We also have several other functions programmed in this way, the "come home" and and my favorite button.. I call it the "EF" button. If Everything is Fubar, I hit the switch and the aircraft will shut itself down and "land" within close proximity to the last cordinates as the switch was hit..
Our full auto system does NOT use(but it can)a conventional TX/RX that most people are used to so when we fly full auto, we only use a laptop and a joystick and the radio modem.. Let me tell you, it is pretty weird going to the field without a transmitter!
Myron
Unterhausen
Oct 30, 2006, 11:42 PM
I just bought a Crossbow and it runs $2200. Price has dropped over the last year, and I don't see much reason to expect it to stay even that high.
The Crossbow uses a channel on the radio to switch back and forth between manual and automatic.
JeffElecRC
Oct 31, 2006, 12:14 AM
Yeah, so the low cost thing is a little ambiguous. What we're trying to do is beat the cost of a competitors product. Though I haven't done much research into crossbow, I've heard it's around $4000. We are shooting for around $1000 as a target. I think it's doable. Right now our IMU is around $140 which includes a 3 axis accelerometer, 2 axis gyro, LCD and associated hardware. Add a $55 GPS unit for the flight planning and a $350 plane and I think we will achieve our goal. There are plenty of other things we'll need, but those are the most expensive ones that come to mind.
flatland2d,
Unfortunately, gyro and accelerometers together alone will not an IMU make, especially those at are available at the price point you mentioned. If you look at the crossbow IMU (which uses code from the open-source "Autopilot" project on Sourceforge), you will see they have also included 3-axis magnetometers in their unit to provide additional attitude reference. The outputs of Gyros, Accelerometers and Magnetometers are fused with a Kalman filter (aka magic..see other threads) and more reliable attitude estimate is calculated. With gy/acc alone, you will suffer drift and attitude errors through coordinated turns. It seems like you have bitten off quite a bit for a seniors project.
You could get a wireless modem such at those available from Maxstream or Aerocomm. Some guys in the paparazzi UAV community are using the Max Xtend zigbee modules with great success. Personally I have the Aerocomm AC4790-1000 (40 mile range LOS... but at this power level it generates quite a bit of RFI noise if not carefully placed).
I just bought a Crossbow and it runs $2200. Price has dropped over the last year, and I don't see much reason to expect it to stay even that high. The Crossbow uses a channel on the radio to switch back and forth between manual and automatic.
Unterhausen, how do you like the crossbow IMU? what autopilot are you using with it? Give us some more details. :D
danstrider
Oct 31, 2006, 12:18 AM
Flatland,
Regarding switching between manual and autopilot, a safe and cheap solution can be found near the end of this discussion:
http://www.rcgroups.com/forums/showthread.php?t=360746&highlight=switch+between+manual+autopilot
Best of luck for you guys! What school are you with?
Dan
flatland2d
Oct 31, 2006, 11:49 AM
Hey guys,
In switching between full auto and RC mode we have a "rate damp" switch on the laptop that you click and we also have the same function programed into the Saitek joystick controller.. When clicking the switch you have semi-manual control in that you fly it with the joystick, but if you let go of it, the AP will keep it level.. We also have several other functions programmed in this way, the "come home" and and my favorite button.. I call it the "EF" button. If Everything is Fubar, I hit the switch and the aircraft will shut itself down and "land" within close proximity to the last cordinates as the switch was hit..
Our full auto system does NOT use(but it can)a conventional TX/RX that most people are used to so when we fly full auto, we only use a laptop and a joystick and the radio modem.. Let me tell you, it is pretty weird going to the field without a transmitter!
Myron
Those are some very nice features you have. What kind of modem are you using? I will be looking into those suggested by JeffElecRC.
flatland2d,
Unfortunately, gyro and accelerometers together alone will not an IMU make, especially those at are available at the price point you mentioned. If you look at the crossbow IMU (which uses code from the open-source "Autopilot" project on Sourceforge), you will see they have also included 3-axis magnetometers in their unit to provide additional attitude reference. The outputs of Gyros, Accelerometers and Magnetometers are fused with a Kalman filter (aka magic..see other threads) and more reliable attitude estimate is calculated. With gy/acc alone, you will suffer drift and attitude errors through coordinated turns. It seems like you have bitten off quite a bit for a seniors project.
Not mentioned in the cost of our project is the hardware signal filtering and software implementation of a Kalman filter. I didn't mention the cost of the LPFs because they are so cheap. I wasn't trying to imply that our IMU would be cheap AND easy. Our current progress in this area has been pretty good so far, and we are working on the Kalman filter now.
I just bought a Crossbow and it runs $2200. Price has dropped over the last year, and I don't see much reason to expect it to stay even that high.
Then that gives us a new goal to shoot for!
Flatland,
Regarding switching between manual and autopilot, a safe and cheap solution can be found near the end of this discussion:
http://www.rcgroups.com/forums/showthread.php?t=360746&highlight=switch+between+manual+autopilot
Best of luck for you guys! What school are you with?
Dan
Thanks for the support! We are with the University of Texas at San Antonio. I've been reading the thread you linked to. We'll be considering something like this in our design.
Myron
Oct 31, 2006, 04:31 PM
Hey guys
Were using a maxtream Xtend.. It seems to work very well...
Myron
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.