Naze32 hardware discussion thread

ReadError
Posts: 70
Joined: Sun Sep 09, 2012 11:08 pm

Re: Naze32 hardware discussion thread

Post by ReadError »

AnthonysQuad wrote:Ya i know its soupposed to be a 5 volt power supply but the buzzer says 3-16 volts so im just checking if its goibg to pull mpre then 5 volts or if it will only give out 5 volts.i was heating some heatshirk tubeing on a 5 volt and i guess the buzzer iwas workig on got melted so this is what radio shack has.Is this new buzzer i got safe?


Hey, Protip: Why don't you fly the damn quad and quit messing around with LED/buzzer/net trash.

nicog
Posts: 88
Joined: Tue Aug 21, 2012 2:21 pm

Re: Naze32 hardware discussion thread

Post by nicog »

i would not recommend you to use that buzzer as a led strip. It will flush 220 volts on your board and probably make popcorn out of the gyros.

Also, the magnetic field of the buzzer will probably interact with the superconductive matter inside the magnetron making the quad unstable and producing voltage.


So be aware.

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

Whys it so hard to get a yes or no to my question.Will a 3-16 v buzzer fry my board?

nicog
Posts: 88
Joined: Tue Aug 21, 2012 2:21 pm

Re: Naze32 hardware discussion thread

Post by nicog »

yes

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Naze32 hardware discussion thread

Post by jingej »

roflmao

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

Can i add a resistor or something so it wont?

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Naze32 hardware discussion thread

Post by jingej »

sorry, but i think you should buy a ready-to-fly system.... like... AR-Drone. A naze32 or similar is nothing for you.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Naze32 hardware discussion thread

Post by timecop »

What he bought WAS ready to fly, until he connected 2kg of LEDs on each arm

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Naze32 hardware discussion thread

Post by jingej »

ah ok

nicog
Posts: 88
Joined: Tue Aug 21, 2012 2:21 pm

Re: Naze32 hardware discussion thread

Post by nicog »

you can add a multiplexor, combined in parallel with a wifi router. That will give the buzzer another chance. Only problem is the cable connecting the router, but maybe you could use a tesla coil to power it.

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Naze32 hardware discussion thread

Post by jingej »

could be a bit too heavy, but he could dismount some of the LEDs

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

I cant beleive this buzzer wont work i got it all hooked up.My escs were lost so.i reorded some and hobbykings singapore post tracking said returned to sender so its been around 70 days waiting for esc and a amtel processor show to show up so i can flash my escs with simon k firmware useing my usbasp v2 10 pin cord.

I really cant do anything till i get my escs in.So today i finally decided to get things going with the wireing which has been alot of fun.Are you guys realy serious that 3-16 v buzzer wont work? I got it all perfect.The other buzzer with the pcb board is for connecting to receiver so i can hit a swicth on the 9 xr receiver and have is turn on the buzzer so if i lose my quad i can try to hear it.
Image

I think scracth building is fun so heres the wireing i did.I still have to make a main power cord for all the escs.and leds.On a side note i was thinking about someones comment on leds and they said that leds create a lot of rf noise.And reading up on gps they have a sheild that filters rf noise.Its a conductive material like copper.Well my leds use a conductive material.Aluminum so maybe the leds heatsinks are filtering as much noise as the led driver is produceing.Anyway im gona get off that subject but it was.something i was thinking about.
Image
And yes i am playing around with the lights....there fun.I got some good solder joints on them.So for the first time 2 of them are finally hooked up.I get all happy screwing aroubd with the lights.If i have to order a 5 v buzzer its going to suck.

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Naze32 hardware discussion thread

Post by jingej »

YOU??? want to flash the ESCs with simonK??? ummm.. ok.....

ABL
Posts: 72
Joined: Tue Dec 25, 2012 12:12 pm
Location: Lithuania

Re: Naze32 hardware discussion thread

Post by ABL »

Poor Simon...

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

Well maybe i can wire it to the lost model alarm that goes to rx but thats on some sort of pcb already.ill have to look at it tommrow.i already have.it.mounted on quad so mind as well use it for something.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Naze32 hardware discussion thread

