LibrePilot Forum

Development => GCS General => Topic started by: prnet on January 24, 2017, 01:38:23 am

Title: trouble, arming not allowed
Post by: prnet on January 24, 2017, 01:38:23 am
Hello at all. After some years i'm trying to rebuild my drone, using a Revo Mini. I use an oplink for telemetry and m8n gps. (once i used to have an arduino board).

I cannot arm the quad. All the alarms are green, but when I try to arm, the ATTI and STAB rectangles on GCS became red for a moment, and a red cross appear for a moment too, as also disarmed rectangle flash yellow for a moment and the quad clearly wont arm.

I tryed to configure  everything, the terrain scope show and the 3d quad model respond good when i rotate the quad... home configured...
I also tried to configure an ubex m8n gps, but i have the same issue.
Gps seems well configured (i configured with ubex messages) and it fix more than 10 satellites.
I tried also to use an external magnetometer connected to flexy i2c port, but it seems to not get any value.
however, the board magnetometer seems to work, and send correct values.
Arm is set on yaw control, RC is well configured.
in a few words.. either with 15.09 and 16.09 i have the same issue.

So.. the quadcopter doesn't want to arm .. any idea? thanks, everybody.




Title: Re: trouble, arming not allowed
Post by: TheOtherCliff on January 24, 2017, 01:59:09 am
Are you still using Basic AttitudeEstimationAlgorithm ?

If so, this happens sometimes when the gyro sensor has more noise than normal (but still could be good and flyable).
https://forum.librepilot.org/index.php?topic=2910.msg20215;topicseen#msg20215
Well, this should only happen in 16.09 ...
Title: Re: trouble, arming not allowed
Post by: prnet on January 24, 2017, 02:49:58 am
Thanks, well, i'm using basic(complementary) fusion algorithm..
Magnetometer scope seems to be died..
raw magnetometer sends good values.
I'm starting looking also at barometer which seems to send wrong values now.. maybe too high.

However, if i switch to complemetary+mag on magnetometer scope alternates between warnings and ok tags.
I included settings if somebody could help me.
Thanks, Paolo
Title: Re: trouble, arming not allowed
Post by: TheOtherCliff on January 24, 2017, 06:34:19 am
It won't arm if you use Complementary but have some GPS modes on your FMS.

I suggest you start simple.  Leave it Complementary.  Set Flight Mode Switch to have only simple (non-GPS) modes like Stabilized 1 (Attitude) without "Assisted Control" (that is GPS Assist).  Disconnect Aux Mag.  Don't use a cloud config.  Use PWMSync for ESC protocol.  Use default config and don't change anything till you have it flying.

Baro a little high isn't a problem.  It's all relative.  It doesn't care if you are at 300m and want to climb 1m or if you are at 400m and want to climb 1m.

I see that you have a red ? and a red boot fault on your system health.
Title: Re: trouble, arming not allowed
Post by: f5soh on January 24, 2017, 07:22:48 am
Hi,

In all cases the 'Raw Magnetometer' scope show the onboard and auxiliary mag readings.
The "Magnetometer" scope show the Mag readings taken in account (can be onboard or auxiliary) when you use a Fusion Algorithm using Magnetometer.
Simple Complementary do not use Mag and others yes.

The Barometer scope show the pressure (black trace) with high number around 100000 so you cannot see precisely the others traces (temperature and altitude) because the vertical scale is shared. If you double click on scope and disable the temperature and pressure traces, altitude will be displayed alone and more precisely.

Boot alarm will prevent for Arming, simply reboot the board. Remove power, disconnect and connect again.
Title: Re: trouble, arming not allowed
Post by: prnet on January 24, 2017, 09:01:41 am
the red boot alarm is due to a couple of changes i made. I just shooted a screenshot after that.
A reboot is enough to fix that red warning.

I already set a simple configuration too and disconnected either gps and external mag (i also reconfigured properly the configuration board).
I'm trying to keep things as simple as u suggest.
the only weird parameter seems the barometer temperature, which fails to calibrate and show kind of 0 value.

