Direct motor control on a quad FC

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
benedikt
Posts: 11
Joined: Thu Sep 05, 2013 12:37 pm

Direct motor control on a quad FC

Post 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?

PatrikE
Posts: 1951
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Direct motor control on a quad FC

Post 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

benedikt
Posts: 11
Joined: Thu Sep 05, 2013 12:37 pm

Re: Direct motor control on a quad FC

Post 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

User avatar
Pedro14755
Posts: 49
Joined: Tue Jul 14, 2015 12:56 am
Location: Canberra Australia
Contact:

Re: Direct motor control on a quad FC

Post 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

Post Reply