naze32 baro hold doesn't work even with foam

Donnut

Member
As soon as the props start spinning the baro graph starts to move down quite a lot. You can see the screenshots.
This is with the foam.
I tried adding electrip tape on the sides to isolate it even further, but it was about the same.

Needless to mention altitude hold doesn't work at all. I'm trying it in angle mode as primary with mag and baro as seconday all at once.

It behaves about the same as just in angle mode.

What else I could try to make this baro work?
20160731_151331.jpg 20160731_151547.jpg 20160731_151414.jpg
 
Last edited:

makattack

Winter is coming
Moderator
Mentor
I've seen vibrations affect the barometer on apm flight controllers, which might be related to software filtering of sensor inputs so it might be different with cf. Wouldn't hurt to check your prop and motor balancing.
 

Donnut

Member
I haven't balanced those props yet, but the baro is affected even when they spin a the ARM level, which is like 1080 throttle. So not much vibration at all.
 

RipAir

Member
my first guess would have been that its simply picking up the under pressure that the props cause in any case
have you compared to what happens when you try the same without props?

technically the only possible solutions i can think of right now are:
- get the baro outside the under pressure (which might be quite complicated to impossible)
- software compensation according to the RPM of the props (which probably varies, depending on the prop pitch too)

for the compensation part we might need some one more experienced, since i dont know if its possible without having to program yourself

just from the physics perspective, its probably impossible fixing an under pressure area with foam or similar
even placing it within a sphere of water would still pick it up, only other option would be blocking it completely

also a possibility would be re purpose the sensor (its not a bug, its a feature ;) )
and use it to analyze if you have any performance drops on the motors
 
Last edited:

Donnut

Member
Well how all those people are using the baro just fine on their 250mm quads?
They seem to just stick foam to it and go to happy flying.


Is it possible I might have a bad baro or something? The board was cheap by the way, $22 for full naze32 from ebay
 

RipAir

Member
always is a possibility, could have even damaged it while soldering

you could give it a test, ie with a plastic bag or similar (be careful with static electricity though)
place the board/quad in it and then try blowing it up (value should rise) like a balloon as well as sucking most of the air out (value should drop)
and see if you can get to to almost stabilize at a certain value

there shouldnt be much more than 5 possible scenarios: over/under sensitive, just right, it doesnt work at all or its bonkers (ie interferences, borked component etc)

my guess would be that most people dont use the baro, or theyve just blocked it off completely without even noticing
 
Last edited:

Donnut

Member
always is a possibility, could have even damaged it while soldering

you could give it a test, ie with a plastic bag or similar (be careful with static electricity though)
place the board/quad in it and then try blowing it up (value should rise) like a balloon as well as sucking most of the air out (value should drop)
and see if you can get to to almost stabilize at a certain value

there shouldnt be much more than 5 possible scenarios: over/under sensitive, just right, it doesnt work at all or its bonkers (ie interferences, borked component etc)

my guess would be that most people dont use the baro, or theyve just blocked it off completely without even noticing

Smart idea, i'll try that.

I come from APM boards and find it difficult to fly without baro. As soon as I pitch forward it drops down A LOT. Not sure if the baro issue is adding to that and I'll be better without baro at all. Gotta try that as well.
 

Donnut

Member
I tried something else first.
Set the first switch position to be just angle mode, and the second angle, baro, mag
So I arm at just angle on the ground, armed, props spinning at 1080throttle, and as soon as I switch to (angle,baro,mag) it starts jumping from the ground by itself. Somehow the changed pressure from the props makes it want to compensate.

Does that mean I have bad baro?
 

Donnut

Member
20160802_193906.jpg
Easier said than done on 250mm quad :)
I'm considering the cover the whole naze32 with foam now and even let it stick on the side so it kinda wraps it like a shell. Do you think that will help?
Right now I have a piece just on the baro.

20160802_193923.jpg
 

LitterBug

Techno Nut
Moderator
Not sure.... I have not successfully used a baro on my small builds either. I have used them on two APM builds. (360 & 450). I do have two F3 controllers that I can play with. SPR F3 Evo and a RMRC Dodo. There is an alternate firmware fork iNav that is supposed to provide improved functionality with the Baro, GPS, and Compass. You may also try running that. https://github.com/iNavFlight/inav/wiki

Cheers!
LitterBug
 

makattack

Winter is coming
Moderator
Mentor
I have a mini APM installed on a small tri copter frame (trifecta) and found that what I initially thought was a barometer affected by the prop wash to instead have been a barometer affected by vibrations.

I had various cables/wires laying across the top of the board and when the tricopter was in flight, the prop wash, wind, vibrations, etc all resulted in the wires banging against the APM controller. When I cleaned up the wiring, isolating them from the board so the loose wires themselves don't touch it and were secured so they don't even bang into the frame, all my problems with altitude hold disappeared.

It initially flew fine in stabilzed and acro/manual modes, but as soon as I tested altitude hold, it would go up and down dramatically. Only way to save it was to quickly switch back to stabilized or manual flight modes. It also got increasingly worse the longer I kept it in althold, which led me to believe there was a bad feedback loop. My next choices were to consider changing the althold tune or look for a hardware issue. Thankfully, I decided to debug the hardware first.
 
