Harakiri aka multiwii port to stm32

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

Harakiri aka multiwii port to stm32

Post by cGiesen »

Please discuss harakiri questions here!

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

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

URL collection/Sammlung:

Forks abound on the high sees! Harakiri is a fork of Baseflight which is itself a fork of Multiwii... likewise, BaseflightGUI2 is a fork of MW-WinGUI

Harakiri is built upon on the efforts and hard work of many people, from the original work by Alex, through to Timecop/Dongs and many, many other people who are impossible to name here - you know who you are - you submitted patches, bug reports, comments, documentation and testing. Thanks you all for doing this and sharing this with the community in a selfless and altruistic way by making it Open Source.

I'm sure there are plenty of other good infos on Harakiri... important links I've missed? Also, Could someone clarify for the uninitiated whether this is a direct fork of Baseflight but will become an independant fork of MultiWii or is the intention to remain a superset (ie some extra features built on top) of Baseflight? Maybe a few words for those that don't read German or would like to know the background of Harakiri? Will it have a future if Baseflight goes dark/underground? More official?!) source repo going to be published/maintained?
Last edited by felixrising on Thu May 23, 2013 10:44 pm, edited 4 times in total.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Harakiri aka multiwii port to stm32

Post by copterrichie »

Kinda curious myself. Hmmm

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Sorry that I omitted the english part too much, but it's so much work. The german and english part of the "instructions" are currently outdated in some areas. Carsten also put great effort into the aux channels and LED part - that is explained here https://docs.google.com/document/d/1SdK ... edit?pli=1. The google codepage is not maintained by me - because i am too stupid for that, but i always post the complete source here: http://fpv-treff.de/viewtopic.php?f=18&t=1368#p20576, when i think the stuff is flyable a hexfile is included as well. Currently i am ironing some things out in PH to make it actually more moveable. It works great in one place but moving around in PH still has some issues (fly back to initial position..). The source is a derivate of mwii/BF with some new/extended stuff. Perhaps some parts/ideas will make it into something more official (at least turning the arm switch into a killswitch - with an option and timeout - is something some arducopter guys would die for. Abort RTL and autoland if the distance to home is actually increasing beyond a specified, relative distance, instead of decreasing because of an mechanical/weather/magnetometer error etc). I don't know. The name "Harakiri" was just a black humor joke explained here: viewtopic.php?f=23&t=1947&start=110#p28742
Cheers
Kraut Rob

DrEvil
Posts: 17
Joined: Mon Sep 10, 2012 12:23 pm

Re: Harakiri aka multiwii port to stm32

Post by DrEvil »

Joining ;-)

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

mbrak wrote:
mr.sneezy wrote:
cGiesen wrote:In the first post, there are a list of different versions.

Thats the actuall best version:
http://fpv-treff.de/download/file.php?id=3895

Hi, the one above referred to as the 'actual best version', is that the Harakiri10Beta, or another ?
(I see Harakiri10Beta4 in the video link you posted for us).

Thanks,
Martin



hi martin

the 10b4 is currently the public beta with the best tuned pids for gps. as you can see in my video :) the pids are standart.
rob is currently cooking a new version (maybe 10b6 or 10b7 dont know) with many new features in gps modes.

br michael b.


Hi Michael,
I cut and paste your reply here as it's about Harakiri.

I downloaded the source file downloaded by the link to 'the best version' but there is no .HEX file in that bundle. While I do have some copies of 10b.hex saved from a few weeks ago I have no idea now if that is 10b4 or an older one. If possible can you point me to a HEX known to be 10b4 ? (unless there was a compelling reason to compile it myself, which I've not done yet)

Currently I have some time to do some work on the quad while whiling the hours away in a motel. Brought the quad just in case we had some down time :)

Thanks,
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

Have a look here :
http://fpv-treff.de/download/file.php?id=4218

Very experimental versions did not have an hex file!
And this project need to have some knowledge and reading.

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Thanks, got the hex off that one.
Yep understand the need for caution and some reading (lots I suspect).

As a base point, are there PID settings you'd suggest need changing immediately in this late version ?
That will help other following too.

Thanks,
Martin

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