I think also that gps is excluded from the problem because i excluded it from the flight modes.
The problem is always present.. in gps mode, and in basic complementary too.
It must be due to something else.. but I'm giving up, as it is very stressing to have everything semming well configured and cannot arm up the quad..

The only doubt that I have is that theboard is positioned on the top of quad, made of alluminium. I wonder if this can distort the readings (but why only when i try to arm?!).


Title: Re: trouble, arming not allowed
Post by: TheOtherCliff on January 24, 2017, 10:17:45 am
On top of a metal quad should not cause arming problems.

You should use all nylon/plastic mounting hardware for the FC, even the screws and standoffs.

Have you done the first 3 calibrations on the Attitude->Calibration page?  See the Attitude->Help page for help.

Are you using the onboard OpLink?  Try disabling it (set to 0 power and reboot).  I had some strange things happen that turned out to be the antenna was disconnected.  It could also be shorted.  Even shorted in the board sometimes with these cheap clones.

I would export my current settings (in case I wanted them back), erase settings, and start over (GPS/mag unplugged and disabled).  OpLink disabled.  You should be able to get something flyable within an hour.  Run the wizard, do some calibrations.
Title: Re: trouble, arming not allowed
Post by: prnet on January 24, 2017, 11:35:14 am
i'll give a last try disabling the board oplink.  Is there a debugger to enable or something that could help me  to catch the error?
Title: Re: trouble, arming not allowed
Post by: prnet on January 24, 2017, 04:45:54 pm
in my version 16.09 this tab is not present?! any idea?
I saw in another thread that it was added on a rc15.09, but i discovered this setting tab on a youtube video.
any idea?
Title: Re: trouble, arming not allowed
Post by: TheOtherCliff on January 24, 2017, 05:19:46 pm
If you are running the release version of 16.09 and you have an FC that has mags and you have it plugged in USB, it finally shows up after several seconds for the FC to boot up.

Plug in USB and look at Configuration->Hardware tab.  Picture will have small text saying what the FC is.  Do you have a CC3D, not a Revo, or somehow got a CC3D bootloader on to the Revo?  You can also look at Firmware tab for direct easy display of the board type.

CC3D does not have a baro.  That might explain the arming problems (if you have a baro thrust mode enabled).
Title: Re: trouble, arming not allowed
Post by: prnet on January 24, 2017, 05:35:47 pm
going to verify as soon as i'll be home..
the FC has accel, gyro, baro and mag of course..
on raw scope i can clearly see mag data..
but i'm going to verify firmware version and and i'll post.
In the hardware tab I remember that it is shown Revo (not my mini version image, but i think that it's the same, my board it's just smaller).
When i opened the board enclosure I clearly saw that all the components are in place).
my FC is attached (but m8n ublox gps instead of the one in the pic).

Title: Re: trouble, arming not allowed
Post by: prnet on January 24, 2017, 08:19:43 pm
I was finally able to set the external magnetometer on i2c port, and match the orientation with board mag.
External mag is quite precise, but the board mag reaches 20% error also.

I was able to arm the quad for a moment but I have now some other problem.

The system seems very busy, RX is on the red and sends more than 2200 packets.
every 3-4 or 5 seconds i2c and cpu flashes red which indicates too much activity.
For the truth rx has always been at max values but now cpu alarm started to give problems.
Also tx input always has some lags.

am I missing something else?
here attached config, thanks.

Title: Re: trouble, arming not allowed
Post by: TheOtherCliff on January 25, 2017, 04:28:08 am
I2C aux mag can cause this.  For several reasons it can have an I2C problem and that can cause red CPU or reboots.

I would try to make a better I2C cable.  Shorter is better.  I haven't tried it, but I would make the IC2 cable 3 wire instead of 2 wire, with the 3rd wire being a ground.  You can add some external pullup resistors too.

Also, 16.09 has "software configured pullups" coded in.  Earlier versions do not.  You should be running 16.09 or later.
Title: Re: trouble, arming not allowed
Post by: prnet on January 25, 2017, 09:35:22 am
It could depend on lots of factors.. maybe ram related... or firmware related.. maybe due to new versions which uses more resources?! or too much data to evaluate... or config.. And think that i was able to fly with a simple arduino mega 8 bit :D

