MegaPirateNG / ardupilot-mpng

MegaPirateNG
GNU General Public License v3.0
117 stars 105 forks source link

Board hang when increasing throttle (Auto disarm) #3

Closed SirAlex closed 10 years ago

SirAlex commented 11 years ago

If your board hang when you increasing Throttle in armed state (Looks like motors switch off when you pass 30-40% of throttle). Please, post here this information:

  1. MPNG version:
  2. Board type (RCT Crius v1,v2, HK... etc):
  3. ESC type
  4. RC Receiver type and how you connected it to board (PPMSUM, PWM):
  5. How you power board(ESC, BEC...):
  6. What also you connected to board (OSD, modem...)
  7. If any logs(I'm prefer from board if available), video available, please post it here:
Caipi77 commented 11 years ago
  1. MPNG 3.0.1R2
  2. Hobby King "Multiwii and Megapirate AIO Flight Controller w/FTDI (ATmega 2560) V2.0"
  3. HLNe 15A
  4. ACT, slim8, S3D (ACT), 2.4GHz. PWM.
  5. BEC
  6. -
  7. N/A

Comments: Board hangs up after few seconds running with 30-50% throttle. Yellow LED shines permanently when board hangs up. This also happens when I have the board connected to the Mission Planner via USB cable. Hang-up can be resolved by disconnecting and reconnecting. Hang-up also happens in alt-hold-mode.

SirAlex commented 11 years ago

@Caipi77 , In your case, motors stop or not? Or just telemetry stop working, but board work?

Caipi77 commented 11 years ago

The motors stop and I cannot take control over them anymore with my RC transmitter. Only if I click on "Disconnect" in the Mission Planner then I regain control again.

SirAlex commented 11 years ago

@Caipi77 , Could you please, try to reproduce bug with connected USB and connected some terminal application, for example PUTTY? Maybe board print some failure notice into Serial0, so I hope we can read it..

Caipi77 commented 11 years ago

Yes of course I can try. What Connection type do I have to choose? (RAW, telnet, SSH, RLogin, Serial)? How do I get the hostname/IP address of the board? Thanks!

SirAlex commented 11 years ago

You must select Serial, and enter COM port of your board and port speed. Also you may enable logging (Session -> Logging) enter file name and set "All session output". And after testes send me this log file...

Caipi77 commented 11 years ago

all right, i will do this!

c-bob commented 11 years ago

@Caipi77 : do you use CPPM or separated PWM channels?

Caipi77 commented 11 years ago

PWM in my case:

define SERIAL_PPM SERIAL_PPM_DISABLED

Caipi77 commented 11 years ago

Hi,

this is the output that Putty gave me. I armed the motors in STABILIZE, gave ~30%-50% throttle and switched to ALT HOLD mode, but this would also happen the same way if I stayed in STABILIZE mode. I hope it will help you to find the reason for this issue. Than you so much for your support!

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2013.09.19 12:55:37 =~=~=~=~=~=~=~=~=~=~=~=

Init ArduCopter-MPNG V3.0.1 R2

Free RAM: 4096

FW Ver: 120

load_all took 10244us 234fs34567hf I2C BYPASS MODE þ  Q}Ýþ/üÿÿ+¬ÿÿ+üÿÿ +ÿÿ ÿ~ Press ENTER 3 times to start interactive setup