Harakiri aka multiwii port to stm32

Post by cGiesen »

You can start with the defaults

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

I loaded up the Harakiri hex tonight but the board won't boot afterwards. Tried a global erase option on the STM Loader but still did not boot after a successful load (and verify). Put BaseFlight back on it and it boots as expected.
Is there a different setting to load Harakiri10b ?

Might have a bad download too, will check tomorrow (it's late here).

Cheers,
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

Can you check it against a MD5Sum? Assuming that a MD5Sum is supplied with the .hex...

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

felixrising wrote:Can you check it against a MD5Sum? Assuming that a MD5Sum is supplied with the .hex...
I can't see a MD5Sum supplied on google.code, but I did generate one here b6d7727d29fefd753ecb08e47833c381.

I've spent a couple of hours more this morning trying to get Harakiri in to my board. So far no success. Downloaded the code from https://code.google.com/p/naze32-haraki ... t_NAZE.hex a couple of times to make sure. Then I also tried a cut and paste into NotePad of the raw hex text. That seemed to result in the same data as a 'save as' of the hex did, but still didn't work after loading to the board.

Going back a step.
I have no problem restoring BaseFlight via the STM Loader and I'm using the same STM settings for Harakiri as BaseFlight, however Harakiri is a slightly bigger file going by the size of the Hex. I have a FreeFlight V1.3 board, which is compatible with Naze32 and Baseflight, but is it compatible with Harakiri (I thought it was) ?

BTW, when Harakiri boots does it do some LED and Buzzer tests like BaseFlight ?

Thanks for your help.
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by timecop »

Oh, I bet it isn't.
Since freeflight is MPU3050 + ADXL accel - and I bet they're hardcoding acc_hw to 2 (MPU6050) in harakiri.

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

Re: Harakiri aka multiwii port to stm32

Post by ABL »

mr.sneezy wrote:I loaded up the Harakiri hex tonight but the board won't boot afterwards. Tried a global erase option on the STM Loader but still did not boot after a successful load (and verify). Put BaseFlight back on it and it boots as expected.

Set "128K" option in STM loader (second screen after "Target is readable", on top)?
timecop wrote:Since freeflight is MPU3050 + ADXL accel - and I bet they're hardcoding acc_hw to 2 (MPU6050) in harakiri.

There's also "oldboard" option or smth like that, but not explained what it does...
Also, you can set acc_hardware to use other sensor, but it seems it does not work properly, i tested ;-) Drifts, wobbles, blah.

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

OK we have progress.

Thanks ABL for the 128K STM Loader suggestion, that was the key to loading the firmware (So how much code space does this MCU actually have then). Harakiri loaded as expected with 128K ROM selected.

The boards boots, takes around 10 seconds to initialize to the LED/Buzzer test.

Looking at the GUI without changing the CLI paramaters, the ACC, Baro & Mag are detected. GPS is not.
ACC seems to be working as expected, movement is correctly measured and displayed.

Here's the CLI status report.
# status
System Uptime: 1187 seconds, Voltage: 113 * 0.1V (3S battery)
CPU 72MHz, detected sensors: ACC BARO MAG ACCHW: ADXL345
Cycle Time: 3046, I2C Errors: 0


Looks OK but for GPS missing.

In the CLI I checked and changed GPS type to 2 (MTK with V1.6 fw) but after a save a reboot the board is still not detecting the GPS (which was working in BaseFlight).

Settings are currently
set gps_baudrate = 38400
set gps_type = 2


Wondering about the mention of the ACC hardware.This is set in the CLI, not sure if it should be adjusted, ACC seems funtional?
set acc_hardware = 0

Thanks for the help.
Martin

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

hi all, just jumped in. is this the file i need to upload the harakiri firmware? just slightly confused where to start.

