PDA

View Full Version : 400Q Specific Baseflight firmware for Naze32



chatch
23rd May 2013, 01:22 AM
I will post specific Baseflight.hex for normal and 3D operation when the frame is used with CHATCH motors - MT2216 1100kv. This is for Naze32 controller board offered by Abusemark.

The flat arm frame has a very fast oscillation at full throttle that stems from a huge amount of power difference between hover and full throttle. One single PID setting is not enough to control both "normal" flight and full throttle climbs.

You can tune it out but it is either very hard or results in too watered down PID for "normal flight"

3D operation: TPA applies on top 10% and bottom 10% of throttle curve. You can set TPA in both multiwii GUI or CLI

Standard operation: TPA applies on top X percent of throttle curve, as specified by TPABREAKPOINT.

This allows locked in performance over the entire throttle curve without side effects. I'll be testing it more and posting the files in a few days.

chatch
23rd May 2013, 01:48 AM
Normal operation:

In CLI:
dynThrPID: TPA setting from multiwii GUI
TPABREAKPOINT: percent at which TPA engages. for example, if it is 90, TPA engages at 90% throttle.

http://REALfpv.com/%5Cdropbox%5Cmisc%5Cbaseflight%20r288-tpabreakpoint.rar

http://i.imgur.com/k3tlLoo.jpg

wooden
23rd May 2013, 06:17 PM
I'd like to see your code and try to implement something similar in AeroQuad. Haven't fully tuned my setup yet (waiting on 4S batts and lower kV motors) but even with 3S I've noticed full throttle results in some oscillations I just can't get rid of.

Do you use separate PIDs for it or just dumb down the PIDs with some scaling factor?

chatch
23rd May 2013, 07:42 PM
it's just a linear proportion, but i could put in expo if it's needed.

spiked3
12th June 2013, 06:30 PM
k, special firmware request. I've been trying for hours to get my bluetooth to not send crap at startup. No success, I assume this is putting the Naze into bootloader mode.

I also spent some time trying to compile myself, and I havent given up, but as usual nothing matches the rare documentation. It probably will take another week or two to get it to compile (I love open source).

Any chance you could change 1 line for me?

in serial.c, line 642, make it look for something rare, like maybe a ^ instead of an R please?

any other suggestions, as to how to make the bluetooth adapter not spew garbage, or how to setup a compile environment welcome.

Finding any documentation is luck. So I found some that may be remotely similar, sigh, but I'm afraid my rs-232 hardware collection was disposed of years ago. So far unsuccessful trying to wire it up, to try AT commands that may or may not work.

scotth72
13th June 2013, 10:04 AM
Here is an older page about compiling arm stuff. Might help you.
http://www.rcgroups.com/forums/showpost.php?p=20972303&postcount=740

spiked3
13th June 2013, 07:54 PM
Here is an older page ....[/url]

Oh yeah, been through a couple of those, including that one. While helpful, they are put together at a point in time and never maintained. So for example if you started today, with for example a windows 8 machine, you wouldn't get far (code sourcery will not even try to run on windows 8).

So I started putting together a ubuntu/linux virtual machine, but the directions are for windows. I will probably give up on that soon, and move to a windows 7 laptop. In the meantime, someone who already has it setup could change a line of code, hit compile and be done. But I do suspect there are only 2 maybe 3 people in the world with the tool chain setup ready to go.

Even better would be if I could understand how to modify the radio (bluetooth). My first attempt at hooking it up via a usb to serial cable failed. Not sure if it was the rs-232 jumpering as I do not have an unused female plug. But even then I have never identified any definitive manual on the rc timer bluetooth and what AT commands it accepts, to turn off the chatter at startup, or if it is even possible.

Plus there are a few UI things I would like to tweak in the firmware. For example when you do a calibration after initialization, there is no indication, that I have seen, that it happened. A simple beep beep might be nice. My quad wihout legs, is usually plugged in cockeyed (plug on the bottom) and I have to calibrate before take off. My only indication it worked is if it crashes or not. So I will pursue getting the firmware compile to work, but I bet it will be a while.