Post by felixrising »

It looks like you have to buzzers already in the quad... are they both lost model alarms?

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

No the other ones this.
Image
Image

alu
Posts: 15
Joined: Wed Aug 14, 2013 1:56 pm

Re: Naze32 hardware discussion thread

Post by alu »

@AnthonysQuad
Dude, if you are really not a troll, then go ahead and plug in that goddamn buzzer and stop posting pics of your toenails...

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Naze32 hardware discussion thread

Post by jingej »

still roflmao'ing

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

Sigh.....one guys says dont plug it in.Another guy says plug it in and the maker of the board refers to the manual which states to use a 5 v buzzer.i know you circled that stuff timecop but im confused.will the buzzer pads only put out 5 v.because if it will only.put out a max of 5 v i think i would be ok.Sorry for drama.

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Naze32 hardware discussion thread

Post by cGiesen »

AnthonysQuad wrote:Ya i know its soupposed to be a 5 volt power supply but the buzzer says 3-16 volts so im just checking if its goibg to pull mpre then 5 volts or if it will only give out 5 volts.i was heating some heatshirk tubeing on a 5 volt and i guess the buzzer iwas workig on got melted so this is what radio shack has.Is this new buzzer i got safe?

http://www.electronicstheory.com/

Scott
Posts: 14
Joined: Wed Sep 05, 2012 1:17 am

Re: Naze32 hardware discussion thread

Post by Scott »

AnthonysQuad wrote:Sigh.....one guys says dont plug it in.Another guy says plug it in and the maker of the board refers to the manual which states to use a 5 v buzzer.i know you circled that stuff timecop but im confused.will the buzzer pads only put out 5 v.because if it will only.put out a max of 5 v i think i would be ok.Sorry for drama.


From the manual:
NOTE
This hardware is provided as-is and end-user is expected to have reasonable
technical knowledge to complete set‑up and reasonable R/C experience to operate
multi‑rotor aircraft.


The reason people are dumping on you is because you are asking a VERY basic, fundamental question that you should be able to figure out on your own.

With all due respect, maybe you should consider shelving that thing until you develop the technical knowledge you need to keep from hurting yourself or others.

cyberpilot360
Posts: 8
Joined: Mon Jul 01, 2013 2:54 pm

Re: Naze32 hardware discussion thread

Post by cyberpilot360 »

Pretty well said Scott, though it was quite mean to have people replying to him that way, and from the moment he has cutted out his own frame out of carbon he probably has some experience.

rnelias
Posts: 10
Joined: Sun Nov 03, 2013 11:12 pm

Re: Naze32 hardware discussion thread

Post by rnelias »

I'm not sure if it's the best place to ask my question but I've noted a weird behavior when checked the motors with my Acro Naze32. As you can see in the movie, when I return the sticks to the neutral position, the motors get unbalanced load.

http://www.youtube.com/watch?v=jfLu-mbGKuI

The TX is the same that I use on my Phantom and has been working fine. This TBS Discovery is new and I'm still struggling to make it fly (on my first try the yaw and pitch channels were swapped... :()

Any idea about why these motors are getting unbalanced?!

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Naze32 hardware discussion thread

Post by felixrising »

@rnelias they're not unbalanced, the fact is the quad is not in the air and the gyro/acc will be slightly offset from zero hence the quad it *trying* to correct this non-zero offset by spinning up motors unevenly.. Hence they will never ever have the same motor values, even when in the air unless you have a totally *perfectly* balanced quad, which is practically impossible to achieve. Nothing to see here, move along.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Naze32 hardware discussion thread

Post by timecop »

Nice 360p video.
Did you read the part in the manual/wiki about midrc and subtrim until your inputs are all centered at midrc value?
99% of times "unbalanced" motors are because you have some input telling them to be so.

rnelias
Posts: 10
Joined: Sun Nov 03, 2013 11:12 pm

Re: Naze32 hardware discussion thread