Last edited:

Habakkukk

Fly Eagles, Fly!
So I'm not near as familiar with the autonomous side of mutirotors as some of the guys on here, and I could have missed something from the op, but you need to tune the pid loop on your baro if you want it to work at all. I've done it on a tbs discovery I built for the pops. Seemed to work ok (not perfect but it helped him learn to fly) but it did require tuning first. There's a couple different tutorials but the general idea is to start with "p" and "I" at 0 and move "d" up until it only "yo-yo's" slowly. Then move "p" until it "bounces". "I" is supposed to just compensate for battery voltage drop so I adjusted it over a couple of packs. This probably isn't the best "how to" but you get the idea.
 

Donnut

Member
So I'm not near as familiar with the autonomous side of mutirotors as some of the guys on here, and I could have missed something from the op, but you need to tune the pid loop on your baro if you want it to work at all. I've done it on a tbs discovery I built for the pops. Seemed to work ok (not perfect but it helped him learn to fly) but it did require tuning first. There's a couple different tutorials but the general idea is to start with "p" and "I" at 0 and move "d" up until it only "yo-yo's" slowly. Then move "p" until it "bounces". "I" is supposed to just compensate for battery voltage drop so I adjusted it over a couple of packs. This probably isn't the best "how to" but you get the idea.

Hey, thanks. I had no idea you have to tune baro PID as well. Didn't even know about them, lol.
Now there is hope. I'll be onto that.
 

LitterBug

Techno Nut
Moderator
I threw some foam on my Hellbender Dodo combo last night. I'll give it a go tonight to see what happens.

Cheers!
LitterBug
 

Donnut

Member
So I'm not near as familiar with the autonomous side of mutirotors as some of the guys on here, and I could have missed something from the op, but you need to tune the pid loop on your baro if you want it to work at all. I've done it on a tbs discovery I built for the pops. Seemed to work ok (not perfect but it helped him learn to fly) but it did require tuning first. There's a couple different tutorials but the general idea is to start with "p" and "I" at 0 and move "d" up until it only "yo-yo's" slowly. Then move "p" until it "bounces". "I" is supposed to just compensate for battery voltage drop so I adjusted it over a couple of packs. This probably isn't the best "how to" but you get the idea.

How do you iterate through the different settings faster?
If i have to plug it to the computer for every value change and then fly again it will take me days.
 

makattack

Winter is coming
Moderator
Mentor
How do you iterate through the different settings faster?
If i have to plug it to the computer for every value change and then fly again it will take me days.

I'm not sure that you can tune the PID's on the barometer sensor... I know there's a P constant for althold that can be adjusted, but then on APM, you also adjust the throttle accel and rates to affect althold:

http://ardupilot.org/copter/docs/altholdmode.html#altholdmode

What I do to tune APM is have the 913MHz telemetry radio connected to my Android device (tablet or phone works) with a OTG USB cable/dongle and use the Tower app: https://play.google.com/store/apps/details?id=org.droidplanner.android for setting values.

If you don't have an android device, you can just plug that telemetry radio into a laptop, but that can be bulkier. It's definitely better than using a USB cable, though.

Some people have interfaced the 3DR telemetry radio modems with bluetooth modems to bypass the OTG/USB cables entirely, as well.

Oops... I got this thread confused with your other thread with APM questions. Yah, others have more experience with naze32 based fixed wing / full sensor suit use than I do. I've only used naze32 for multirotors in acro mode.

Nevertheless, you can also get an inexpensive bluetooth modem as discussed in this thread:
http://forum.flitetest.com/showthread.php?17228-Bluetooth-module-with-Naze32

http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=64776

and use a phone (typically Android) running EZGUI to setup your controller.
 
Last edited:

jhitesma

Some guy in the desert
Mentor
I played with baro on my first build with multiwii (which *flight is derived from) and you do indeed need to tune the PID settings for alt hold to get it to work even reasonably well. I used a bluetooth module on the serial port of my FC so I could tune while in the air from my android phone. After a few packs of tuning it was able to hold within about a meter but really wasn't anything I'd ever trust.

cleanflight's code looks like it finally got some adjustments to their altitude hold in April but mostly seems to be aimed at SONAR support. So it's still basically the same code as MW and would need the same tuning.

I did play with alt hold on the Naze32 with both baseflight and cleanflight but since the code was basically the same as MW the results weren't any better even though the Naze32 had a better baro than what I was using on my old MW setup.

I then tried TauLabs and used the same old baro I was using on my MW (Side note - my MW and TL controllers were both homemade which is why I used the same sensor on radically different controllers/firmware) and out of the box with no tuning it did a far better altitude hold with my old less accurate BMP085 baro than I ever got *flight on the Naze32 to do with extensive tuning and a newer more accurate MS5611 sensor.

Really the *flight firmwares don't have very good autonomous code and it's not been a high priority for them to improve them, plus the F1 chip on the Naze32 is getting really limited on memory to do much improvement. IMHO altitude hold and RTH on Naze32 are little more than early proof of concepts and not anything that should be relied on at all.
 

Donnut

Member
Thanks guys, seems like there is a lot I could be trying with this one.

INAVflight seems like interesting option as well. LitterBug, how mature is it? Good for daily use?