chatch
14th June 2013, 01:31 AM
Put win7 or XP in VMware

RandallJ
27th June 2013, 03:34 PM
So besides resetting my "mode" switches and throttle cutoff, I just replace my current baseflight hex file with this one?

chatch
27th June 2013, 03:51 PM
yep that's all you do. I'm waiting for things to settle down with the new PID algos on mw forums before doing any more to the code. http://www.multiwii.com/forum/viewtopic.php?f=8&t=3671

RandallJ
27th June 2013, 03:55 PM
Thanks.. I was just setting up a new NAZE board ($25 one) in prep for your quad..

scotth72
27th June 2013, 07:40 PM
yep that's all you do. I'm waiting for things to settle down with the new PID algos on mw forums before doing any more to the code. http://www.multiwii.com/forum/viewtopic.php?f=8&t=3671

Interesting read.

carsonco
1st July 2013, 03:06 PM
My 400q and catch motors came in today, ive got a Naze acro board for it. Anyone have some PID's to start with?

Thanks

Steezus
1st July 2013, 08:19 PM
I've done a lot of experimenting with mine and so far I like Hadriez's setup the most. Leave them all default and just change these 3 settings in CLI, then add however much expo you are comfortable with.

set looptime = 3000
set acc_lpf_factor = 100
set retarded_arm = 1

I run the 2212 motors, so my quad may handle a bit differently, but I think Hadriez runs the 2216's.

scotth72
1st July 2013, 09:18 PM
You do know retarded arm=1 enables arm/disarm on roll, correct? If you bring the throttle all the way down in the middle of a full stick roll, your quad motors quit.
As far as I know, the acc lpf is not used in rate mode. This might have changed recently.

Steezus
2nd July 2013, 01:07 AM
You do know retarded arm=1 enables arm/disarm on roll, correct? If you bring the throttle all the way down in the middle of a full stick roll, your quad motors quit.
As far as I know, the acc lpf is not used in rate mode. This might have changed recently.

Had no idea. I couldn't find info on that or the acc_lpf_factor. Looptime just seems to smooth out the quad at the expense of ultra quick response? I'll definitely set retarded_arm back to 0. Is that like a troll setting timecop built in?

whakahere
2nd July 2013, 07:41 AM
Are you guys having different pid values for pitch and roll?

scotth72
2nd July 2013, 08:11 AM
The arm thing was implemented a while ago for tricopters, because arming with the rudder caused the tail to move and started the rear prop in the dirt. It's not such a good idea for quads. tc was kind enough to implement the option in the cli. I leave looptime at default. I only fly in rate.

hadriez
2nd July 2013, 10:47 AM
I can't recall what those command in CLI that I always use does.. it was TC's recommendation long time ago I read in his thread. since it flies pretty well on default PIDs + those CLI commands, I kept using it until now. However I am not flying with default values anymore till todate. here are my settings. I'm suing 2212 980kv on the gaui arms. 2216 1100kv is on the flat arms which I haven't fully used it yet.

http://i1161.photobucket.com/albums/q514/hadriez/d35cd201-a52f-49ce-a073-6034553abb1e_zps7f3b4e17.jpg
http://i1161.photobucket.com/albums/q514/hadriez/0c0bf27f-1ef1-4ab6-8b98-ac1664f4ce81_zpsd4031f1f.jpg

Steezus
2nd July 2013, 12:33 PM
The arm thing was implemented a while ago for tricopters, because arming with the rudder caused the tail to move and started the rear prop in the dirt. It's not such a good idea for quads. tc was kind enough to implement the option in the cli. I leave looptime at default. I only fly in rate.

Oh, so none of those settings affect rate? I have only been flying in rate since the first test flight with the Naze.