Post by rnelias »

timecop wrote:Nice 360p video.
Did you read the part in the manual/wiki about midrc and subtrim until your inputs are all centered at midrc value?
99% of times "unbalanced" motors are because you have some input telling them to be so.


sorry for the movie... I was showing the problem to a friend on whatsApp/iphone when I recorded... (but you understood what I was asking...)

In fact, I've read the part you mentioned, however, at least on my TX (Taranis), it's almost impossible to keep the channels 100% on 1500 for neutral position all the time. I can trim them but just a small tap on the sticks and they will move around a "dead band" of +/- 3 travel units. Thus, I'm assuming that 1497 ~ 1503 is an acceptable range.

felixrising wrote:@rnelias they're not unbalanced, the fact is the quad is not in the air and the gyro/acc will be slightly offset from zero hence the quad it *trying* to correct this non-zero offset by spinning up motors unevenly.. Hence they will never ever have the same motor values, even when in the air unless you have a totally *perfectly* balanced quad, which is practically impossible to achieve. Nothing to see here, move along.


Thanks felixrising! I'll do some more tests to see if I can fly this bird as it is... ;)
Last edited by rnelias on Mon Nov 04, 2013 10:35 am, edited 1 time in total.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Naze32 hardware discussion thread

Post by timecop »

Yes, that's fine.
If it was worse than that you could adjust 'deadband' in CLI to something like 10.
Anyway, as the other post says nothing to wrry about put some props on and fly.

bmallory
Posts: 6
Joined: Tue Oct 08, 2013 6:19 pm

Re: Naze32 hardware discussion thread

Post by bmallory »

I'm not sure either if it's the best place to as this (if not, please tell me where I can ask) : can someone confirm that the angular speed is set by the "Roll/pitch Rate" setting in the multiwiigui ? I changed it from 0.1 to 0.4 and did not see much difference... What's a typical range here ? I don't know how much I can crank it up before seeing some serious shit.

Btw, it's my first time with a naze32 and I'm loving it ! I'm allready thinking about replacing the board from my other quad with one of those pink acro boards.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Naze32 hardware discussion thread

Post by timecop »

roll/pitch rate will increase the rotation speed once your stick is further off-center. Essentially, faster and faster flips. 0.4 is not so bad, but 0.8 or closer to 1 will see warthox-style 20+ loops/second.

bmallory
Posts: 6
Joined: Tue Oct 08, 2013 6:19 pm

Re: Naze32 hardware discussion thread

Post by bmallory »

Thanks for the input ! I'll play some more with this setting then...
I just came home from my flying field with crazy 65km/h wind : I love this board !

hadriez
Posts: 4
Joined: Tue Sep 25, 2012 12:16 pm

Re: Naze32 hardware discussion thread

Post by hadriez »

bmallory,
I actually feel 0.45 rates for roll/pitch are already damn fast. but I set my rc rates to 1.55 with 65% expo. ignore my throttle curves. i just like it like that
Image

on my 400mm size quad (m2m diagnonal) with mt2216 1100kv, this is the results i'm getting

http://www.youtube.com/watch?v=PFPhdf61DUg

bmallory
Posts: 6
Joined: Tue Oct 08, 2013 6:19 pm

Re: Naze32 hardware discussion thread

Post by bmallory »

Actually after a bit more tinkering, I noticed that my endpoints were not properly set on my radio ( I did the midrc trick as i use futaba gear but the endpoints were not good, I had to set them at 120% on each side).
Add to this the fact that I added a lot of expo and I guess most of the rate I added were located to the extra 20% endpoints my radio could not reach.
I changed the setting but did not flight test it.

Thanks again for helping me!

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