Honestly  I don't know what to think.. The last possibilities is to find and try another firmware version or another firmware.
The FC behavior is too weird to work.
I already spend full evenings only trying to config a boad that should have flied in 10 min config.

However, thank you for your time and replies. You helped me a lot and you gave me hints. Unfortunately it seems liek that the board is like an evil that doesn't want to fly.

Have a nice day,
Paolo
Title: Re: trouble, arming not allowed
Post by: f5soh on January 25, 2017, 01:23:16 pm
I2C error comes from I2C... errors.

That said you may redo the wiring, shorten the wires and maybe add pullups to ensure the I2C dialog still fine in all conditions.

Nothing evil or magic.
Title: Re: trouble, arming not allowed
Post by: hwh on January 26, 2017, 02:58:39 am
It could depend on lots of factors.. ...

No it doesn't depend on lots of factors, just one.  You decided to ignore our advice on what type of gps to buy and save a little money by buying a cheaper GPS with an I2C mag instead of the Naza type we recommend.  The Naza you change the connector, plug it in, and it works.  It also only takes up one port instead of two. The I2C ones are always a problem because the cable has to be perfect and fairly short.  To run a longer cable reliably you have to add external pull-up resistors.  That's why every time someone asks what GPS to buy we recommend the Naza or one of the clones of it.
Title: Re: trouble, arming not allowed
Post by: prnet on January 26, 2017, 04:33:19 pm
Quote
It could depend on lots of factors

I understand, i2c is due to i2c problem. but I already had a ublox m8n gps to adapt which is substantially one of the most used, and not so chip at all. And nobody told me which gps to use. I just made some research on the forum and google.

At last I substantially used the procedure reported here on the wiki which reports clearly ubx settings. I didn't find any unrecomandation for ubx as was instead for nmea protocol.
https://librepilot.atlassian.net/wiki/display/LPDOC/Configure+a+GPS+for+CC3D
the wizard procedure also let me choose between some gps, where my ubex m8n+mag is included. I found no advices about any kind of possibly trouble about it.

By the way, I'm confident that the board has some other primary problem, due to something else. Infact, if i disable gps and mag from ports, and i detach wiring, the board won't arm up either in basic(complementary mode).

the internal mag remains within 5-6%, maybe max 10%, and i set the max allowance at 15.
Then when I try to arm it immediately red flash the atti and stab warnings, which causes the board to not arm.
I can see some lags in the gcs tx/rx inputs tab... and in the lower window, i can see that bps is on red area with more than 2200bps received either when the board was with clean firmware.

As a try to monitor bps, I installed Dronin Gcs+ firmware, which is similar to librepilot, and I saw that rx packets were in the green area (800-800bps) but the board is unstable and reboot every few minutes.

Then I ask myself if this misfunction on librepilot could be due to too much data sent?


p.s. I clearly tried also to shorten the wiring and twisting with an additional mass cable, but no improvements.
I never had i2c troubles before, with other cpu also, with other electronic devices, made sometimes also with very ugly soldering points.


Title: Re: trouble, arming not allowed
Post by: f5soh on January 26, 2017, 06:57:46 pm
Quote
At last I substantially used the procedure reported here on the wiki which reports clearly ubx settings. I didn't find any unrecomandation for ubx as was instead for nmea protocol.
https://librepilot.atlassian.net/wiki/display/LPDOC/Configure+a+GPS+for+CC3D

This Wiki page is only needed to configure the GPS to be used with CC3D.
Revolution board do not need this setup.

Main auxMag thread : https://forum.librepilot.org/index.php?topic=1110.0
Show you others users with I2c issues, you may need to add pullups resistors.

A 2200 bytes/s is not a problem and only occurs while you look at AuxMag tab, due to faster updates.
When you go to the Input tab you can see some lag due to normal slow update settings (every 2s) because you are not running the Tx Wizard or Manual calibration.
This means a delayed display but direct response while flying of course.
Default rates are choose to allow telemetry link over radio at 57600 (not full duplex so real baudrate around 30000)

Maybe solve first the reboot / unstable issues you have with a simple config before trying to setup a I2C mag.