Source120513-1600Uhr - Harakiri10BetaC.zip found here http://fpv-treff.de/viewtopic.php?f=18&t=1368&p=20580#p20580

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi,
@crash: I would try out BetaC,
@mr.sneezy: The current inertia code (with the variables) is designed for ublox i doubt that it will work on mtk without changing gps_pos_vel or gps_lag and adjusting Pids ( PosrP, PosrD, leave PosP at zero for adjusting posrP/D (relative Position), add a little PosP for absolute Position later, leave PosI&D&PosrI at 0 all the time).
The GPS ini has a timout of 10 secs, you are currently experiencing. You were running your mtk in nema mode on original bf (doesn't support mtk binary yet) and are now trying to run it in binary mode, that your mtk obviously is currently not capable of. Set harakiri to nmea with correct baudrate or get a FW for you mtk that does binary according to arducopter protocol 1.6 or 1.9. These FW are only available for mtk 3329, link is in the description.
Cheers
Kraut Rob

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

thanks crash! ok, so i opened the .zip and 2 folders. in OBJ folder is that what i use to update the firmware via hercules? if you have a nice step by step guide that'll be helpful :)

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi!
If you use carstens gui http://fpv-treff.de/viewtopic.php?f=18&t=1504 than you just have to point and click for updating/changing your Firmware. You can always flash back to Timecops original Firmware.
After Flashing: Don't forget to check with the cli your setup, calibrate your sensors etc.
This http://www.moped-museum.de/hercules/her ... e-1973.htm seems not suitable for upgrading your Firmware :) :) ...

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

lol good one!
ok so far i have updated firmware using the baseflight GUI. Is it ok to start flying now? what exactly should i be checking in the CLI? usual suspects like looptime?
the console doesnt show live update at all, any reason?

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

gees, i cant register in FPV-treff to ask there. i dont understand Schreibe die letzten ..... ! :)

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

ok im talking to myself here. haha.
update: i got it working however the GUI is still a little buggy by crashing all the time. i have to say, it does seem much better than the stock firmware, in particular the alt.hold feature however i cant seem to get mag working 100%, wants to yaw randomly just like stock firmware. any ideas on this?
i might get in contact carsten and help him translate a few things too. CRASH, can you hook me up with carsten? i cant signup on this FPV treff forum.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi, Crashfpv. Thanks for the feedback but Harakiris are still work in progress (like mwii/bf and other projects as well) so you need to know what you are doing in the cli and how to use it. Also look in config.c for description of parameters, you will probably find what you seek. Currently i am working on the soft iron calibration but that will not work wonders if the copter has design errors regarding mag. An external mag is still the best solution like with dji products. There are many articles (even in my link list) how to avoid mag disturbances.
I will not disclose email etc of Carsten. I think he will check back on you, but i wonder why the forumsoft won't let you subscribe.
Cheers Rob

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

sure, i understand its work in progress, and well done on it, its bringing out the potential of this little board. im trying to register but it is in german or danish and even when i try and change language to english, still some parts are in german/danish.

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Thanks Rob for the info about the GPS.
Once a while ago I did try the Arducopter V1.9 FW on the MTK 3329 module. I tried it with BaseFlight wondering if it was supported, but nope (at the time). I then loaded what I thought was V1.6 fw but in hindsight was probably V1.5 without binary mode.

Anyway, I reinstalled the uBlox I have here and it works in your type = 1 mode as advertised.
The reason I had the MTK 3329 installed was that the uBlox came from new with a stuffed backup battery, and it takes 2 minutes or so to lock after being off for only a couple of hours. The MTK3329 locks in 20 seconds or less even after a couple of days. But that's a side issue here.

I setup the RC mapping with MultiWii WinGUI then also tried Carstens BaseFlightGUI2 . Like his better with this board :)
Just need to calibrate the Mag outdoors and it should be ready to test fly again.

I'm wondering what to do with FailSafe. Currently the feature is Off. The quad still seems to spool down anyway after 10 seconds or so on the bench if I turn the TX off.

Thanks for the help.
Martin

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

does MW winGUI work with Harakiri firmware?
im also interested in the GPS, ive got a RCTIMER gps ublox sitting here. is it just a matter of pluging it in the RX 3/4 and good to go?
thanks for the much help. does carsten come on here often, ive given up on FPVtreff :)

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

