Hello guys.
I have just finished my 2nd semester in mechatronic engineering (so yeah, I am kind of a beginner), and now I want to make a project on my own.
I want to build a quadcopter. In the beginning just rather simple.
However, I do not know how to program the motors (I know about programming servos). And everytime I search for it on Google, all I get is some DIY kit, or a link to an arduino site (Arduino Autopilot).
I am thinking about using this motor:
http://www.hobbyking.com/hobbyking/store/__5423__FC_28_12_Brushless...
This ESC:
http://www.hobbyking.com/hobbyking/store/__25112__HobbyKing_Red_Bri...
Microcontroller:
NXP P89V664 (based on the 8051 by Intel)
http://www.nxp.com/documents/data_sheet/P89V660_662_664.pdf
So basically, my questions are:
Could this setup work?
How do I program the motors?
- Like a servo? With PWM?

Perhaps you are asking the wrong question. The brushless motors themselves are nothing more than coils and magnets. There's nothing to program.
The ESC's can be programmed and controlled. To control an ESC (and by extension the motor it drives), you send it a PWM signal (like a servo) and it creates a corresponding range of motor speeds. Calibration of the ESC against your throttle ensures that the range of your throttle reflects the full range of the speed controller.
Furthermore, most ESCs have filters and other "logic" that can be programmed. Usually, this is done by listening to beeps and changing the input (eg. throttle stick), but you can also get cheap ESC programming cards to do it directly. The main features that can be programmed are the startup speed (ie, whether it immediately ramps up speed "hard", or if it starts more "softly" which protects geared motors from stripping the gears), whether the motor stops softly, or uses a "brake" to stop suddenly if you give it 0 input, and finally what voltage to cut-off power at.
Hope this helps
Permalink Reply by René Paulsen on June 19, 2012 at 9:46am Well, obviously I mean how to program the microcontroller to control the motors.
But let's say I don't want to use a programming card, but only the MC. Do I just program them like I would a servo? A PWM with a period of 20 ms, and a signal of 1-2 ms?
Permalink Reply by Jake Stew on June 19, 2012 at 10:43am The microcontroller cannot control the motors. The motor would draw far too much power and burn out your uC very quickly. The uC controls an ESC which in turn controls the motor.
Vernon Barry has posted some good info on flashing ESC firmware. Search on his name and/or "SimonK". This is where you'll find good details about interfacing/programming ESCs.

Keep in mind however that many of the newer ESCs from HobbyKing no longer contain ATMEL chips (which can be flashed with open frimware like SimonK), but instead contain SILABS chips which cannot be flashed (or at least not with SimonK firmw). The problem of course is that the "old" ESCs and the "new" ESCs look identical and there's no way to know if they changed chips. So while say the old 30A HK ESCs were programmale, the batch I just received last week had changed without any external indication (same model, same casing, same labels, same price.... different chip - *sigh*)
Permalink Reply by Jake Stew on June 19, 2012 at 11:26am That's crappy news. Do you know which chip they're using now?
Permalink Reply by DB on June 19, 2012 at 12:05pm Hi Rene -
Have a look at this course at Rice University:
http://www.ruf.rice.edu/~mobile/elec424/tilt3.html
In previous years, they built every part of a quad rotor from scratch, including all motor control. It looks like they buy the airframe now, but they still create their own controller(s) and write their own code.
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.186 members
1298 members
24 members
51 members
51 members
© 2013 Created by Chris Anderson.
Powered by
