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

Direct motor control on a quad FC

Postby benedikt » Mon Mar 19, 2018 7:30 am

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?
benedikt
 
Posts: 11
Joined: Thu Sep 05, 2013 12:37 pm

Re: Direct motor control on a quad FC

Postby PatrikE » Wed Mar 21, 2018 12:50 pm

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
PatrikE
 
Posts: 1931
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Direct motor control on a quad FC

Postby benedikt » Wed Mar 21, 2018 9:00 pm

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
benedikt
 
Posts: 11
Joined: Thu Sep 05, 2013 12:37 pm

Re: Direct motor control on a quad FC

Postby Pedro14755 » Sun Apr 01, 2018 10:37 pm

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
User avatar
Pedro14755
 
Posts: 46
Joined: Tue Jul 14, 2015 12:56 am
Location: Canberra Australia


Return to Software development

Who is online

Users browsing this forum: No registered users and 2 guests