Page 1 of 1

Direct motor control on a quad FC

Posted: Mon Mar 19, 2018 7:30 am
by benedikt
Hey guys,
I want to use a brushed quad FC (AlienWii Classic) running MultiWii 2.4 to control the 4 motors directly.
RC channel 0 should countrol motor 0 etc.

I tried this in output.cpp:
#elif defined( QUADX )
motor[0] = rcCommand[ROLL];
motor[1] = rcCommand[THROTTLE];
motor[2] = rcCommand[YAW];
motor[3] = rcCommand[PITCH];

but it only spools all(!) motors up to 1050 when I arm and apply throttle.
Not any higher than that, and none of the other three channels is having any effect on motor rpm.

Anyone of you have a good idea what I need to change to get direct motor control?

Re: Direct motor control on a quad FC

Posted: Wed Mar 21, 2018 12:50 pm
by PatrikE
Hi

I'm not sure what you want to do but this will not be a flyable thing as it is!...
Just 4 separately controlled motors.

rcCommand[x] have a range of -500 to 500 and center is zero so you have to add MIDRC to get it in correct range.

Code: Select all

motor[0] = rcCommand[ROLL] + MIDRC; 

rcData[x] is the "Raw" rcData 1000 - 2000 µs and can be used directly.

Code: Select all

motor[0] = rcData[ROLL]; 


But remember this warning...
Only throttle is normally 1000µs. = idle around 1050
The other Chanels is normally centered at 1500µs and till start the motors at 50% throttle.

Good luck and remove props!
/Patrik

Re: Direct motor control on a quad FC

Posted: Wed Mar 21, 2018 9:00 pm
by benedikt
Hey Patrik,

thanks so much for your reply!
Im trying this for days, and with your suggestion I have gotten further than before!
Not perfect yet, but certainly on the right way now.

It actually does fly though.
Only about half a millimeter - its a hovercraft ;)

Cheers
Benedikt

Re: Direct motor control on a quad FC

Posted: Sun Apr 01, 2018 10:37 pm
by Pedro14755
You had PatrikE stumped for a minute there Benedikt :)

PatrikE is always the first to help me out with the MultiWii questions that I have had in the past too.

That Whoover is "flying" really well now after all the work that you and Travis have done.

Here is Benedikt's project PatrikE :) https://www.youtube.com/watch?v=6_4CXQkZQ8M