HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Sep 26, 2012, 08:43 PM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
Help!
What the ####

I went out to the field today to test my legacy Ardupilot with ArduIMU and EM406 GPS. I hooked it up, level and waited for it to show a fix. I get a fix almost immediately every time, but now I know that isnt any guarantee.

When I would switch to Auto, with 2 nearby waypoints set, it wanted to climb to about 1000 feet and show no indication it knew where it was. I switched to RTL and same thing. I switched to manual.

This didnt end well when I switched back to Auto. It started to circle a spot about 400 yards from the first waypoint and then it all went to hell. It went into a dive and I had no control in manual. The wing folded and I had to go pick up the wreckage once again.

I got it home and hooked it up to the config tool and the home position that was in eeprom was 3.5 miles from where I was flying.

First question is how do I guard against a completely bogus gps fix?

Second question is what would cause the system to just crap out with no control?
HELModels is online now Find More Posts by HELModels
Reply With Quote
Sign up now
to remove ads between posts
Old Sep 27, 2012, 02:47 AM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
I might have answered question #2. Arduimu has an option for enabling airstart. That grabs offsets from the eeprom instead of going through the whole calibration process. I'm guessing that the ardupilot reboots for no good reason known to me, but if that happens then the IMU also restarts and that takes lots of time. Grabbing the offsets from eeprom is the best chance of not crashing and I didnt have that chance.

I guess a ground station that receives telemetry would show me whether the fix that defines home makes sense. I could run the GPS on my PDA before I fly and if it shows good pdop and hdop, then install it in the plane.

it stinks, I went for simple and got simpleton.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Sep 28, 2012, 12:56 PM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
I've been doing some more thinking on this as I rebuild the airframe, I can only guess that I experienced a restart in midair. Reading the manual, it says power glitches or switching the mode switch quickly can cause a restart. I get that, but I'd like to know if my ESC could cause it.

Would a dedicated BEC give me some protection against a "power glitch" , or is it the Ardupilot itself that glitches, clean power or not?
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Sep 28, 2012, 05:51 PM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
Crap! I cant use the PDA to check the likely quality of the fix because the stupid EM406 needs to run in NMEA to do that. Once it gets in SiRF, which is what the Ardupilot uses, it wont switch back to NMEA. I can use the old laptop with a serial connection to run SiRF Demo, but that means I have to run an inverter because it's battery only has about 5 minutes capacity left.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Oct 14, 2012, 09:33 PM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
I got the airframe rebuilt(getting uglier with each rebulld) and recompiled the IMU so that it will airstart without going through the whole long drawn out calibration. To make sure it has something good to grab from eeprom, I found I can toggle the mode switch a bunch until it does a thorough ground start. I havent read anything in the manual for ardupilot(legacy)that actually tells you to do that but it works. Once it has done a good groundstart, causing an airstart results in a quick recovery. That's what was missing and causing my crashes. It wasnt the BEC(2A w/2 servos and ardupilot), could have been a bad connection at least once, definitely an airborne reset more than once.

The remaining problem is RTL. I tried it and it headed for home and when it got there, it changed course and headed north. It did that twice. I got it home and checked eeprom and there were 2 waypoints in there and theyre both north of where I was flying. The home position was good this time.

RTL isnt Auto, but I have to wonder if having those waypoints in there is doing something.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Oct 19, 2012, 06:22 AM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
Swapped out the ESC, added a seperate BEC and everything is quite cool. The first noticeable difference is the motor beep is about twice as loud. Something was wrong with the first ESC.

As for the GPS, I fried it with reverse polarity, problem solved. No more bad fixes from that unit.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Oct 19, 2012, 08:32 AM
Registered User
Near Austin
Joined Dec 2001
5,381 Posts
Welcome to the world of UA! It can be frustrating trying to chase all the demons out our your system, but that's the nature of the beast. You'll find that most ESCs are dirty little beggars and the only job they are suited to is powering the motor - and sometimes it can't even do that! A separate power source that is stable and filtered is a wonderful thing for any flight computer. Having a graphical representation of what your aircraft *thinks* it is doing is a wonderful thing as well. At least then you can see it heading for mother earth in real time! I have solved my GPS problems in the same style you did more times than I care to count - can you say "Hello Mouser!"

