I have just bought the ArduPilot Mega 2560 Full Kit... plus the Triple Axis Magnetometer HMC5883L. I should have it built over the weekend.. then i'm off to a my mates machine shop, and i'll make the splitter plate for the lower frame onto which i am going to fit the Ardupilot. the magnetometer i'll put on the tail as suggested. I am going to use my X-cell Razor 600E. For those that dont know its around the 50 size nitro heli.
Do i need to buy any other sensors i.e. the Sonar... i can fly a helicopter all day long but this is my first time flying one with stabilisation so any tips would be gratefully appreciated.
If this works well then i am going to try and use it on my x-cell gasser. i can get up to 20 minute flights with this. But i think for the time being a battery 600 is the way to go.
i'll post some pictures when i have it all together.
Well, technically, we "can' do RTL and Autoland. Just nobody has done it. A big part of the problem is the risk of tip-over. The auto-land is a bit rough, in my opinion.
That part of the code is exactly the same between Heli and Quad. It's just that no helis have tried it. And we haven't even done much auto waypoint flying or RTL.
There's no real reason why other than, there are less of us, and the risk and cost of a crash is greater, so we just haven't played with it as much.
I am thinking trying to give it a play over the weekend. I haven't got time since last time it tipped over and broke my gps unit.
Besides, I know multi-copters have the "arm" procedure before you take off, but as I understand heli code does not have this part of procedure right? Then how to mark the "home" position so I can perform RTL?
The home position is automatically set when it first gets GPS lock. It is therefore very important to do the arming proceedure from the landing zone, otherwise it will RTL to your picnic table or wherever it was when it first got a 3D fix.
Ok, I tried it today. It did not seem the loiter or RTL will hold the heli to one fix place, I could see after I made the switch, the heli will go up, then will move away from where it was but I have no idea if it had a location in mind... it moved too far away I had to bail out and regain manual control.
Also, the .gpx log files downloaded has almost no content but a single line:
and the .kmz files nid not contain flight pathes, google earth was not able to display any gps coordinates. I did make sure I wait for the blue light on gps to stop flashing.
What should I adjust then?
You should also ensure that the red light on the APM1 (or blue light on the APM2) stops flashing before take-off. The blue light on the gps itself only checks for a 2d lock while the one on the front of the APM1 (or back of the APM2) will stock flashing on 3d lock (which is what it needs to do loiter).
Check out your dataflash logs, the NTUN message in particular is useful or you can turn on loiter PID logging by connecting via the mission planner's terminal screen, then type "logs" then "enable PID". Then on the OLD_CONFIGURATION screen in mission planner switch on channel 6 tuning to the loiter_rate.
I did not have time to go to the park yet. I did a quick try on the back yard, and as soon as I change to loiter the heli will try to climb, as it is a small yard I have to bail and as soon as I flick it back to stabilized mode the heli dropped attitude quickly almost crash it. Was the heli trying to climb to a pre-defined attitude?
Also, the "loiter_rate" I assume it is "loiter_rate_p"?, and the loiter_rate_i I think it controls how small error to begin the correction? I am a soft engineer myself but unfortunately did not get a chance to learn any machine control stuff... It is very interesting and I really want to learn more.
No, the heli should try and stay level when you go into alt hold (or loiter). best to check the logs. I've certainly heard of other people having this problem -- so far it's usually been related to a noisy sonar.
By the time you went back to stabilize mode, you'd probably reduced the throttle (this will be clear if you look at your data flash logs) so that's the most likely reason why it came screaming back to earth.
You might want to check out the wikipedia PID controller description. the loiter_rate controller controls how much the copter leans to get to a desired speed. The P component of this controller is the most important one.
A couple of new problems I observed:
1) No log! Actually the logs available to download seems not from any my flight sessions. I cleaned up the logs and no more logs were created any more. I am using v2.5.4
2) There was a leaning to the right after the helicopter take off and hover. It did not show up when it leaves the ground, but once on the air the lean is more and more and finally it continuously drift to the right until I have to land.
3) The tail will randomly suddenly blow out and turn the helicopter almost 180 degree.
I have totally no idea if this is hardware or software problem? With no logs I don't know what I can provide and ask for help.
Wesley, thx for the reply so quick. As Randy explained to me, for heli there is no arming/disarming procedure... is this correct? You meant the issue was APM was holding the log data and need some external action to trigger the log file to flush?
The leaning is when I was doing stabilized mode. I don't remember I was seeing it last time when I tried (Mar 2012). Could this be a firmware issue?
The tail was working very fine. I had the heli working smoothly before putting on the ARM. Today I re-uploaded the latest firmware, did a factory reset and the tail problem seems no longer exist... at least for now.
I am at a total loss now. Not sure if I am just having a bad hardware? The pitch up, the leaning, the disappearing of logs.
You don't HAVE to arm/disarm, but I've loss quite a few log as well. I've noticed that a disarm would close the current log and start a new one. Ever since I do that, I haven't miss any log any more. Also, arming it would reset the baro attitude reading. It is good to do it.
I only started using APM a couple of weeks ago and I have nothing to compare with. I'm already very frustrated with the stabilizing mode because of the random drifting. I gave up on it for now.
I found the problem of why the random drifting that get worst and worst. Ever since I notice such problem, I gave up on auto_trim and just used the ArduCopter Level button in the APM Planner to reset the leveling on a level ground.
I just went to a parking lot to test out the loitering mode again. I re-level the heli on a spot on the ground. Flew it for awhile, came back, my Flight Data screen showing that my heli is tilted to the left. So I figured I must have it tilted before when I did the reset level. So I reset it again and flew again. Few minutes later and came back. I looked at the Flight Data screen again and now it is telling my heli is pitching back. I carefully looked at where the heli stood and it was the exact same spot. So I reset the level and flew again, and came back. It is telling me my heli is now tilting to the right, even it is standing steady at the exact same spot!!! No wonder my heli kept drifting in random directions all the time!!!!
It sounds like a bug, not sure if it is in my APM2 or in the firmware. Let me look around, and maybe repost it in the appropriate forum.