My settings that I have been playing with lately are kind of close to hadriez. I get some wag in the wind so I may crank the yaw ki quite a bit and add some kp with it.

http://i.imgur.com/1MkzJrK.png

whakahere
2nd July 2013, 01:25 PM
what program are you guys using? I haven't seen that one before.

Steezus
2nd July 2013, 01:33 PM
what program are you guys using? I haven't seen that one before.

That is a slick Chrome extension called Baseflight (http://www.multiwii.com/forum/viewtopic.php?f=8&t=3414).

whakahere
2nd July 2013, 01:35 PM
sweet jebus ... thanks as I use a mac this helps out :D

scotth72
2nd July 2013, 08:29 PM
Here are my current settings.
28578

These are for smooth flying, you will need to up the rate substantially for flips and rolls.
Here is vid from the other day using these settings. Hero2 at 1080p medium view. Only color correction done in post.

http://www.youtube.com/watch?v=aSNerikhVNs&feature=share&list=UUiuRT4EeHiWA_p5wqxI9PiQ

gnrc
29th August 2013, 12:20 PM
Will there be a new version since current trunk is at r390 right now I think.
Or did the code get merged back?

Also on an kind of unrelated note - chatch are you flying a acro naze or the regular one?
This question kind of goes out to everybody else too.

bicycle
29th August 2013, 02:08 PM
acro naze

whakahere
29th August 2013, 02:12 PM
I have both the acro and the normal one and I have found for fpv I use the arco. I bought the rev 1 (green board) way back when it first came out and was impressed. Now it is so much better. Still though, in fpv I have no use for all the extras because I can see through the camera and it ends up making a lot of the extra functions mainly redundant.

this is the link to the latest firmware
https://code.google.com/p/afrodevices/source/browse/trunk/baseflight/obj/baseflight.hex

spiked3
29th August 2013, 02:24 PM
I run both as well. The acro on the 400Q frame, the afro on the frames I designed myself, but is very similar to the 400Q (actually used a hardware kit from chatch).

Reality is, once I started flying rate mode, I never fly any other way any more, so acro would have been fine on both. The acro does have self leveling anyhow, so if you are making the transition, the acro will be fine, and is less than half the price.

gnrc
29th August 2013, 07:47 PM
I have both the acro and the normal one and I have found for fpv I use the arco. I bought the rev 1 (green board) way back when it first came out and was impressed. Now it is so much better. Still though, in fpv I have no use for all the extras because I can see through the camera and it ends up making a lot of the extra functions mainly redundant.

this is the link to the latest firmware
https://code.google.com/p/afrodevices/source/browse/trunk/baseflight/obj/baseflight.hex

Thanks for the link and let me rephrase
Was tpa brought back to the trunk or do we need chatch to patch it onto the current trunk if we want the new version and tpa?

viper522
7th September 2013, 04:50 PM
Wanted to say thanks to hadriez and Steezus for posting their PIDs, I'm using a combo of both and it's much better than what I started with. I also saved the settings scotth used to make that hella smooth video for when I put the gimbal back on. back to the bench

scotth72
2nd November 2013, 12:29 AM
Chatch, do you have a 80mhz version of the 20130719 firmware? I just switched over to Rangelink for control, and would like to make sure I am not getting any interference from the FC.

MultiRotor
28th December 2013, 10:17 AM
Can this Fast ocilation be so fast that it sounds like a Vibration issue? I think I may be suffering from this issue possibly

Its only happening under quick throttle bursts

scotth72
28th December 2013, 10:20 AM
It can be. Use TPA to help with that. It lowers the PIDs as throttle is increased to avoid that very issue.

flysohigh
28th December 2013, 12:29 PM
Any news about an actual Baseflight running @ 80MHz?
I'm setting up my ADS 400Q with Naze32 Acro V4 and EzUHF. The spectrum analyzer shows a peak at 432MHz...

Is this projekt still alive?

flysohigh
15th January 2014, 03:30 PM
C'mon chatch, let us know if this project is dead.

Cheers

chatch
15th January 2014, 03:45 PM
There were only a few users so I stopped working on it

flysohigh
15th January 2014, 04:58 PM
And what about the 80MHz overclocking?
Can you compile a actual version with changed frequency?

ed.m
16th January 2014, 11:16 AM
So overclocking should reduce UHF noise, would it provide any other significant benefits?

chatch
16th January 2014, 01:38 PM
no the code only uses like 5% of the cpu power lol, so it's not like the firmware has a bottleneck that would be released by increasing the clock speed

it just moves the UHF noise to a frequency we don't care about. I think it's hilarious the ONE frequency we don't want to step on is emitted by default. 432.5MHz i think. new harmonic is on 480mhz

kenkos68
17th January 2014, 08:36 AM
This is the latest baseflight compiled with the new cpu clock. On rev.4 status shows 80 Mhz. On rev. 5, it shows 84 Mhz. Either revision, the harmonic is moved out of the LRS band. It doesn't show up on my EzUHF scans.

39170

whakahere
17th January 2014, 10:04 AM
nice!!! I'll use that.

does it have the TPABREAKPOINT as well?

kenkos68
17th January 2014, 10:12 AM
It's the latest from GitHub, pulled and built this morning. There are TPA corrections in it.

Ken

flysohigh
17th January 2014, 01:35 PM
Thank you!

chatch
17th January 2014, 01:41 PM
awesome, thanks for compiling it. i don't have my environment set up for compiling anymore :/

whakahere
18th January 2014, 06:25 PM
What are the tpa correction in the cli? I can't seem to find them.

kenkos68
18th January 2014, 06:54 PM
I didn't see them in the cli, but the commit notes mentioned some fixes and/or adjustments.

cyberpilot360
26th January 2014, 06:14 AM
The file you attached seems to be .php not hex , how did you flash it??

kenkos68
26th January 2014, 09:07 AM
It's a zip file that I attached. The hex file is inside.

cyberpilot360
26th January 2014, 09:35 AM
Oh ok just had to use winzip to open it.
Just flashed it, gonna give it a try soon. Thanks!

MultiRotor
2nd April 2014, 05:17 PM
edited

neu
2nd April 2014, 06:16 PM
soooo I am in need of the overclock version of baseflight. Is the one that was posted by Kenkos still up to date? Maybe we can get timecop to make the change for future versions of baseflight so we don't have to fiddle with the firmware when using UHF.

kenkos68
2nd April 2014, 09:13 PM
I have attached the latest code from GitHub, overclocked.

-Ken

Optical
2nd April 2014, 11:22 PM
Thanks!

neu
3rd April 2014, 04:25 PM
Thanks! :D

schugabe
7th April 2014, 05:39 PM
I created a patch that makes the tpa_breakpoint setting available via cli and it got merged in the main repository. So this option is soon available in the baseflight releases.

whakahere
10th April 2014, 02:49 AM
Sweet jebus you rock. Did you make him shift the mhz as well so it doesn't mess with UHF? Legend mate

schugabe
10th April 2014, 03:54 AM
I didn't touch the clock handling since tc mentioned in a multwii thread that changing PLL (shifting the mhz to 80mhz) can make the i2c bus too fast to communicate with some sensors. I never had any problems with my naze on the uhf band so I did no experiments so far. Did somebody try to lower the clock frequency to 64MHz? Does this shift the noise out of the UHF band as well?

Optical
10th April 2014, 06:32 AM
The Harakiri fork overclocks by default, I dont see why baseflight can't do the same...

whakahere
10th April 2014, 06:34 AM
I want it over clocked so it doesn't mess with the kvosd and make uhf pointless.

timecop hates extra sensors anyway :D

kenkos68
10th April 2014, 10:40 AM
Wow! A lot of updates these past few days!

I've added the OC to code and compiled. It has the tpa_breakpoint setting added.

Here is the latest as of 04/10/2014.

-Ken

scotth72
10th April 2014, 10:46 AM
I am running Naze32 @ 72mhz, kvosd, and ezuhf. No problems at all with range. Keep the video stuff and the uhf stuff separated, you should be fine. If you are flying a mini, all bets are off.

schugabe
10th April 2014, 11:05 AM
I created a ticket on github to check if timecop would merge a overclocking option...

whakahere
10th April 2014, 02:06 PM
what is the default of tpa currently?

schugabe
10th April 2014, 03:03 PM
Tpa is disabled per default. The values in the cli are
tparate=0
tpa_breakpoint=1500 (which is ~50% throttle)

bruno222
20th April 2014, 11:28 AM
Wow! A lot of updates these past few days!

I've added the OC to code and compiled. It has the tpa_breakpoint setting added.

Here is the latest as of 04/10/2014.

-Ken

Thanks mate :)

