Turning off motor(s) by coding

Hi all,

I was wondering if it is possible to turn off certain output pins, or motors by activating a switch from the RC controller. For example on a Y6 build, I would like to turn off the front 4 motors and leave the rear 2 still capable of providing thrust; the output portion of the apm code checks for the switch input and turns off the specific motors.

Any advice is greatly appreciated as I have been working on this for a while! :)



You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Thank you Shyam! I'll see if I can get it to work. I'm still a little new at this hence my inexperience. :-)
  • Of course, why do you think it is not possible?

    You have to custom program in such a way to detect the PWM values from a particular switch, say CH8 (900-2100) [Low-High] and then take corresponding action. The code already detects all channels [see Loop() in Arducopter.pde]. You basically need to apply it judiciously, to use the HIGH-LOW value of the switch and write a function to do what you want. Check out motors.pde, which is at the heart of motor outputs.

    Have you tried plugging out the APM output pins and arming the motors. Yes, it is possible to spin only one rotor, after arming. There is yet, no feedback control mechanism from the motors to APM, thus APM does not know if the wire from the OUT pin of APM actually, supplies the PWM values to the motors and reaches them or not. It takes it for granted!

    PS: Do this at your own risk!

This reply was deleted.