control a RC aircraft electric motor from the Propellor
jekain314
Posts: 3
I want to control a RC brushless electric motor from the Propellor.
This is the type of motor used on common RC aircraft.
(1) Do I need to use a ESC for brushless motors with the motor --- my guess is yes.
(2) if yes, I assume I connect the 3-wire connector from the ESC that normally goes to the receiver to the propellor.
(3) I have the Propellor C3. If yes to above, do i connect the ESC 3-wire connector to one of the three "tri ports" on the C3??
(4) is there an example of code somewhere to just command a variable speed on the motor?
--- Jim
This is the type of motor used on common RC aircraft.
(1) Do I need to use a ESC for brushless motors with the motor --- my guess is yes.
(2) if yes, I assume I connect the 3-wire connector from the ESC that normally goes to the receiver to the propellor.
(3) I have the Propellor C3. If yes to above, do i connect the ESC 3-wire connector to one of the three "tri ports" on the C3??
(4) is there an example of code somewhere to just command a variable speed on the motor?
--- Jim
Comments
Yes, you've assumed correct on all the answers.
You could use the normal servo demo code in the Propeller Tool's library or there's also a very basic servo demo in in post #15 of my QuickStart servo tester thread.
The demo doesn't use the servo object's ramp feature. I usually want to control the ramping myself, so I don't use the ramping feature in my projects.
Yes
Yes, it behaves just like a servo
I don't have a C3 but if they are for servos it should work Signal/Power/Gnd White/Red/Black
Look in the OBEX and you will find several servo test codes. Remember most ESC's need to be power down when they initialize in order to work properly
4) I use Servo32. Use the servo function in that object. For my ESCs I have to output a pulse of 1000 (uS) for a few seconds until it beeps, then I can ramp it up to maximum speed at around 1800.
Good catch. I often power my Propeller boards from the BEC. I'm not sure if using a BEC to power the C3 would be a good idea though.
This object is also included in the library of the Propeller Tool version 1.3.
IIRC I posted an object that just drives an ESC and motor using the pc and its keyboard to turn the speed up and down. I used this to start my work on a quadcopter a year or two ago. The propeller is an ideal chip for this type of control!
Does the commands that change the propellor (the spinning one) speed behave the same as those that control the +/- servo motion?
The PWM signal from the Propelor is just a PWM so would seem this isnt any different for the servo and the motor.
maybe the internal circuitry of the motor takes care of the different (+/-) functions of the servo and the continuous spinning motor.
--- Jim
Technically the signal to servos isn't really PWM since the length of the pulse is more important than the duty cycle.
Many airplanes use servos on the throttle channel. The radio equipment doesn't care if it's a servo or a ESC they both are controlled the same way.
As others have suggested, some speed controllers need to start at certain settings in order to work properly. This keeps the motor from jumping to a high power setting accidentally.
Servo signals are precisely pulse-width modulated since only the width of pulses matters... PWM is used loosely to mean "duty cycle modulation". Servo pulses do not have to be regularly spaced at all (in RC applications pulses can go missing due to drop-outs in reception so that duty-cycle modulation would be error-prone)
Its usual to have the throttle right back at power-up to arm the ESC - RC motors are very dangerous as they can generate 100's or 1000's of watts of mechanical power into a sharp propeller blade, so ESCs tend to test for various error conditions and disarm themselves automatically.