schugabe
21st April 2014, 07:49 AM
Great news for all with naze related uhf problems! I added a cli variable emf_avoidance=1 in the cli. If it is set to emf_avoidance=1 the naze runs at 80/84 MHz (depends on hardware revision) after the next reboot. This patch was merged in the baseflight repository and should soon be available in the compiled releases.

schugabe
21st April 2014, 03:21 PM
tc compiled the new release so the changes are available if you update the firmware.

ed.m
21st April 2014, 03:36 PM
Thats great news schugabe! Will try it tomorrow. Thanks!

bimdas
25th April 2014, 03:25 AM
tc compiled the new release so the changes are available if you update the firmware.

awesome! thanks for finally getting it built in.

whakahere
25th April 2014, 04:47 AM
legend on too many levels schugabe. With the tpa breaking point and the new built in tpa breakpoint has really changed how I tune the naze copters now. I can have my pids really high and get really locked in. With the reduced noise on the 433mhz band I can run my kvosd without it kicking out too much noise.

I now LOS the copter and put in the highest pids I can without any shakes. Next I go FPV and check the hover for shakes. If it passes this test I go to slowly increasing the throttle until I get the shakes (need a large area to do this). I then mark where the shaking happens and go 5% back. This is my tpa breakpoint. From there I increase the tpa until the shakes go away.