þ3ýCalibrating barometer zšþ  QC^þ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿeOþ3ýbarometer calibration complete 4Zþ3ýGROUND START ²AInit Gyroþ  Qú­þ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿV¤_þ  QôLþ /üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿÙô_þ3 ýInitialising APM... qÝþ  Q§Áþ /üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿ©þ  Qs<þ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿˆù_þ  Qª þ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿnÖ_þ  Q~öþ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿá†_þ  Qøþ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿpw_þ3ýInitialising APM... Aüþ  Q-{þ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿ 0_þ  Q#šþ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿƒ`_þ  Q÷gþ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿ‘_þ  Qšiþ/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿÁ_þ  QN”þ /üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿÞÎ*þ3!ýInitialising APM... eÁþ " Q…þ#/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿ2 gyro did not converge: diff=0.163767 dps

INS

G_off: -0.00, -0.04, -0.03 A_off: 0.01, 0.18, 0.25 A_scale: 0.99, 0.99, 0.99

Ready to FLY þ $ Q{‹þ % Q‘õþ & Q¯vþ ' QEþ ( Q¡—þ3)ýGROUND START Ø þ _ Qujþ+üÿÿ¬ÿÿüÿÿ +ÿÿ ÿïÞþ3,ýInitialising APM... !¾Init Gyroþ - Qòþ.üÿÿ¬ÿÿüÿÿ +ÿÿ ÿ¾Ó_þ / Q&çþ0üÿÿ¬ÿÿüÿÿ +ÿÿ ÿXü_þ 1 QÿÐþ2üÿÿ¬ÿÿüÿÿ +ÿÿ ÿ׬_þ 3 Q+-þ4üÿÿ¬ÿÿüÿÿ +ÿÿ ÿF]_þ35ýInitialising APM... Œˆþ 6 Qx þ7üÿÿ¬ÿÿüÿÿ +ÿÿ ÿ†¡_þ 8 QvAþ9üÿÿ¬ÿÿüÿÿ +ÿÿ ÿ:_þ : Q¢¼þ;üÿÿ¬ÿÿüÿÿ +ÿÿ ÿµJ_þ < Qϲþ=üÿÿ¬ÿÿüÿÿ +ÿÿ ÿ$»_þ > QOþ?üÿÿ¬ÿÿüÿÿ +ÿÿ ÿ«ë_þ3@ýInitialising APM... ¯Kþ A QøàþBüÿÿ¬ÿÿüÿÿ +ÿÿ ÿbY_þ C Q,þDüÿÿ¬ÿÿüÿÿ +ÿÿ ÿó¨þ E QAþFüÿÿ¬ÿÿüÿÿ +ÿÿ ÿ|ø_þ G Q•îþHüÿÿ¬ÿÿüÿÿ +ÿÿ ÿÀC gyro did not converge: diff=0.876112 dps

INS

G_off: -0.04, -0.06, -0.04 A_off: 0.01, 0.18, 0.25 A_scale: 0.99, 0.99, 0.99

þ3IýCalibrating barometer ¤ þ J Q¥ŒþKüÿÿ¬ÿÿüÿÿ +ÿÿ ÿ ¿þ3Lýbarometer calibration complete ,Cþ3MýLost GPS! ß_þ N ÑrRþ O ј,þ P Ñ«eþ Q ÑAþ R јþ S  ÑÛ¾þ T Q|»

SirAlex commented 11 years ago

Please, send log as attachment (it's best if you pack(zip) it) to my e-mail: rsoft@tut.by

SirAlex commented 11 years ago

hmm, the only problematic thing is "gyro did not converge: diff=0.876112 dps" - it's mean, your gyro cannot be calibrated. Try to not touch board while performing test, and repeat. Log must not contain these phrase...

srocupado commented 11 years ago
  1. MPNG version: 3.0.1 R2
  2. Board : RCT Crius v1
  3. ESC : Plush 25 amp with BL Heli
  4. RC Receiver: PWM
  5. How you power board: ESC
  6. What also you connected to board: nothing Obs: Calibrated the gyros and accel normally.
claytonc2001 commented 11 years ago

I don't know how much I can help as I am so uninformed as to what all the acronyms mean so (Embarrassed).. Here is what I know. I've had this happen several times (motors stopping in mid flight) .

  1. Megapirateng version: 3.0.1 R2
  2. Board : I should have went with a known good running board but I got this one. It said it would run Multiwii or Megapirate firmware so I got it.... http://www.goodluckbuy.com/mwc-mega-3-0-megapirateng-flight-controller-straight-pin-version-with-gps.html If you know what it is equivalent to please let me know! I wired it up looking at the Witespy 3.0 board which has the same basic pin layout. Mega2560
  3. ESC : Hobbywing Skywalker 40a W/BEC (Disabled) Programing as follows: Brake - off Battery type - NiMH Cutoff mode - Soft-Cut Cutoff threshold - Low Start mode - normal Start mode - Super soft Timing - Low
  4. RC Receiver: JR9503
  5. How you power board: 5v3a UBEC connected to receiver
  6. What also you connected to board: GPS so far but never enabled any ALT hold or Loiter during flight. Problem happens kind of randomly for me. While trying to adjust my PID's I was able to use one battery without any problem. Next battery it died right after take off. Unpluged/plugged in the battery and flew for a few minutes before it dropped again...

Other than this problem (which is a HUGE one) I can see that this is going to be a great flying machine. I can't wait to see this problem fixed.

I would post logs but they don't seem to be any.. Dumb question time.. (How do I enable logs??)

Caipi77 commented 11 years ago

@claytonc2001: your board probably doesn't support logs, but this is what SirAlex recommended to me:

.....Could you please, try to reproduce bug with connected USB and connected some terminal application, for example PUTTY? Maybe board print some failure notice into Serial0, so I hope we can read it.. You must select Serial, and enter COM port of your board and port speed. Also you may enable logging (Session -> Logging) enter file name and set "All session output". And after testes send me this log file... ...

claytonc2001 commented 11 years ago

I used up a whole battery with the quad strapped down to the ground trying to make it do it again. Hitting the throttle hard, easy quick, fast.. A pot never boils when you watch it.. Im sure that if I take it outside and get it to 'break something' height it will happen lol

I have PUTTY but don't know how to find the ip address (or whatever) needed to connect...

Caipi77 commented 11 years ago

@claytonc: choose "connection type serial", specify your COM # at "Serial line" and the speed (probably 115200). Click on "logging" and choose all session output. Then go back to "Session" and click "Open". Arm your copter with the board connected to your computer and raise throttle till the issue occurs. Now all information will be written to the file on your computer. Send the file to SirAlex.

claytonc2001 commented 11 years ago

Went to Serial and selected com4 and set to 115200. Went to logging and checked ALL session output. Went back to serial and clicked OPEN. All I get is a windows sound "DING" like I've clicked something wrong. It doesn't go to any other screen and I don't believe a log is even being created at this point. Quadcopter is attached to the computer (com4) and is powered up using lipo.

quadmax66 commented 11 years ago

Maybe this is not the bug that is reported, because I cannot reproduce the behavior. The problem happens sporadically.

  1. MPNG version: 3.0.1 R2
  2. Board type (Witespy Multiwii Pro 2.0):
  3. ESC: Hobby King 20A ESC 3A UBEC
  4. RC Receiver: OrangeRx R615 Spektrum/JR DSM2 Compatible 6Ch 2.4Ghz Receiver (#define SERIAL_PPM SERIAL_PPM_DISABLED)
  5. How you power board: I use 1 ESC, connected to ESC Pins
  6. What also you connected to board (GPS ublox 6M, telemetry 433 MHz)
  7. sorry, no logs:

Quadrocopter droped from sky 2 times, both times in auto mode, but taken over controll by RC, hovering, always more than 100 m away from home, geofence disabled, failsafe disabled

claytonc2001 commented 11 years ago

Is there an alternate program I can use? Putty will absolutely not work. It wont open the dos box.... Tried running administrator and even xp compatible mode..

Caipi77 commented 11 years ago

I am not an expert on this but 2 things come into my mind: you might check if the com port speed is correct (system/hardware-manager/com-ports) and adjust it. BTW I used putty_0.63. Also you could try it with the "SSH Secure Shell Client" (but I am not sure if that works).

claytonc2001 commented 11 years ago

I am using .63. It just won't work. I have researched this problem and others have had the same issue. I want to do whatever I can to resolve this problem because I want to fly. My main reason for my donation was the hope that this bug was fixed in 3.0.1 Rev2. :( Not to belittle all the work that has been done as I am very grateful for SirAlex's work!

Has anyone else been able to reproduce this problem and send SirAlex the log files? I would think once spotted it will be the same in all the log files.

sosko71 commented 11 years ago
  1. MPNG version: 3.0.1_R2
  2. Board type : RCT CRIUS AIOP V2
  3. ESC type: RCT OPTO 30A SimonK Firmware Multi-Rotor ESC
  4. RC Receiver type and how you connected it to board (PPMSUM, PWM): Turngy 9X PWM
  5. How you power board: BEC
  6. What also you connected to board (OSD, modem...): GPS u-Blox CN-06 & bluetooth modul

Yesterday I tried to fly with the new version MPNG 3.0.1_R2. After a few seconds of flight, the engines suddenly turned off and my quad has fallen down. Luckily was not high (1 meter). When I looked at the status LED on the FC, ​​it seems that it is armed but did not respond to any command with RC. As there was no response I disconnected the battery, when I restarted everything worked normally, but in a re-attempt the flight problem recur. I sliced ​​a few attempts but I did not manage to fly for longer than a few seconds. When I tried at home without propellers everything worked normally.

chsw commented 11 years ago

I'm not sure if this is related. But I have been testing and tweaking my hexacopter without any problems for the last weeks. I havn't had any problems with stability what so ever, until today. For the first time I connected andropilot (using Bluetooth) and uploaded some waypoints. I then took it up in the air (still connected) and after that I'm not sure exactly what happened. I think I changed to loiter, when it used did a roll and landed upside down with the motors "hacking". I couldn't disarm it, so unplugged the battery.

Even though this isn't the way the bug is described, I thought I might report it here anyway, in case someone with the hang issue have done something similar. My gut feeling is that my problem is related to either having andropilot connected when in the air (possible having an unstable bluetooth connection due to vibration/distance/interference) and/or having uploaded waypoints on the board.

  1. MPNG version: 3.0.1r2
  2. Board type RCT Crius v2
  3. ESC type F30-A SimonK
  4. RC Receiver type and how you connected it to board: PPMSUM
  5. How you power board(ESC, BEC...): BEC
  6. What also you connected to board (OSD, modem...) Bluetooth-module, gps
  7. If any logs: log-file from the board is available if asked for
sosko71 commented 11 years ago

My problem is the same as yours. Today I tried several different combinations at home and found that in the case when there is no propeller. it does not occur. I installed the propellers and turned them so that they are pushing quad down I realized that for half of throtle FC freezes and turns off the engines. I took issue with the camera but do not know how to upload a video here, but can be seen on youtube (http://youtu.be/qhgmTjz9mk8). I also have a log-file from the MP and Putty

SirAlex commented 11 years ago

@sosko71, @chsw , Yes all logs you can send to my e-mail: rsoft@tut.by

Currently I have no ideas what can happen. I'm asked for help in DIYDrones forum, I hope developers can help or point where to find error.

sosko71 commented 11 years ago

Whether such problem also exists in R1?

claytonc2001 commented 11 years ago

Im probably the last one that should be replying but I believe this bug has been present since version 2.9. 2.8 is probably a safe bet and I believe that is what I will be going back to as soon as I can get some log files together for SirAlex to examine. Putty will not work for me. Found another one called Kitty that im going to try tonight.

sosko71 commented 11 years ago

I dont have such problem in Paku 2.9.1b

claytonc2001 commented 11 years ago

Where can I get a copy of Paku 2.9.1b to try?

SirAlex commented 11 years ago

I think it's different bug. In 2.9 bug appears spontaneously. This bug 100% reproducible at user side. Each time you increase throttle - board hang. Also, I don't know why it's not appears without props??? I think it's related to power issue. Robert from DIYDrones, think it can be vibration related...

Please, try to isolate mainboard from frame (unscrew it) and try to reproduce with propellers. Just to understand - it vibrations issue or not.

claytonc2001 commented 11 years ago

This may only be specific to my board but originally I couldn't arm it due to low voltage. I reuploaded my sketch file but changed the min voltage requirement from 4500 to 4000 as mine was being reported as 4.2 something volts even using a UBEC which is supplying 5.27 volts to the board. I may lower this even more to rule out this as a problem but seeing how many others are having the same freezing issue I doubt this is related.

sosko71 commented 11 years ago

I'll try tomorrow.

@claytonc2001 paku's version 2.9.1b R8 http://www.rcgroups.com/forums/showthread.php?t=1382503&page=271&highlight=2+9+1#post25456805 DL https://code.google.com/p/megapirateng-add-ons/downloads/list

claytonc2001 commented 11 years ago

Thank you sosko71!

I just connected using a program called Xshell 4. My log file looks like a bunch of garbage. Maybe this is how its supposed to look? I've only tested to see that I can create a log file. I have not created the error as of yet. my log looks like this [BEGIN] 9/24/2013 6:30:33 PM þt$@/Œ———— Ýþu#£î mmma ²þv¤î ÷š~¼Iàˆ<Ó3¦?P3W»‰»’º¢<þwJ ×£p? ×£=J Oþx£!¥«:ÉB;^ÛÍ9 €? ¤H?;Ír:¬þy¥m W®þzüß“  üþÿýÿÿÿJ æþ² ²nþ{›ð ¡GvDš™Á½Õ ¼Üþ|– Ž€ )œ€ ¾Ü =¼« ¼Dja¼Å¼N{;¾€¸=   uþ}/üÿÿ/¬ÿÿ/üÿÿ +ÿÿ ÿ²\þ~ ñfþ ˜½ÿÿ'ÿÿ  hˆþ€> -Âþ!¯ð ˜½ÿÿ¢ ÌXþ‚"¯ð Dö½ \òÊlÝlœôk 9;þƒ

and so on... Is that what your looking for? If so I'll go ahead and make the lock up happen and send it to SirAlex.

Zillah88 commented 11 years ago

How many of you that experience the bug have hard mounted FC's to your frame? I only experience this bug on on my much larger quad (Turnigy HAL) that has the flight controller fixed with nylon screws and stand offs.

claytonc2001 commented 11 years ago

Mine is not mounted directly to the frame. (Aerosky H100) The original controller board was taped/glued to a firm open foam pad. It looked good so I went with it.

sosko71 commented 11 years ago

Today I tried to remove FC from the frame so that it had no contact with him and it worked without any problems. Looks like it's really a problem of over-sensing vibrations

SirAlex commented 11 years ago

@sosko71 , Awesome! Ok, I will try to reproduce at my lab and also I will closer look to Gyro reading code.

claytonc2001 commented 11 years ago

The suspense is killing me LOL! Any confirming results?

SirAlex commented 11 years ago

@claytonc2001 , Sorry but I have no much free time. I have some ideas what can cause this bug:

  1. Vibration. 1a. Vibration can cause some lost in connectors 1b. Vibration can cause some overflow in code which read Gyro and Accel reading
  2. Current 2a. Current can draw a lot of energy, so board hang when voltage drops 2b. The sensing code (Voltage & Current sensors) can cause software hang
  3. Magnetic field
  4. When increasing throttle, magnetic field changes a lot and this cause board hang

Maybe someone can help me and check this ideas as possible.

claytonc2001 commented 11 years ago

Thank you, this has calmed my MegapirateNG addiction a bit.

I will test my quad tonight as I have put some well balanced props on it now.

2b. I have both Battery monitor and Current sensing disabled. (unless the code runs regardless of these settings) I use a plug in monitor that plugs into the balance leads of the battery.

I truly wish I could be of more help in some way. I like solving problems. And this in one problem needing solving :)

sosko71 commented 11 years ago

I made a few modifications to quadu. I mounted FC with rubber bands and I made a new distribution board because I had a lot of magnetic interference.( before I had 300 % intereferences after I managed only 20 %) After these modifications, the quad flew very well. I think that the main problem is vibrations, because befor this modifications, I unmount FC from the frame and it worked OK ( with same magnetic interference - old distribution board) . But I encountered a new problem when I created a mission with mission planner (take-off, two waypoints, RTL and landing). When the quad flew to the first waypoint problem occurred. It seemed that one engine stopped working and the quad is fall. When I checked the log file, I noticed that immediately after the arrival to the first waypoint, FC dropped PWM on the motor nr. 2. I also notice that in CTUN mesage first parameter Thr droped from 419 to 0 in next line. SirAlex I wil send you flight log to check what hapens.

claytonc2001 commented 11 years ago

I finally got my PIDs set and it is flying really good now. Altitude hold works flawlessly. Actually way better than I expected. I loaded paku's version but nothing works when I load it. Cant arm or even get it to recognize my controller. I guess I'm stuck waiting for this bug fix.

I hope SirAlex gets some free time soon.

sosko71 commented 11 years ago

Which version you use now?

claytonc2001 commented 11 years ago

I'm currently using the latest 3.0.1 r2 version.

sosko71 commented 11 years ago

Have you tried to fly the mission done in the mission planner. I had a problem as I have described in the prior post. I wonder if the problem is firmweare or was it something else wrong.

claytonc2001 commented 11 years ago

No not tried any missions yet. Only just now got it to fly. Been keeping it low because if I accidentally cause the motor killing bug I don't want to break anything. Also, I'm still waiting for some connectors so I can connect my Bluetooth module. Then I can save logs, run missions etc. well balanced props didn't do any good for me. Still will drop out of the sky with a burst of throttle.

I've not heard of anyone else having just one motor stop working. Could you possibly have an ESC going bad?

Zillah88 commented 11 years ago

Lol, thought I was golden now that I had vibration dampening on the FC. Flying high & giving it a bit of stick, then back to a steady hover, one motor stops. End of story.

claytonc2001 commented 11 years ago

I guess you are not alone sosko71. Maybe its related to the same problem as all 4 motors stopping. Great.... Now I have to worry about that.. I wish I could have gotten Paku's mod version to work until this is fixed....

SirAlex commented 11 years ago

Latest info:

Looks like this bug related to magnetic field. All who moved compass far from wires - solved this problem. I'm don't know how, but very big magnetic interference from motors(wires) causes board hang. Currently I'm trying to reproduce this, but fail. Some guys uses magnet and board hang when he move it over compass...

So current solution: Do all to decrease magnetic interference. Move board as high as possible or use external compass.