Page 1 of 1
TBS discovery - custom motor MIX
Posted: Wed Jul 17, 2013 8:52 am
by krtek2k
Hi boys , i am not ingeneer , and dont have my discovery at home yet (on its way now).
So i wanna ask if someone have counted custom motor mix for TBS discovery.
Or if someone wanna do it by this manual:
http://polakiumengineering.org/?p=1612thank You
EDIT : Now i have found nice motor mix for TBS Discovery with these numbers :Code: Select all
motor[0] = PIDMIX(-1.27,+1,-1); //REAR_R
motor[1] = PIDMIX(-1.54,-1,+1.12); //FRONT_R
motor[2] = PIDMIX(+1.27,+1,+1); //REAR_L
motor[3] = PIDMIX(+1.54,-1,-1.12); //FRONT_L
Re: TBS discovery - custom motor MIX
Posted: Sun Jul 21, 2013 11:37 am
by haydent
check out my multiwii custom motor mix video on this "dead cat" layout. it may make it easy for you:
http://www.youtube.com/watch?v=il6SoU8Hnak
Re: TBS discovery - custom motor MIX
Posted: Fri Jul 26, 2013 10:35 am
by krtek2k
I know about this video , i am using now your numbers. But i am not so good at math , or something.
So i am asking to help , i found these inputs about discovery frame.
http://krtek2k.mysteria.cz/tbs_frame.xlsxCan you modify your , to get right numbers for DISCOVERY? Please.
Re: TBS discovery - custom motor MIX
Posted: Fri Jul 26, 2013 12:14 pm
by haydent
sure, too busy tonight but i can do it this weekend.
Re: TBS discovery - custom motor MIX
Posted: Sat Jul 27, 2013 5:44 am
by test
hi, haydent here, having trouble logging in away from home, and the email system isnt working on this forum so cant recover password.
i started trying to calculate it but i need the length from the center point to a motor, ie the arm length as shown in your diagram
if you can get that, i suspect it can be worked out even with the angles given but i might try that later, here is my workings so far:
Triangle1:
A1 = sqr(C1^2 - B1^2)
B1 = M3 to M1 / 2
C1 = FC to M3
Triangle2:
A2 = sqr(C2^2 - B2^2)
B2 = M2 to M0 / 2
C2 = FC to M0
Motor Mix:
M0 = B2, -A2
M1 = B1, A1
M2 = -B2, -A2
M3 = -B1, A1
Re: TBS discovery - custom motor MIX
Posted: Sat Jul 27, 2013 7:21 pm
by krtek2k
Oh nice
Thank You for working on it , i measure lenght u need , and it is something around 23.6-23.8cm .
I am now using :
Code: Select all
#ifdef QUADX
motor[0] = PIDMIX(-1,+1.08,-1); //REAR_R
motor[1] = PIDMIX(-1.31,-0.56,+1.31); //FRONT_R
motor[2] = PIDMIX(+1,+1.08,+1); //REAR_L
motor[3] = PIDMIX(+1.31,-0.56,-1.31); //FRONT_L
#endif
If you can modify it to be perfect for discovery , i will be happy
Sorry for my english
Re: TBS discovery - custom motor MIX
Posted: Sun Jul 28, 2013 12:20 am
by Hamburger
no need to edit the mixing in output.cpp or output.ino.
You can use MY_PRIVATE_MIXING from config.h for that. It does what you want.
Re: TBS discovery - custom motor MIX
Posted: Sun Jul 28, 2013 3:12 am
by test
i also need the distance between the rear two motors
thanks hamburger for pointing that out
Re: TBS discovery - custom motor MIX
Posted: Sun Jul 28, 2013 7:00 am
by krtek2k
I will look what is my private mixing...
this picture is in that excel which i posted under viewable scheme.
Re: TBS discovery - custom motor MIX
Posted: Sun Jul 28, 2013 1:01 pm
by test
sorry i could not open that excel doc, it just errored. ill have the calculations in a few mins
Re: TBS discovery - custom motor MIX
Posted: Sun Jul 28, 2013 1:16 pm
by test
Here you go
Triangle1:
A1 = sqr(C1^2 - B1^2)
A1 = sqr(23.7^2 - 21^2)
A1 = sqr(561.69 - 441)
A1 = sqr(120.69)
A1 = 10.98
B1 = M3 to M1 /2
B1 = 42 /2
B1 = 21
C1 = FC to M3
C1 = 23.7
Triangle2:
A2 = sqr(C2^2 - B2^2)
A2 = sqr(23.7^2 - 17.35^2)
A2 = sqr(561.69 - 301.02)
A2 = sqr(260.66)
A2 = 16.14
B2 = M2 to M0 /2
B2 = 34.7 /2
B2 = 17.35
C2 = FC to M0
C2 = 23.7
Motor Mix: (Divide all by largest length, to make them relative to 1, in this case 21)
M0 = B2, -A2
M0 = 17.35, -16.14
M0 = 0.83, -0.77
M1 = B1, A1
M1 = 21, 10.98
M1 = 1, 0.52
M2 = -B2, -A2
M2 = -17.35, -16.14
M2 = -0.83, -0.77
M3 = -B1, A1
M3 = -21, 10.98
M3 = -1, 0.52
Re: TBS discovery - custom motor MIX
Posted: Sun Jul 28, 2013 1:23 pm
by test
the only thing is i get a different value to your diagram for the bit marked and x1 & x2 , what i call A1 and A2, i dont calculate them as double...
Re: TBS discovery - custom motor MIX
Posted: Sun Jul 28, 2013 7:16 pm
by krtek2k
Oh nice
I can understand , that you are doing all of this simpliest as possible , and i am glad you done it, but i am so dumb as possible , can you translate to this language?
Code: Select all
motor[0] = PIDMIX(-1,+1.08,-1); //REAR_R
motor[1] = PIDMIX(-1.31,-0.56,+1.31); //FRONT_R
motor[2] = PIDMIX(+1,+1.08,+1); //REAR_L
motor[3] = PIDMIX(+1.31,-0.56,-1.31); //FRONT_L
thank You
Re: TBS discovery - custom motor MIX
Posted: Mon Jul 29, 2013 1:39 am
by test
try this carefully:
Code: Select all
motor[0] = PIDMIX(-0.83,+0.77,-0.83); //REAR_R
motor[1] = PIDMIX(-1,-0.52,+1); //FRONT_R
motor[2] = PIDMIX(+0.83,+0.77,+0.83); //REAR_L
motor[3] = PIDMIX(+1,-0.52,-1); //FRONT_L
Re: TBS discovery - custom motor MIX
Posted: Mon Jul 29, 2013 8:29 am
by krtek2k
Oh , thank You.
When i use (reversed all signs) :
Code: Select all
motor[0] = PIDMIX(+0.83,-0.77,+0.83); //REAR_R
motor[1] = PIDMIX(+1,+0.52,-1); //FRONT_R
motor[2] = PIDMIX(-0.83,-0.77,-0.83); //REAR_L
motor[3] = PIDMIX(-1,+0.52,+1); //FRONT_L
armed holded in my hand , it compensate badly every movements.
When i use :
Code: Select all
motor[0] = PIDMIX(-0.83,+0.77,-0.83); //REAR_R
motor[1] = PIDMIX(-1,-0.52,+1); //FRONT_R
motor[2] = PIDMIX(+0.83,+0.77,+0.83); //REAR_L
motor[3] = PIDMIX(+1,-0.52,-1); //FRONT_L
armed holded in my hand , it compensate good every movements.
So i placed it to ground , armed motors and start in angle mode , flied well .
When off angle mode , it not hear my sticks well , i think it hear oposites.
Light crash and break one arm , two props
No apologies please , i done it everything in my own risk.
So i am done with all new custom mixes...
When i am using :
Code: Select all
motor[0] = PIDMIX(-1,+1.08,-1); //REAR_R
motor[1] = PIDMIX(-1.31,-0.56,+1.31); //FRONT_R
motor[2] = PIDMIX(+1,+1.08,+1); //REAR_L
motor[3] = PIDMIX(+1.31,-0.56,-1.31); //FRONT_L
it flying nice.
Re: TBS discovery - custom motor MIX
Posted: Tue Jul 30, 2013 5:15 am
by test
sorry i didnt mean for you to reverse it, more that i had. ive edited out that bit.
to the last one you say is flying nice is ok with angle on too ?
Re: TBS discovery - custom motor MIX
Posted: Tue Jul 30, 2013 5:54 am
by krtek2k
Yes it is numbers from your video , and it working for me.
Re: TBS discovery - custom motor MIX
Posted: Tue Jul 30, 2013 6:43 am
by haydent
ok, well i suspect the measurement we used may have been out. when you measured the "arm length" did you measure the distance between the motor and the fc ? as due to the dead cat layout it should not be the same for all as you suggested
Re: TBS discovery - custom motor MIX
Posted: Tue Jul 30, 2013 6:07 pm
by krtek2k
I double checked , that this picture is right , every measurement.
Re: TBS discovery - custom motor MIX
Posted: Wed Jul 31, 2013 12:19 am
by haydent
i put in just you measurements, instead of using formula, (as you provided all needed) and got all but identical numbers. so not sure...
Code: Select all
M0 = B2, -A2
M0 = 17.35, -16.2
M0 = 0.83, -0.77
M1 = B1, A1
M1 = 21, 11.06
M1 = 1, 0.53
M2 = -B2, -A2
M2 = -17.35, -16.2
M2 = -0.83, -0.77
M3 = -B1, A1
M3 = -21, 11.06
M3 = -1, 0.53
motor[0] = PIDMIX(-0.83,+0.77,-0.83); //REAR_R
motor[1] = PIDMIX(-1,-0.53,+1); //FRONT_R
motor[2] = PIDMIX(+0.83,+0.77,+0.83); //REAR_L
motor[3] = PIDMIX(+1,-0.53,-1); //FRONT_L
Re: TBS discovery - custom motor MIX
Posted: Sat Aug 03, 2013 9:27 am
by krtek2k
He he , i dont have enough big balls now to try it again. Also quadx template working well for me now
Thx for your work haydent , i will slow down for now. (waiting for afros ESCs , and AIO PRO V2 board. I will also mount BLS gimbal to my discovery soon)=lots of fun waiting for me
Re: TBS discovery - custom motor MIX
Posted: Sun Aug 04, 2013 8:34 am
by krtek2k
So i found main mistake. Center of circle on that picture is not center of gravity.
CG is more down
Is here some right way , to find where real CG have to be?
Re: TBS discovery - custom motor MIX
Posted: Sun Aug 04, 2013 1:34 pm
by haydent
not sure
Re: TBS discovery - custom motor MIX
Posted: Sun Aug 04, 2013 2:56 pm
by krtek2k
So we can ask ourself , why not have CG right in the middle of "C" line by my last picture? Why not? For this axis , no matter how far from this axis motors are , just two front , two rear. CG in the middle...
Re: TBS discovery - custom motor MIX
Posted: Sun Aug 04, 2013 3:31 pm
by krtek2k
Something like that , if i set 13,63cm = 1
u can teach me something
Code: Select all
motor[0] = PIDMIX(-1.27,+1,-1.65); //REAR_R
motor[1] = PIDMIX(-1.54,-1,+1.85); //FRONT_R
motor[2] = PIDMIX(+1.27,+1,+1.65); //REAR_L
motor[3] = PIDMIX(+1.54,-1,-1.85); //FRONT_L
Re: TBS discovery - custom motor MIX
Posted: Sun Aug 04, 2013 4:34 pm
by krtek2k
Oh !
Just tested it , and it flies so nice! In acro and also in level mode
Code: Select all
motor[0] = PIDMIX(-1.27,+1,-1.65); //REAR_R
motor[1] = PIDMIX(-1.54,-1,+1.85); //FRONT_R
motor[2] = PIDMIX(+1.27,+1,+1.65); //REAR_L
motor[3] = PIDMIX(+1.54,-1,-1.85); //FRONT_L
Re: TBS discovery - custom motor MIX
Posted: Tue Aug 06, 2013 8:37 am
by krtek2k
Code: Select all
motor[0] = PIDMIX(-1.27,+1,-1); //REAR_R
motor[1] = PIDMIX(-1.54,-1,+1.12); //FRONT_R
motor[2] = PIDMIX(+1.27,+1,+1); //REAR_L
motor[3] = PIDMIX(+1.54,-1,-1.12); //FRONT_L
I found this is much better , i lowered power for YAW to 1 and 1.12 , was a little much when i pushed YAW stick hurry to max. Now it is good.
Re: TBS discovery - custom motor MIX
Posted: Tue Aug 06, 2013 1:00 pm
by haydent
great to hear that
Re: TBS discovery - custom motor MIX
Posted: Wed Aug 07, 2013 12:26 pm
by aamorin
Hi everybody !
First of all, thanks a lot for all of you testing/supporting and helping us all with this great software! I have a TBS Discovery frame since a few days ago, tested it with default settings (Quadx defined, default PID's) and it flew pretty well but I've noticed some strange behavior at turns and fast forward flight, so I started my search and found this.. going to try it this weekend and a question has come to my mind:
I understand that if MY_PRIVATE_MIXING is defined in config.h there is no need to declare a frame at the beginning of it as it includes it automatically (according to line 817 in Output.ino, Multiwii 2.2), but what about the motor numbers definition in def.h (line 135) and Multitype declaration for the GUI's ad line 1053 (on the same file) ? do I have to include something? how does Multiwii knows the amount of motors if I don't tell him?..
Cheers !
Re: TBS discovery - custom motor MIX
Posted: Wed Aug 07, 2013 12:33 pm
by aamorin
aamorin wrote:Hi everybody !
First of all, thanks a lot for all of you testing/supporting and helping us all with this great software! I have a TBS Discovery frame since a few days ago, tested it with default settings (Quadx defined, default PID's) and it flew pretty well but I've noticed some strange behavior at turns and fast forward flight, so I started my search and found this.. going to try it this weekend and a question has come to my mind:
I understand that if MY_PRIVATE_MIXING is defined in config.h there is no need to declare a frame at the beginning of it as it includes it automatically (according to line 817 in Output.ino, Multiwii 2.2), but what about the motor numbers definition in def.h (line 135) and Multitype declaration for the GUI's ad line 1053 (on the same file) ? do I have to include something? how does Multiwii knows the amount of motors if I don't tell him?..
Cheers !
One more thing.. I did read
this, but I was wondering, if the purpose of MY_PRIVATE_MIXING is not to edit files again and again.. could I declare the Multitype and motor numbers on my XXX.h ? or do I have to do what I'm not supposed to? (edit def.h again and again)..
Re: TBS discovery - custom motor MIX
Posted: Wed Aug 07, 2013 5:48 pm
by Hamburger
My.private.mixing has a howto description in the official wiki. The link may even be written in config.h. Read it it should answer your question how to use this.
Idea is to not edit def.h ever.
Define quadx or whatever suits your number motors and servos(ignore geometry aspects) - if none of the existing coptertypes fits then my.private.mixing does not help you.
Then put the code resembling your motors and servos mixing suitable for your geometry into your new private file as defined via my.private.mixing.(as starting point you can copy over something from the output file)
Re: TBS discovery - custom motor MIX
Posted: Wed Aug 07, 2013 6:53 pm
by aamorin
Hamburger wrote:My.private.mixing has a howto description in the official wiki. The link may even be written in config.h. Read it it should answer your question how to use this.
Idea is to not edit def.h ever.
Define quadx or whatever suits your number motors and servos(ignore geometry aspects) - if none of the existing coptertypes fits then my.private.mixing does not help you.
Then put the code resembling your motors and servos mixing suitable for your geometry into your new private file as defined via my.private.mixing.(as starting point you can copy over something from the output file)
Thanks a lot for your answer
Hamburger, now I understood it. I'll make some test with the latest values from
krtek2k and report later
Cheers!
Re: TBS discovery - custom motor MIX
Posted: Wed Aug 28, 2013 12:50 pm
by aamorin
Ok, I flew it last weekend, but I'm afraid I can't tell you exactly how good it fly.. All I can say until now is that it does fly..
Maybe it's because I have to raise a lot my pid's but it seems to be pretty tail heavy.. doing a fast forward flight (flying only with gyro) it starts to "fall from tail".. like if someone was pulling it from behind. It was a windy day.
I have my esc's flashed with blheli (they are SILABS based Turnigy Plush so can't use SimonK firmware), so perhaps I can raise my pids by 2 or 3; now on I have the default ones.
Re: TBS discovery - custom motor MIX
Posted: Fri Apr 18, 2014 9:29 pm
by rallie_86
krtek2k wrote:Code: Select all
motor[0] = PIDMIX(-1.27,+1,-1); //REAR_R
motor[1] = PIDMIX(-1.54,-1,+1.12); //FRONT_R
motor[2] = PIDMIX(+1.27,+1,+1); //REAR_L
motor[3] = PIDMIX(+1.54,-1,-1.12); //FRONT_L
I found this is much better , i lowered power for YAW to 1 and 1.12 , was a little much when i pushed YAW stick hurry to max. Now it is good.
Hi! Is there anyone else who tried this that can conform it works good?
I got naza on my disco now, but its terrible boring to fly
Just about to get my flip 1.5 in it instead and would love some locked in settings
Re: TBS discovery - custom motor MIX
Posted: Sat Sep 20, 2014 10:56 pm
by acessford
I'd love to know if anyone has tried this mix and what pids there running. I've has a tough time with this frame.
Re: TBS discovery - custom motor MIX
Posted: Sat Feb 14, 2015 3:34 pm
by GUSHELFER
tal vez lo mejor sea la mezcla de 2 frames, la de quadx y octoflat x, usamos los valores de quadx solo para los motores traseros, y para los motores delanteros usamos la configuracion de octoflat x ( motor 0 = MIDFRONT L ) Y ( MOTOR 5 = MIDFRONT R) tendria q funcionar !!! cambiar sentido yaw ??? (+,-) supongo........