Well i have some good and some bad news.I got my power distrabution cable made.bought some foam and made a battery harness.Everything wireing up nicely.Got my pins soldered onto the naze.But wait whats that wire on the side of my battery.i better make sure it reaches up to the flight controller before i fine tune yhe battery harness.And thats how i fryed my board.I never did know what that wire was on the side of my lipo.I now know its a balance charger and doesnt have to reach the flight cpntroller.I was rewireing things so much i forgpt that i was working with a live wire.Kind of a stupid move as im pretty sure the board is just powered by escs.Isnt it?I was going to ask what that wire was on the side of lipo but put it off.So timecop can you sell me another board or are you just sick of me being in here?Anyways the battery harness i made works real well and battery is tight.i just tired some nylon tight on some foam and covered the knot with heatshrink.toched balance wire to motor pins.no blue usb light anymore.Smelled kinda smokey.
Image

User avatar
aBUGSworstnightmare
Posts: 115
Joined: Mon Jun 27, 2011 8:31 pm
Location: Munich, Germany

Re: Naze32 hardware discussion thread

Post by aBUGSworstnightmare »

Hi,

looks like you have a rOsewhite Rachel Frame! So, why don't you simply use a battery strap like everybody does?

Image

Image

And: I'm shure you will have the chance to buy an new one! Yours is simply 'abused' :lol:
Shop link to acro Naze32
http://abusemark.com/store/index.php?ma ... ucts_id=38

Naze32
http://abusemark.com/store/index.php?ma ... ucts_id=30

Note: pictures courtesy of rOsewhite
timecop also has a power distribution board: http://abusemark.com/store/index.php?ma ... ucts_id=41

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Naze32 hardware discussion thread

Post by felixrising »

Please be careful Anthony. You can cause a short circuit and end up with a li-poly fire and burn your house down. You really should find someone to help you and explain things, because experimentally plugging things in anywhere is a recipe for disaster. Please, for the love of god, go to your local RC club and get someone to help you with this stuff, or find someone local to you that is willing to help you out a bit.

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Naze32 hardware discussion thread

Post by jingej »

this is just...... ummm.... *missing words* :O

strepto
Posts: 52
Joined: Sun Aug 11, 2013 6:22 am

Re: Naze32 hardware discussion thread

Post by strepto »

jingej wrote:this is just...... ummm.... *missing words* :O


Yeah. I know. I was feeling kinda bad over the fun everyone was poking earlier but now I suspect we are just in the presence of a master troll. Because nobody could be *that* silly, right?

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

Well your velcro strap looks a little wider then the one i was shipped and i felt the battery was slippery up against the carbon frame.I guess you could put velcro on the battery and the frame to keep it more secure but the way i have it now it doesnt move at all.i seen you useing zip ties to hold your esc wires in place i found black nylon thread is a little bit lighter.Not that it saves much weight but iit is lighter so i thought id mention it.As for a flight controller i think im going to go with ardue pilot because i like the waypoint option and i currently dont understand how to code the waypoints into the code.Its open sourve too so thats a plus.i really just started researching it and it seems to have alot of links for info but im not sure if thats my best choice for waypoints and easy gui.maybe someone has a suggestion they can pm me i know timecop doesnt like these posts since they are off topic.iys really waypoints drawing me away from getting anothet naze plus thete is alot more info provided.i really liked the white pcb naze it looked really clean and compact but its more of a advanced board.and their is little patience for someone new to the hobby with this board.i did have most of my questions answered but theier are distasteful members following this thread.I thought id be able to handel the challenge and to tell you the truth i think i could have got the board setup.it was just tired rearranging wires and made a very stupid mistake.i guess i learned my lesson about setting things up and thats to check and recheck that no wires are going to bump and cause a short.And well realize the battery is your test of ypur last check.bah trying to explain things but i guess im just tired.So i hope ypu guys make some bice guys make some breakthroughs in code somehow.oh wait i guess i could ask this.naze has that 32 stu processor or whatever it is what about arduue pilot does that work about the same?i dont know maybe i shpuld just read about it but thats probally the board im gona get i just dont have the time to research all the boards out there.Maybeill get another naze someday to mess aroubd with..Its been ......intresting i guess i did learn some thongs here.

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

Oh if anyone needs my old board for parts or some green led strip or blue led strip or some xt60 connectors just pay for shipping and ill send them to you free im in the midwest U.S.A.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Naze32 hardware discussion thread