Title: Re: trouble, arming not allowed
Post by: TheOtherCliff on January 27, 2017, 06:00:53 am
I'm testing some DJI GPS/mag issue today and wanted a different mag for a test, so I configured DJI GPS with I2C mag on a Sparky2.  I tried several brands of GPS with I2C mags and none would run reliably on I2CPort, but they some would run reliably on FlexiPort (some wouldn't).

The mag hiccuped several times during flight, when connected to I2CPort and it glitched to full attitude mode bank angle for less than a second.  I stopped testing that way.  :)  Several flights with no problems as long as the a particularly good mag was connected to FlexiPort.
Title: Re: trouble, arming not allowed
Post by: prnet on January 27, 2017, 12:24:33 pm
Unfortunately I'm still trying to arm it withouot external gpsand mag.
Gps+ext mag will be a second step. I just want to see it working without first, but still get crazy stab and atti warnings when arming. Green all the time,  become red for just half second when arming.. then green again. So it's impossible to fly.

is there any logger or debugger that i can activate to analyze the data when i try to arm?
Either using the minimal configuration, i cannot make it works..  :-\

Title: Re: trouble, arming not allowed
Post by: TheOtherCliff on January 27, 2017, 05:18:08 pm
For AttitudeEstimationAlgorithm I only every use Basic or GpsNavigation/INS13.  Basic only gives you non-GPS non-mag flight.  INS13 can be used for that and also for GPS/mag guided/assisted flight.

You must have all the sensors that are required working correctly (plus calibration for mags) depending on AttitudeEstimationAlgorithm.  Remember that GPS flight uses the baro too, so you must cover it with foam as documented in the wiki.  Edit: also remember that you must set HomeLocation for INS13 and mag to work.

If your goal is GPS guided or assisted flight, please use INS13, else use Basic.

You must perform at least calibrations 1-3.  Please see the Attitude -> Help page.  :)

Are you now using Basic, INS13, or something else?
Title: Re: trouble, arming not allowed
Post by: f5soh on January 27, 2017, 06:40:41 pm
Quote
is there any logger or debugger that i can activate to analyze the data when i try to arm?

Try Complementary, basic config and do a log:
- Tools > Start logging...
- Try to arm a few times
- Tools > Stop logging

Post the log file and the config file here.

Title: Re: trouble, arming not allowed
Post by: prnet on January 31, 2017, 09:31:17 am
I dont know how, but I can finally arm now. And I learned a lot too.

But I encountered few problems... So far I first flashed the betaflight firmware, but at this point it was a challenge, and iI was intentioned to solve the trouble.
Then it was very difficult to upload back the .bin revolution librepilot firmware. I had to use the FTTDI and ST tool and short the bootloader mode on the board, which is a mission to solder.

Then I had to manually reprogram an esc with an arduino as it didn't want to work good anymore(don't ask me why).

Finally, I was able to run librepilot again. I still see atti and stab flashing for a moment when arming, but now, it arm and the atti/stab became imemdiately green.

Now another difficult part. It works good in RATE mode. Each motor spin good at the radio inputs.

Attitude will be a challenge. I set generic quad, and I need to set PID, as the quad has a CRAZY behavior in attitude mode.

Is there a configuration I can start with?
The quad is about
2kg with battery,
turnigy plush25A escs,
3A 3 cells battery,
hextronix dt750 900kv motors which can thrust about 1kg and draw up to 18A .




 
Title: Re: trouble, arming not allowed
Post by: TheOtherCliff on January 31, 2017, 06:33:33 pm
Have you actually tried to fly it in Rate or Attitude?  :)
Title: Re: trouble, arming not allowed
Post by: prnet on February 01, 2017, 12:35:34 am
I enadled txpid module, set pid in rattitude  mode.. I'm flying  now in attitude mode.. And I just enabled aux mag. The quad flyes good with both mags enabled now.
i'm going to enable int13 and hopefully gps tomorrow.
The main challenge will be increase the flight time. Actually I can flight about 10 minutes with a 3amps battery. But I still can cut some weight here and there.. So I  wish to earn a couple of minutes more..
PID settings was pretty simple, but I'd like to improve settings and have receiver inputs a bit more responsive.
Stay tuned..