The current "harakiri" will also work on the normal, old 2.1 multiwii gui. Carstens extended Graupner/Auxchannel changes are - of course - not represented in the mwii 2.1 gui. When FS is not specially activated, the copter will do what the RX tells him to do. BTW I set my Frsky RX to correct FS settings anyway - that should do it as well. The connection of ublox gps is shown in the pictures on page 1 of the german thread. The only catch are some ubloxes with funny colors of the cables (where red isn't + or black isn't GND) doublecheck this, otherwise ...... boom ....
Greetings
Rob

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

thanks crash thanks for the heads up on the BOOM factor lol.
I tried using MW winGUI and it doesnt work, only the OLD 2.1 works :(
currently i am trying to tune the velocity of alt hold. meaning, moving forward and the quad drops, however i have up the D to its max at 250 and still the same. Am i missing something? on the stock firmware i could go into CLI and adjust the velocity. Is this no longer available?

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

ok im officially stuck haha. does any one have a picture of the naze wired up to a ublox gps that they could send?

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

Re: Harakiri aka multiwii port to stm32

Post by timecop »

RC pins 3/4 to rx/tx or whatever, see manual. Not hard.

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Harakiri aka multiwii port to stm32

Post by Gimbal »

for any body interested i found this

https://docs.google.com/document/d/1SdK ... edit?pli=1

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

@crashfpv - I tried MW WinGUI 2.2 before BaseFlight WinGUI. It worked for me but was missing some parameters (as expected).

@Gimbal - That looks like a fairly detailed German description of the Harakiri system...

@Crashfpv again - Yep the GPS on RC servo input lines 3 & 4 and take 5V power for the GPS from one of them (assuming 5V GPS like mine). If fails the first time reverse the signal lines and reboot...
(I have a FF board not Naze32 though).

Looking forward to trying out Harakiri in the air some time this week.

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

Thanks sneezy. i got it now. here is my setup of the wiring.

i have enabled GPS in CLI via baseflight GUI. what should i be looking at in the GUI? i go to map and it doesnt update and when in the liveview the PKT flashes green/red. But when i go fly and flick over to GPS hold, nothing.
am i missing something?

hope the pic helps some people with wiring.
Attachments
ublox gps wiring.jpg

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

crashfpv wrote:Thanks sneezy. i got it now. here is my setup of the wiring.

i have enabled GPS in CLI via baseflight GUI. what should i be looking at in the GUI? i go to map and it doesnt update and when in the liveview the PKT flashes green/red. But when i go fly and flick over to GPS hold, nothing.
am i missing something?

hope the pic helps some people with wiring.

If that's how you have the GPS connected it's radically different to mine. My GPS is connected to the flight controllers INPUT channel 3 & 4, and power.
Firstly, do you have a receiver with PPM OUTPUT enabled and connected, and serial PPM input mode selected in CLI as well ?
That step, plus a matched RX, will free up the INPUT channels on the flight controller for use with other things, like GPS.

I use the same FrSky receiver as yours, I put it in to serial (AKA Combined) PPM output mode with a link across the RX's signal pins for Ch3 & Ch4. It's only coincidence that the GPS data uses the FC's input 3 & 4 (somebody correct me if wrong).
Last edited by mr.sneezy on Thu May 16, 2013 9:54 am, edited 2 times in total.

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

I got a few minutes to flight test the Quad tonight with HarakiriBetaC.
Flew very similar to BaseFlight. Right away found the need for ACC trim though, and there's a question.

In Android Naze32 Configurator there is a ACC trim adjustment screen, but I find it doesn't have much effect on my quad. I added +20 pitch trim, then tried -20. I did not notice any change in the quads drift. I also had similar experience with BaseFlight when I first set it up.
Does ACC Trim work on BaseFlight/Harakiri system ?

In the end I did a ACC re-calibration on the field and that helped more, drift was very low.

I increased the roll and pitch P values to 6 right away after that. Could go more I suspect, the quad was still little too soft for me in roll and pitch.

Flew about in Angle and Horizon modes, seems fine to me and very much like Baseflight, although Horizon mode is a bit odd after using rate mode on BaseFlight.

Tried Pos Hold and RTL.

Pos Hold was better than BaseFlight was (given my old sensor hardware), a bit of 3D drift and return. Will try higher PID values.

RTL was very soft. Quad rotated after a few seconds, but took quite a while to cover 50m back to where I took off. As it approached home it did some S turns. MAG might not be working well enough yet, or needs more P value.

I'll keep working on the PH and RTL tuning. I'd like to get a good PH for some aerial video experiments I have in mind in the future.
I am also thinking harder about updating the ACC/Gyro sensor, or just buying TC's late model Naze32 board.

Cheers,
Martin

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

on a tuning side note, i have found different behaviours also. tried on 2 different platforms, 1 X style and 1 H style frames. For H frame with original firmware i had higher gains around 4.2 and on harakiri firmware im having to pull down the gains to about 3.0 without major wobbles, and now naturally feels a little soft but going any higher will induce wobbles. Is there a reason why the major change in PID formula?

sneezy: would you care to show a picture of your setup so i get an idea and maybe some screengrabs? as for mine - it all powers up and i can certainly see some PKT indication working in the GUI, however im not sure i have completely got it right, because the map doesnt update at all and when i try it, it doesnt do a thing.ps. where is POS HOLD?

Paul

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

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

I'm going to flash Harakiri tonight, would like to use a few more features I've found very useful in 2.2. Should I just go for a recent hex file or is the previously mentioned Hinkel4 or public 10betaC the one to go for?

Is there a feature set already documented? I can help out with some translating from German but would like to ensure I'm covering features that are mature or nearing maturity and documenting them correctly.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi! Thanks to all for their testing things out spirit!!
The major PID formula is basically the same it just adds floatpointcalculation and some kind of deltaT. Your can use the original PID controller with "set oldcontroller = 1".@mr.sneezy: Acc trimming is not changed at all and i don't see the need for you to buy a newer Nazeboard.... The gps/ins PH is still in the works. With "set gps_ph_apm = 1" you can use the normal PH controller. The actual version is "Source160513-1510Uhr.zip" (http://fpv-treff.de/download/file.php?id=4547 ) but it is currently unflown due to bad weather here. The code looks good, but without testing i set the Pos P and PosrP/D to zero. The Stockvalues for the original "set gps_ph_apm = 1" were:
cfg.P8[PIDPOS] = 11; -> GUI PosP = 0.11
cfg.P8[PIDPOSR] = 20; -> GUI PosR P = 2.0
cfg.I8[PIDPOSR] = 8; -> GUI PosR I = 0.08
cfg.D8[PIDPOSR] = 45; -> GUI PosR D = 0.045

In the other thread there was a question regarding "feature pass" for ESC calibration. With "set passmotor = 0" all esc are given your pure and unchanged throttleinput at once. With "set passmotor = x" you can adress each motor individually (X represents the motornumber from Timcops manual) so you can see if your motors are hooked up correctly. In the acual version also the raw accelerometer Z Value is given to the gui so you can see the vibration level produced by each motor and dynamically balance each motor (don't forget to type "save" in the cli, otherwise acc data will not be send to the gui...). Of course: don't fly in "feature pass" disable it with "feature -pass" before flight. During feature pass the LEDs will blink as warning so you don't forget in what mode you are. For safety reasons: Dismount props for the first tests with feature pass until you played around with it a little bit and know what you are doing. I understand that Timecop wants to stay close to mwii as possible. So at least "Harakiri" is something for setting up/dyn balance your copter - you can flash to original BF after that :) :)
The Magnetometer calibration is also changed in that version. I found a nice codepiece in the px4mu path - so i assimilated it. It produces a slightly better Mag calibration result with my copter. There might be a greater benefit with other copters? You will see the green led blinking slower than with the "original bf/mwii style". The calibration is done for 50 seconds, slowly spin the copter around all axes to gather data. For whatever reason it is still possible to do the "original" mag calibration with "set mag_oldcalib = 1" - but calibration time is changed to 60 seconds. Internally the mag calculations/calibration offsets are completely changed from 16Bit to floatpoints, that also gives a little bit more precision.
Cheers
Rob

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

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

Thanks Rob, as always a well thought out response ;)

I'll give that a go tonight. I don't really get why dongs/tc is so fast off the mark saying he never (over his dead body) will support x & y feature when it's either already in mw2.2 or going to be in 2.3.. but then it's up to him what he puts in his own fork.

I'm reading through the fpv-treff.de thread at the moment, a bit slow going as I haven't actively spoken German for many years now, but still, I'll report back on that thread about features tested and findings.. We're having reasonable pre-winter weather here in Melbourne/Oz so am getting a few chances to go and test stuff out.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi, Felix!
Thank you very much!
A man has to do what a man has to do... BTW I had a chance to take the linked version for a quick spin and found out some parameters shown here: http://fpv-treff.de/viewtopic.php?f=18& ... 600#p32594. So status changed from unflown to one lipo airborne :) These are only the differences from the settings uploaded with the hexfile. (1.2 KG DJI450 frame quad with 950KV Motors and 10Inch APC SF)
My defaults for "level" are conservative because on shaky copters it could lead to hefty wobbling and crash but they are important for the gps. Because: All the gps stuff results in something like: I want to bank +10 degree to Latitude or so. This is transformed with the magnetometer ("heading") to the bodyframe to something like this: do some +degrees on nick and some minus degrees on ail. The result of that is fed to the angle/level controller wich actually does the copter tilting. So making angle mode a little snappier is beneficial for the gps stuff over all.

Cheers
Rob

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

hey rob, can you help explain the versions of harakiri? you mention above this Source160513-1510Uhr, why does it not have harakiri attached to the end of that?

for the PID, its not a couple of points, im talking P4.2 to P2.9, thats huge difference. i dont know why, maybe something else is going on?
let say, if i do (set oldcontroller = 1), do all function remain the same, including the now kick ass alt.hold ? PS. a note about the alt.hold, ive noticed that it doesnt respond sometimes, for instance. 0 - mid point throttle it holds good but when i want to rise the copter i push up on the throttle and it doesnt respond and stays there, then i have to lower throttle and then i pull up again and it works. its like it gets stuck...?

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

another thing, is there a way to make the autoland on alt.hold quicker and to shut off motors?

Paul.

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

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

Hi,

Looking at the "feature pass" cli option, unless the Rx is up and is configured with the Tx properly configured with the full min/max throttle ranges, it seems that the ESC calibration might not send the optimal ranges to the ESCs. It looks like a "feature esc_calib" could be implemented based on the "ESC_CALIB_CANNOT_FLY" mw function pretty easily. I'd be happy for this to be my first bit of coding, if someone would review it and implement it... where is the svn repo for harakiri? Who would I submit the change to?

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@Crashfpv: OMG, look in the obj folder !!! For the althold: it waits till you reach the throttlestickcenter(+deadband) before you can change the hight. Don't be too quick on the throttlestick in althold. The Autolandrate is adjustable "set autolandrate = X", it is probably 75 with your version and 80 within the hex you didn't discover. Just take it as number, more means faster landing. The landing detection is slow, just to be on the safe side. It requires the motors to run 2 seconds continuously in idle. I have seen another solution but i think there is a chance that it could disarm in the air, if a sudden wind will pull the copter up or stop the autoland. "oldcontroller" just refers to the main pid controller, nothing else is changed.
@Felix: You have to set the correct throttlerange in the gui first of course. An automated esc calibration like "ESC_CALIB_CANNOT_FLY" is absolutely nogo for me thats a clear ticket for a jump in your face copter like with robbe 930esc etc. The current approach is more general, compatible and secure. Not every esc has the same calibration sequence, like assumed with ESC_CALIB_CANNOT_FLY.
There is a repo, but not done by me... and seems to be deserted: http://code.google.com/p/naze32-harakiri/
Greetings Rob

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

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

Thanks Rob,
I've successfully gotten them calibrated using the feature pass option. I guess I'm just lazy :)
I've had nothing but success with the 2.2 method, although I'm only using Simonk flashed ESCs so that clearly doesn't cover everyone's use case - any ESC calibration you should have your props off anyway right?.. :p. What's the story with the Robbe 930esc?

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

