Just finished putting together my second hexacopter. I built it just like the first one. Loaded up 2.4 and went through all the setup stuff with leveling and such. When I first took off, it acted like it was in acro mode and very unstable. After several more tries, it went stable, but drifted hard right. Tried to correct but no joy. After it flipped on landing I noticed the PC screen which was showing a constant roll. I flipped the hexa over and it still showed a roll. I power cycled multiple times, releveled with no joy. I even when back to 2.3 which is working on the other hexa and it still failed in flight.
I finally hooked it to the PC, releveled and then plotted gx, gy, gz. The artificial horizon showed level, but gx was a constant 30 degrees off and lots of noise. Gy and gz had little glitches every so often, but appeared stable. It appears to be a bad gyro?? Any other guesses? I've got another oilpan, so I'll see if swapping helps anything. Very strange...
I swapped the oilpan with another and everything works fine. I guess the original one was bad from the start.
are you using the BL_Ctrls for this set up, if so what did you have to change to get the code to work, I still have the hexa_motors.ino you posted but when i compile it with old and new code I get a bunch of out of range errors and doesn't produce a sketch. also do you have other sensors in your setup ie mag optical flow, sonar ?.
Yes I'm using the BL_Ctrls V2.0 in this hexa. I'm compiling with arduino 022-relax patch. I'm running arducopter V2.4. In order to get it to work in the latest version, I had to modify the inputs to the I2C motor setting function to match the new #defines, but that was all I did different. I am using sonar. I would like to use optical flow, but I'm probably going to roll my own. My hexa is going to have a gumstix mounted on it with camera for image processing, optical flow and a few other things.
would you mind posting the changed files, I'm kinda new to this and so not very comfy with to know where I'm going wrong. Thanks
The only file I touch is the motors_hexa.pde. I just changed it for V2.4.1. I will test tomorrow, but I've done this a bunch of times with no issues. This code assumes you are using the MK power board and the BL-CTRLs V2.0 have the addresses set as marked on the power board. I have attached the file.
ooops! Just noticed a small error. Here is the corrected file. Sorry about that.
Its all good thanks
Are you using pullup resistors on the clock and bus lines or simply connecting your distribution board scl & sda to the APM clock and bus. If you are using resistors what are they rated, I haven't gotten my setup to control the BL_crtl yet and was thinking that may be the issue and was planing on adding some 10k resistors, or that the version 1.2 BL_Ctrls have a different address - I have been reading some documentation and blogs with the addresses at 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5b.
I'm just connecting the scl & sda from the power board to the APM. If you are using V1.2 BL_Ctrls, then the addresses are different and I have no clue as to what they are. After lots of searching, I found the base address of the V2.0 which is what I am using. You will have to search the net for that info. The base address is important. I just add the controller number (minus 1 I believe) to the base address to pick the motor I'm sending commands to.
got it to compile with no errors, thanks for the help let me start my testing and see if everything works, I will let you know how it goes.