'm having some trouble adapting the new IMU v3 to Jean-Louis' code written for tricopters. His code used the APM_Compass library and for some reason, it wont compile with any reference to that library. The new IMU doesnt use that library, so I havent let that stop me from trying. It compiles and gives me output, but something is still wrong. The debug wont print GPS and the attitude values although stable seem way off. I'm hoping some experts can look at my code and tell me what's wrong or even what is right.
I've included the code I have now. Please help if you can.ardimupter-120708b.zip
Tags:
Permalink Reply by Harry on April 27, 2013 at 6:11pm Productive is always good.
I'm not sure if I've been productive but I've been busy trying stuff. I went back to an old attempt with the original ardupilot to see if it would control a KK board. I was surprised this time, the KK armed and worked the motors. I had the IMU in there too. I armed the KK, gave it some throttle and then hit stabilize and it worked. I tilted it and I could hear it changing. There's a problem with rudder, it's all over the place like the ardupilot rudder needs to be reversed maybe. It's only in stabilize that rudder is messed up, so it could be something else.
I also tried it with the Tristab loaded on the IMU and no ardupilot. It also armed the KK, but when I throttled up, I could hear the motors sputtering. It would work for a few seconds, then it would cut, come back on.
The difference between the 2 tests was big. I'm tempted to try to fly it. That board only has an Atmega168 and it doesnt skip a beat, but that program isnt open source.
Permalink Reply by Harry on April 30, 2013 at 1:29pm Jeff, I might need to send your APM back to you. I've got one more thing to try with it and that's using a better BEC. I was using the BEC on an old ESC and now that's looking like it was the problem. The shrink over it is all melted so it could be overheating and dropping out. That could explain the APM restarting.
As for using the KK to give tricopter mixing, I'm not crazy enough to fly it yet. Just when I think I have it setup right, it does something strange like swap which motor gets pitch and roll. I bypassed the ardupilot's rudder out because that is known to be a problem until some traces are cut. The IMU does seem to be working on attitude. Without it, the KK is ok. With IMU, it seems smoother and more sensitive to small attitude changes like it might see in a hover.
Permalink Reply by Jeff Smith on April 30, 2013 at 6:20pm I'd definitely try a different BEC if it's showing signs of being heated... bummer
I use a 3S lipo pack with a dedicated Castle Creations SBEC for my APM and power the servo's separately. It's a fairly complicated setup as I spent some time chaining the ground in star/series configuration to keep noise and ground loops away from the APM, but I wouldn't think you'd need to go that far.
If the new BEC doesn't help the APM shoot it back to me and I'll see if I can sort it out and get it back to you.
Permalink Reply by Harry on May 1, 2013 at 5:00pm Yeah, a good BEC should be enough.
The whacky KK/IMU setup is the one acting like it's suffering from ground loops and noise. It's inconsistent. If I arm it before the ardupilot initializes, all 3 motors work. Arm it after it initializes and only the back one works and real weak and sometimes it's fine. I moved everything as far apart as I could and it improved. As battery voltage falls, things start to change again.
If I could get a tricopter program into the Ardupilot, then it'd be simpler and that could possibly be made to go on the sparkfun board.
Permalink Reply by Jeff Smith on May 1, 2013 at 7:34pm Be aware that 5.0v +/- 0.2v is ultra critical on the APM, I mention it in regard to your comment about the behavior changing with battery voltage. This above anything else I have found will cause issues with the APM.
Permalink Reply by Harry on May 12, 2013 at 9:27pm Hey Jeff, I've got a switch mode BEC on the way. That might solve some problems.
Permalink Reply by Jeff Smith on May 12, 2013 at 10:03pm
Permalink Reply by Harry on Wednesday Here you go, Jeff, finally got around to looking at the accels to see how my mount performs. It's surprisingly good and simple. I took the bubble wrap you sent me and folded a section about 4 times and then wrapped it with some masking tape to hold it together. I used the APM mounting holes and took hook up wire and attached it to some holes in the frame. To tighten it I used some pliers and twisted the wire.
Here's a shot of the accels with 2 landings, hard landing at the end:
Permalink Reply by Jeff Smith on Wednesday
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.1299 members
48 members
693 members
51 members
249 members
© 2013 Created by Chris Anderson.
Powered by