crashfpv wrote:sneezy: would you care to show a picture of your setup so i get an idea and maybe some screengrabs? as for mine - it all powers up and i can certainly see some PKT indication working in the GUI, however im not sure i have completely got it right, because the map doesnt update at all and when i try it, it doesnt do a thing.ps. where is POS HOLD?
Paul
Hardware.
The GSP module is my spare, the uBlox looks the same but has no 3.3V regulator in the cable like this MTK.
Note the RX has only PPM out of Ch1, Link in 3&4, Ch8 drives my home-brew PIC LED controller.
Keep in mind I have a FF board not Naze32, the GPS connection on the board is shown on the dotted servo plugs...
Attachments
P5181111.JPG
P5181109.JPG
P5181108.JPG

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Flew again this morning (good way of killing time at a Motel).

Increased Pitch and Roll P to 7.0 - Much happier with it's response in Horizon mode now, feels like a stock 500 size heli.
Increased Yaw P to 8.0 - Not a big effect, I'd like faster Yaw rate still.

Increased PosHold P to 1.5 - Better, but I should try more.
Increased Nav Rate P to 2.0 - Better RTL and P Hold in the wind I thought (about 5 knots today).

Tried adding Baro to my Angle mode (has Mag already), but didn't like the result. Too slow to react to wanted changes in altitude.