Good luck, it seems you are doing all the right things.
CenTexFlyer is offline Find More Posts by CenTexFlyer
Reply With Quote
Old Oct 20, 2012, 05:13 AM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
Thanks for the attaboy, CenTexFlyer. It's a process. I have an airframe that is stable and a mold for replacement fuse pods. I'm on the third pod now. I'd like to mold a wing for it and have some ideas for that. I'll introduce the telemetry bug when I see some reliabiltiy - baby steps.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Oct 20, 2012, 06:08 PM
It just keeps getting better!
Blue Sky's Avatar
Eureka, CA
Joined Oct 2002
1,530 Posts
Just a thought on using your old laptop.
What I like to do is cut the external supply cord and solder a male battery connector on the laptop side and a female connector on the supply side. Most laptops will run on a 4 cell lipo
though some need 5 cells.
Blue Sky is offline Find More Posts by Blue Sky
Reply With Quote
Old Oct 22, 2012, 02:30 AM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
Good idea, Blue Sky.

My bug hunting has been going better. I got the BEC installed and went for a flight. It was very windy and when I switched to FBW, it settled right in and smoothed out the bumps. I checked the BEC and ESC on landing and it wasnt even warm. One bad bug down.

The day before I found out how important it is to verify a proper calibration of the sensors. I flew it without a groundstart and it seemed ok at first and as the flight went on it got more and more irratic, wouldnt climb, wings rocking all over. It eventually crashed when I was too stubborn to switch to manual trying to land it. The drift is significant without those offsets.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Oct 23, 2012, 11:06 AM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
The seperate BEC has performed great so far, no shutdowns. I can focus on testing various modes. Without the GPS, I have to test modes that dont rely on it like Circle and FBW-A. It doesnt like banking at 40 degrees. The IMU has no problem setting the angle, but it stalls and spirals down. I'm thinking I'll try to fly it faster and see if it will then handle the max bank angle, or I might just reduce the angle and play it safe.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Oct 26, 2012, 05:23 AM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
It's PID tuning time. I had to learn what that is first. I looked at the code and my first thought was what are good initial numbers. That problem is not unique as I read up on what is a PID.

One method says increase P until there is oscillation and then back off. I and D are trickier apparently. From what I've read, I will control overshoot and D is like a long term predictor whatever that means.

Another method actually uses a formula as a starting point but it doesnt explain how to tweak it from there.

It's a long process.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Oct 28, 2012, 05:41 AM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
My goal with the PIDs is for it to be as crisp and stable as it is in manual. It was gusty today, nothing overpowering. In manual I could see it get rocked and the inherent stability would kick in and self right. I'd switch to FBW and it would get upset by a gust and the corrections were too big, too slow and would overshoot.

Right now the only gains set are on P and are .004 for pitch, roll. I and D are .000

I guess I should raise P until it quivers, or am I already seeing the effects of high gain?
HELModels is online now Find More Posts by HELModels
Reply With Quote
Old Nov 03, 2012, 08:23 AM
Registered User
HELModels's Avatar
Joined Aug 2003
2,631 Posts
I just discovered Flightgear and am playing with HIL. I can play with PID's all I want and crashes dont hurt. In fact, I havent even crashed and the Ardupilot has been very consistent. I raised PID's to some ridiculous level and it didnt matter which is kind of puzzling. The servos are more active but that's it. I expected to see the wings all over the place.
HELModels is online now Find More Posts by HELModels
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question sport, pylon, f3a.. what are all the catagories and what do they mean? flybybob Beginner Training Area (Fuel) 3 Jun 30, 2012 10:10 PM
Discussion what could cause a belt to get lose and what can i do wc_wickedclown Electric Heli Talk 6 Jun 23, 2012 03:01 AM
Discussion What plane? What to use my Sbach 342 guts in ? phranticness Scratchbuilt Indoor and Micro Models 9 Jun 05, 2012 01:42 PM
Question What motor to what speed control? Free Scratchbuilt Indoor and Micro Models 1 Mar 29, 2012 10:14 PM