Post by timecop »

AnthonysQuad, do everyone a favor and move over to www.dji.com forums

chatch15117
Posts: 2
Joined: Wed Jan 23, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by chatch15117 »

Well your and strap i the wider against then battery shipped one was i velcro the felt a frame was the up slippery little carbon looks. I guess the i it keep and at battery way the frame have it to more secure but put doesnt could velcro it now on the move you all. seen zip you bit nylon ties esc useing thread to hold in place wires found a i your lighter black little i is. Not but it saves much it thought weight lighter is so id i that mention
iit. As for controller flight a i think into go understand i with ardue pilot because i to the waypoint code the going currently dont the how to code like option waypoints im and. thats sourve plus too so Its open a. if it i started alot just best really seems to have im of links for researching but info not easy thats for my and choice it waypoints and sure gui. has someone i they suggestion know can since pm maybe these off doesnt like they
posts timecop me are a topic. waypoints more iys alot me away drawing naze from getting plus thete is info really provided anothet. more really a but liked advanced naze it and really pcb the compact looked its white of i clean board. and their is little with for to someone new hobby board the this patience. i did distasteful most following my of members theier this are answered have but questions thread. I thought id challenge able think have
truth could and i to you the setup the tell got be to the i board handel. was it stupid tired just and mistake made a very wires rearranging. and up i guess my lesson about are no setting and and to check thats a cause things bump short going to recheck i wires that learned. battery well check the realize is your test last And of ypur. bah trying tired explain just but things guess im i to. breakthroughs guys hope ypu code make some in guys
make some So bice i somehow. i this i guess ask could wait oh. naze the all 32 about work research the time about to whatever read pilot about maybe processor there has same?i dont know it i shpuld just have get that im thats probally the board it out stu i just dont arduue the but or what that is boards gona does. with get another naze someday Maybeill mess aroubd to.. been Its...... intresting i some i guess learn here did thongs..

AnthonysQuad
Posts: 54
Joined: Thu Apr 11, 2013 7:37 am

Re: Naze32 hardware discussion thread

Post by AnthonysQuad »

Im not intrested in dji simply because there is no.error reporting and its not open source.I think ive made some good choices so far in my setup and im happy with most things except my receiver.Should have gone with dragonlink and maybe some lower kv motors for longer flight times but i guess its a start.Ill eventually get things down....just a matter of time.Good luck..Happy flying...


Zoooooom.

mifau
Posts: 13
Joined: Sat Nov 24, 2012 7:46 pm

Re: Naze32 hardware discussion thread

Post by mifau »

Hi,

Do you know who is the author of getEstimatedAltitude() code?

It looks like there is a trial of making integration, but IMO it doesn't work at all.
Acceleration is in accSum[Z], and then there is an integration:

Code: Select all

vel_acc = (float)accSum[2] * accVelScale * (float)accTimeSum / (float)accSumCount;