Question - I'd like the rates of change in Angle mode to be closer to my Horizon mode (faster). What P is changed for that in Angle mode ?

Suggestion for Carsten - BaseFlightGUI2 - I love it, but I'm finding my BlueTooth link hangs the program when I fly too far away between adjustments. Is it possible to have a 'reconnect' function as well as 'connect' and 'disconnect' ?
Currently I need to use Task Manager to terminate the program then restart it...

Thanks guys,
Martin

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Harakiri aka multiwii port to stm32

Post by Gimbal »

Hi mr.S, so you're outback again, what Tx do you got, I'm looking for a really small suitcase friendly dsm2 6ch transmitter, I've got a DelTang DSM2 Micro Receiver 7ch PPM I'm planning to use for a small quad.

Anders

Sahiwal, Pakistan

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Gimbal wrote:Hi mr.S, so you're outback again, what Tx do you got, I'm looking for a really small suitcase friendly dsm2 6ch transmitter, I've got a DelTang DSM2 Micro Receiver 7ch PPM I'm planning to use for a small quad.
Anders
Sahiwal, Pakistan
Yep I'm in the Outback again.

Hmm, I'm using a not so small or friendly Futaba 8U with a FrSky DHT-U unit. My next radio should be the FrSky Taranis any day soon. Also not small, but very friendly we're hoping.
I see you're a bit out of your home town too :)

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@Felix: Of course today everybody has SimonK, i use Blheli but thats another story. I have a couple of "way overpriced (>50Bucks/piece)" robbe 930 for example. They are from the days when no simonK esc were available, and they are also fast responding (simonK is better today ofcourse). They are also atmel based but i wont flash them because they are more general purpose and have other nifty features (like running in reverse for boats, cars etc). Meanwhile i replaced them on my quad but they are a good example of a complete different calibration procedure, because you have to set the type of usage first (Heli/Boat etc) and who knows what esc calibration procedures the future will bring (different timeouts? BL Gimbal usage? etc)... So thats the reason i don't like an automatic calibration too much. Anyway I am happy that the more general method worked for you! The baro is slow on the sticks because your throttlestick is just inputing a desired climbrate and not a direct throttlecommand. I experimented with different approaches and thats the result.
@Mr.Sneezy: Interesting setup! To make the copter snappier in Angle mode you have to tune the level pids. There is one catch. The Level D is not a real "D" but somehow a constraining factor. The Default level D of 20 means 20% and so on. With this constrain deadly oscillations can be avoided. I would recommend a "D" of 40 or 50 (percent). And then increasing the levelP in 0.5 steps to see what is happening. I stand by to be corrected but thats how i see it. It is interesting to see that the mtk3329 in nmea mode is also somehow working with the acc stuff together.. frankly, i didn't expect that.
Cheers
Rob
Last edited by Crashpilot1000 on Sat May 18, 2013 9:37 am, edited 1 time in total.

Post Reply