example of old and new pids.

On my ads400 I had pids around 3.5. It was a bit sloppy in flight but it is all I could do to keep the shakes away. Now I have pids around 7 and my tpa on 0.5. pretty smooth on all throttle ranges. One thing I would love is a tpa breakpoint for roll and another for pitch. Then separate tpa setting for roll and pitch. I would really be able to lock it down then.

schugabe
26th April 2014, 04:22 PM
I added the separate breakpoints/tpa_rates for pitch/roll. I currently have no chance to do a testflight with the changes.
If you feel adventurous flash the appended hex and try to set tpa_breakpoint_roll and tpa_breakpoint_pitch/tpa_rate_roll and tpa_rate_pitch in the cli.

The changes necessary were not complicated but unexpected things can always happen so I cannot guarantee that everything works as expected.

whakahere
26th April 2014, 09:23 PM
Cheers, I'll give it a try and see how it runs. I've give it a try on my mini next weekend.

whakahere
29th April 2014, 08:41 AM
I added the separate breakpoints/tpa_rates for pitch/roll. I currently have no chance to do a testflight with the changes.
If you feel adventurous flash the appended hex and try to set tpa_breakpoint_roll and tpa_breakpoint_pitch/tpa_rate_roll and tpa_rate_pitch in the cli.

The changes necessary were not complicated but unexpected things can always happen so I cannot guarantee that everything works as expected.


I have been thinking the best way to go about doing this. got any tips when going in high throttle if it is roll or pitch that is shaking the quad? Since I can't take a computer out onto the field I need a easy way of setting this up. ummm.