But in fact….when you make a test, you can easily see that e.g. moving copter up, velocity will rise (as it should be), and then when you stop moving it…. velocity will decrease below zero (which is wrong - is should stop and never go below zero - as you're not moving copter in other direction)
This is a direct reason that second integration…

Code: Select all

accAlt += (vel_acc * 0.5f) * dt  + vel * dt;
.
.
vel += vel_acc;

..doesn't make any sense.

It behaves like an averaging of accel_ned.V.Z rather than integration.

Effect can be easily seen while setting:
baro_cf_alt = 1.0
and
baro_cf_vel = 1.0
Look at the baro graph….
When you move copter up, or down it should move and stay there. Instead of that graph is always going to "zero" value.

My copter behaves way better in althold when I set baro_cf_alt to 0.
Otherwise (if acc has higher weight) copter is falling off the sky (sometimes slowny, sometimes quite fast).

After implementing LPF on EstAlt….

Code: Select all

#define ALT_FILTER 0.92
    if (EstAlt_filtered==0.0f) EstAlt_filtered = accAlt;
    EstAlt_filtered = EstAlt_filtered*ALT_FILTER + (float)EstAlt * (1.0f-ALT_FILTER);
    EstAlt = EstAlt_filtered;

…and setting baro_cf_vel to "zero"…I can get like 15cm althold precision without any problem.
(P=80, I=0, D=70)

So I think….. if acc_z integration is better, we will possibly have some spectacular effects.
At the moment it looks like the idea is great, but code is not written too good, or not tested.
Or maybe I'm missing or don't understand something?

EDIT:
Or….. maybe the reason is the fact that ACC_Z itself…. too much filtering or something ?
Looks like inreasing value is way faster than returning back to "zero". Then it could be possible that integrator don't want to work at all, because acceleration is not as same as slowing down.

Sorry for all these questions, but I don't know that code too much.
btw. is it a right thread to write about baro software in? Perhaps not :(

crazyal
Posts: 84
Joined: Tue Sep 04, 2012 11:25 pm

Re: Naze32 hardware discussion thread

Post by crazyal »

I'm the curlpit who wrote this code ;)
I understand that the code isn't easy to see trough, but from what I can tell it is working fine with some small errors which probably could be overcome by doing the integration every measurement and not in the altitude loop. You are probably right about too much filtering. That is an influence aswell. I'll probably get to try it on the weekend.
I attached a small in Hand test with
acc_hardware=2
acc_unarmedcal=0
baro_noise_lpf = 0.800
baro_cf_vel = 0.985
baro_cf_alt = 0.970
debug0 is the acceleration and debug 1 the velocity.
btw if you want to test without acc integration why not just set acc_cf_alt=0 acc_cf_vel=0 and use baro_noise_lpf for filtering.. it does exactly the same as the code you posted ;)
just to clarify how the integration works look at this http://hyperphysics.phy-astr.gsu.edu/hbase/acons.html
where as a is the measured acceleration, v(0) the last derived velocity and x(0) the last distance/height

if you want to discuss stuff further and in realtime :) join us on the #multiwii irc channel on freenode.
Attachments
acc_integration.PNG

mifau
Posts: 13
Joined: Sat Nov 24, 2012 7:46 pm

Re: Naze32 hardware discussion thread

Post by mifau »

Tnx for your answer! :D

Yes, I know how integration works (of course) and I think I understand the part responsible for altitude measurement (in fact it's quite simple - and that's good!).
But….My readings are way different than yours (yours looks just perfect!). I don't have any charts/graphs, but I'll try to make it….
In my case velocity behaves almost as same as acceleration. At the begining it rises, and then it falling almost the same value below zero as it way over it.
In your case it's not going below zero and just (a little bit, but it doesn't matter)- which is obvious.

