Hey there guys, started on naze32, and recently upgraded to a 3dr pixhawk mini. I have no code writing experience, but i can slightly grasp it. Im eager to learn, and have been setting up my new px4 stack on qgc, and got it to all green.
When i first tried arming it was only flashing blue when i had it set to position hold and had 10 sat and 3d lock confirmed on qgc no matter how long i waited it never went to green. Searched everywhere for an answer to no avail, decided to start timkering with the params. Looked for red colored values which i believe indicates a parameter has been changed from default, but some red i did not change myself. I changed some that i felt confident wouldnt ruin anything back to default which were:
EKF2_GPS_DELAY from 200 to 110
COM_ARM_IMU from .070 to .200
MPC_MANTHR_MIN from 0% to 8%
After i made those 3 changes i rebooted and for the probably 30th time pluggin the battery in, very shortly the breathing blue finally went to breathing green, and now when i switch from STAB to POS or HOLD, it doesnt reject the flight mode like before, it actually works now! Then out of nowhere comm lost, comm regained… comm lost… … … comm regained… did this about 5-6 times each comm loss longer than the last, still not touching anything, light goes solid purple, might have made an unfamiliar tone, then went to flashing purple and did that for a while, then comm regained and back to green flashing. What the heck is going on here?
Pixhawk Mini with whatever firmware came from amazon
3dr gps/compass… M8N i believe
Fyi, havent flown it yet, still below zero temps here in Minnesota but i wanna have it rockin and rollin when the weather plays nice.
Sorry so long, thank you for your help if you have any ideas for me as to what i did right or wrong or am missing.
you are in Failsafe mode - did you configure failsafe?
Make sure you use the latest QGC (3.2.7) and FLASH your pixhawk with 1.7.2 - you’ll want the QGC and PX4 versions to be matched at least use QGC to install a stable image. The LED codes you can read about here: https://pixhawk.org/users/status_leds; separately, I just did a search in the Firmware tree and from looking at the code, Purple means the system is overloaded (e.g. Busy) or in Failsafe mode (see here - search for Purple -
https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp). Solid Purple means it is in Failsafe mode which matches your findings. Someone may have better details, but cursory look for me says that’s the cause. Now, when you lose RC or Link you will go into Failsafe mode, when you connect QGC, go into Safety and set your Failsafe (e.g. Return). To simulate this, just turn off your Radio and make it part of pre-flight check-out.
I wouldn’t change the default parameters on EKF, just let it sit for a while and you should get out of the EKF error state. Use the latest firmware, post your flight logs! Hope this helps - PS, I have friends in MN who tell me the Lipos just don’t deal well with -10 below!
Thanks for the response! Exactly what I needed. Still having issues tho. I got the 3.2.7 qgc and then just did the stable px4 within qgc, (although i want to know which file im supposed to use from the github px4 releases after i download newest stable do i want source zip and then extract, but which file do i select from inside qgc for that firmware?) Failsafe all ive done is from the safety tab. Rc loss set to return and also failsafe switch 6 is set to return.
Everything worked like a charm when connected via usb at first. 13 sat easy inside the warmth away from the frigid lipo killing minnesoh-tah tundra! Pix flashing green and changing modes from taranis dont get rejected. Then disconnect from computer, recycle power and only flashing blue now. Wont go to green after 15 minutes w/o usb. Gps module has green light and flashing blue. Plug in usb and goes green almost right away. Since then no matter what I try, it will not go to green anymore. I should have titled this thread Wont go to green, since that was my first known problem.
About changing EKF2 and COM params, the first and only time changing any of them was in order to set them back to default. I dont know how any of them arrived at the custom values they were set to.
Also one other question for now. Is magnetic inclination automatically set, or do I need to stick that in somewhere? When I point the quad straight out my front window, on the map on qgc using google, the heading shows im pointing to the left 45 degrees. The gps is mounted on a short standoff directly atop the Mini both square and true. It wont let me recalibrate the compass in the sensors tab either. I can post the flight log if someone lets me know how to do that or where to learn. Thank you again for your help.
Sounds like a versionitis issue or some problem with the HW config. Do you have a Telemetry radio? If you’re not flying with Telemetry, there is no way to talk to QGC besides USB.
First flash the latest. Disconnect PDB and battery from Drone. Run QGC. Go to firmware menu, plug in drone, let it flash with the latest. Next go into your config and check all is well. Note that it will reflash and reboot and then reconnect. Check your firmware version (use 1.7.3 stable now). You can save the AWS download link for future reference.
Make sure you have a clean SD-Card installed; I have seen Filesystem errors cause flashing purple and all sorts of malfeasance.
For your no Green GPS lock, let it sit a while and make sure you have a clear view of sky.
Let me know what you find - I saw some issues like this in the past, but have flown a 1200 and a 500 class (Hex and Quad) last weekend and they performed perfectly. I will say that 1.73 does fix some issues with EKF that Lorenz found - please try it. Have you posted a log yet? That may be the next thing to do, just follow the log upload and send a link - could be something else going south. Oh yes, you can also use (in new QGC) the mavlink console and issue “commander status” to see what is happening.
Alright, running 1.7.3. So I thought I narrowed it down to a bad solder joint on my main 3DR pdb and repaired it with a new working (finally) soldering iron. Thought that since it was sometimes getting the green flashing on USB power but not battery it was my soldering. Im getting the correct voltages out of my gps/i2c port, actually the only difference is on lipo power, the 5v pin reads 5.1vdc and on USB power, it is getting 4.9 on the same pin. Should that make a difference? No way.
I just now also have the 3DR 915 V2 telem hooked up and working no problems. Wont get a 3D GPS lock unless I plug in USB. Even then bouncing around 10-15 sat consistantly, (crappy weather so no clear view of sky, but telem telling me I have GPS lock sitting next to window) the dumb thing wont ever flash green, spent a fresh 2200mah 3s just testing letting it sit… Then one startup it said no mag connected, then reboot and worked fine. Or it will say high imu bias, seems like something different each time almost…
Its gotta be some params to change or something internal. The wiring should be golden. I mean it did work fine at first.
Could you dumb this part down for me a little please? Sorry, but it seemed like that last sentence wasnt even in english haha! I feel far behind.
Did you calibrate outside? if you’re inside Calibrating, it could cause Mag issues. My last statement was to get the latest QGroundControl (QGC) and install it with your 1.7.3 firmware. There is a menu option under settings or configuration which will let you get a MAVLINK console. When you do that, you can talk to the Pixhawk directly and type the command “commander status”. Finally, did you setup Failsafe mode under the configuration menu?
Where is your GPS antenna mounted? Is it on a mount above the motors?
My quadcopter has not been outside yet let alone props put on since Ive had the pixhawk installed due to the weather. We did have 2 semi-nice days but I was too busy. It was working just fine right after first configuration with whatever firmware came stock (no idea). Problems came later such as not going into gps flight modes when i have 15 satellites and a 3D lock.
Got it. Thanks for helping me find the mavlink console. What are specific things I should be looking for?
Failsafes, RTL has been set for all of them under the “Safety” tab in QGroundControl.
GPS is mounted about an inch above the plane of the props in the dead center of the X frame. Its mounted on a 3/4" standoff on top of the Pixhawk Mini. (I maybe should mount it higher, but still fits in the case this way for now.) All wiring onboard has been twisted to help with interference and telem antenna pointing down under frame, vtx antenna pointing down to rear.
Also tried uploading my .ulg flight logs on PX4 Flight Review, but 24 out of my 26 files give me an Error 400 incorrect file upon uploading. Only 2 I could view the analysis, neither of any help. Why would it be doing that?
Calibration! Always calibrate outdoors and near where you plan to fly. Magnetic declination changes a lot by the area, and especially near a lot of iron. So do go outside and calibrart everything.
Related, this sounds like SD-Card issues!. I have seen purple flashing light if the filesystem is corrupted. So plase take out your SD-Card, format it as a DOS format. Now, put it back in.
You should be able to pull the SD-Card out after a round of testing and upload the .ulg files directly and we can take a look.
Have a look at the post I just made on my big bird with Mag failure today - that sucked. But my little F500 is working fine with the same setup, even had it do a couple missions today!!
So it was nice enough today, I went out and flew a battery. Freshly formatted SD card, and did all fresh calibrating in a wide open parking lot 20 feet away from my car. Gyro was slow to take, and I think QGC said motion detected, and retrying. eventually went green, but after sitting a long time. Then I waited and waited and waited, but no flashing green. Telem telling me 0 Sat. still. Anxious to fly, I just took off and flew around the open park/field for a bit stayed under 100 feet whole pretty sure, thinking from up there certainly I’ll get a satellite or 2. NOPE. Landed, let it sit for a while longer, and just decided to finish the battery. Unplugged the battery plugged it back in first. Never had 1 satellite, let alone a 3d lock as wouldve been confirmed by flashing light on gps.
This is the link to logs of first flight: https://review.px4.io/plot_app?log=69bc1cfa-4c18-4874-99e6-d01c118c5453
Heres the link to the second flight after recycling power: https://review.px4.io/plot_app?log=1adfb723-74ce-40c6-a185-8ba2544ce87c
Saw some goofy things in those, but I’ll let you tell me whats goofy about it since Im a noob. Just dont understand why its not working. Starting to drive me nuts. Do I have a faulty unit?
That wobble to the ground of yours looked very scary!
Wow, the log at the end says everything - your sensors are not setup correctly or they are not working correctly. Your second log shows EKF2 high bias which implies your calibration is not correct. I am assuming you went through the calibration steps and all checked out good. You should be able to test everything and get GPS lock before you fly - that is not happening as you mentioned so you can only fly in manual mode. Once you get your IMU calibrated, use the Mavlink console shell to issue the command “commander status” … send me an email with your phone number and I will walk you through it and we can run teamviewer on your ground-station to check out what is happening. I already did some flying today, but will fly again tomorrow - I am in PST time zone.
Went out and flew again today determined to get it to work. This was before your last message, JFD. So Right away it told me high imu bias, so I just went into the params, and started restoring things back to default, re-calibrated, and BAM, GPS lock. Green Light flashing! Switched to position mode and it took, so I took off and was happily surprised. Wasnt holding the spot the greatest, but was definitely doing what its supposed to. flew around a bit, and seemed to work ok aside from sometimes it behaved like angry overcompensating or heavy braking? Second flight was just up to 400 feet and slow yaw in a circle for a video. (runcam split 2)
Log for first flight with GPS (although unsure how I got it to work): https://review.px4.io/plot_app?log=7f6ab984-4648-40e3-a675-3f8b6d55ecf9
Log for flight to 400ft next battery same day:
I’m looking forward to hearing from you.
Right on! Calibration is everything. It also helps to let the system boot and run for a while so that all of your systems are going before you calibrate. Make sure you calibrate at your launch site. The Magnetic fields are best understood here - https://www.ngdc.noaa.gov/geomag/WMM/data/WMM2015/WMM2015_D_MERC.pdf and you can look-up here - it won’t matter much if you stay in the area, but if you go from San Jose to the Blackrock Desert, you’ll be way off. You can check your area here - http://www.magnetic-declination.com/
Gonna fly some more later - call me!