I wonder what could be the reason of that bahavior…. (except baro_cf_alt I have default (commit 251 from github) values.

I did some simulations in excel (;>) and your algorithm just must work ok.

I have:
acc_hardware = 0
cc_unarmedcal = 1
baro_noise_lpf = 0.600
baro_cf_vel = 0.995

btw. could you attach graphs for baro_cf_alt = 0.0 and with debug[2] = altitude?

Tnx in advance!
I don't want to bother you, but I realy have no idea what's wrong in my case here.

mifau
Posts: 13
Joined: Sat Nov 24, 2012 7:46 pm

Re: Naze32 hardware discussion thread

Post by mifau »

Ok…I have some graph (sorry for resolution - it's a screenshot from multiwiiconf):

Parameters:
baro_cf_alt = 1.0;
baro_cf_vel = 1.0;
accz_deadband = 4;

As you can see, velocity behaves like acc z.
Which shouldn't be like this, because I'm moving in one direction only. I'm not changing direction so velocity shouldn't be negative.

So maybe, together with baro it may look ok, but without baro, it can be seen that something is wrong here.
Ok…maybe without baro values cannot be proper, but at least it should behave right.

Something is wrong here IMHO….
I'm NOT saying you have to fix it or something (great work btw!). I'm on it, and I'm looking for a solution and what is wrong with my setup here…..
Attachments
integral.png
(10.28 KiB) Not downloaded yet

mifau
Posts: 13
Joined: Sat Nov 24, 2012 7:46 pm

Re: Naze32 hardware discussion thread

Post by mifau »

WTF? :lol:
if (cfg.acc_unarmedcal == 1) {
if (!f.ARMED) {
accZoffset -= accZoffset / 64;
accZoffset += accel_ned.V.Z;
}
accel_ned.V.Z -= accZoffset / 64; // compensate for gravitation on z-axis
} else
accel_ned.V.Z -= acc_1G;



So…for everybody who wants to have AltHold working….
Please set acc_unarmedcal to ZERO :lol:

(TC: shouldn't it be set to zero by default in that case? now, default is 1 - it could solve some people problems ;) )


Sorry then for my spam. Problem solved.
Thank you crazyal! :)

crazyal
Posts: 84
Joined: Tue Sep 04, 2012 11:25 pm

Re: Naze32 hardware discussion thread

Post by crazyal »

Just to be clear about what acc_unarmedcal does.
As the named says the accZ vector is calibrated/zeroed when the copter is unarmed. I implemented this feature to have a simple compensation for
accz offset errors which can be caused by a change in temperature or a wrong calibration.
basically it only changes the behaviour when you hold it in your hand unarmed, if the copter is armed the results on the graphs should be the same with acc_unarmedcal=0 or 1. So if you start your copter from the ground there should be no difference. On the other hand if you start it from your hands it'll definetly fuck up althold :)

mifau
Posts: 13
Joined: Sat Nov 24, 2012 7:46 pm

Re: Naze32 hardware discussion thread

Post by mifau »

That's it :)

@crazyal:
You have quite high value of acc weight for alt (baro_cf_alt)….
I have notticed that my copter holds the altitude better when i set:

baro_cf_alt = 0.945 (if higher, copter is descending)
baro_noise_lpf = 0.01 (if higher, copter is not holding altitude at all, but overshoots it permanently - it's because of my baro "shielding" perhaps…foam inside the box)
accz_deadband = 5 (if higher, copter is descending and holds altitude worse . Looks like I don't have too much vibrations and that value can be so low)
p_alt = 85 (if lower, descending)
i_alt = 25
d_alt = 35 (60 is too much, as copter is nervous)

So….I assume that descending is directly corelated with battery voltage drop.

E.g. MK has something like this (in order to prevent battery voltage drop influence on motors RPM):

Code: Select all

if(UBat > BattLowVoltageWarning) GasMischanteil = ((unsigned int)GasMischanteil * BattLowVoltageWarning) / UBat; 

Which means, that if voltage is higher than alarm voltage, then we are lowering throttle value in order to sustain RPM's.
(so lowering throttle value, instead of rising it - for battery and copter safety of course)
The higher battery voltage, the stronger correction (lowered throttle) is made.

Yes, I know that i_alt should help here, but the boarder is very thin. Too high value, and copter will be overshooting. Too low, and it won't help.
Besides…. with such a additional motors RPM "extender", we will have same i_alt (and p_alt!) values, for different batteries (or maybe even copters, as weight counts).

EDIT:
And of course, it will help copter to hover while althold is turned off.
No additional parameters needed, simple and it works (I've tested it in another copter).

What do you think?


EDIT: btw. in mw.c, just after:

Code: Select all

if (cfg.throttle_angle_correction && (f.ANGLE_MODE || f.HORIZON_MODE)) {
            rcCommand[THROTTLE] += throttleAngleCorrection;
}

…we can add something like this (not tested!):

Code: Select all

#ifdef BATTERY_CORRECTION
        if (feature(FEATURE_VBAT)){
           if (vbat>batteryWarningVoltage)
              rcCommand[THROTTLE] = (rcCommand[THROTTLE]*batteryWarningVoltage)/vbat;
           rcCommand[THROTTLE] = constrain(rcCommand[THROTTLE], mcfg.minthrottle + 150, mcfg.maxthrottle);
        }
#endif


And that's it :)

Post Reply