SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Cannibal
#65862
Hi All,

Some guys in the office along with myself want to throw together a flying contraption. Long story short, this has led us to look at the use of brushless DC motors, and by extension to look for controllers for these animals.

The problem we're facing is that the commercial controllers seem to only support update rates of ~50 Hz, while we would desire an update rate of around 100Hz.

I'm torn at this point between finding a commercial controller designed for hobby flying that is known to be able to take updates at 100Hz (anyone know of any in the 25A range?) and building my own based on the numerous application notes from Microchip on the subject.

The former option would still leave me with some questions on the utilization of servos, as I've come under the impression that there is more to it than simply sending a PWM pulse at 50Hz... something to do with initializing the controller to allow it to detect the number of poles in your motor, etc etc every time one wishes to fly.

The latter option has the benefit of being able to update at extremely fast rates, and to modify the modules to take an i2c or spi bus so we could drive all four rotors from a single port, as opposed to needing to use up all of the PWM outputs.


Can anyone shed some light on my (mis)conceptions?

Thanks in advance.

-Cannibal
By Cannibal
#65928
socoj2,

Thanks for the input, however those are controllers for stepper motors and 'brush' DC motors - not the same animal as brushless motors.

I had a look at the data sheets and they look to be quality products, but not what I need.

Again, thank you for the input though.
By Krogoth
#66002
Cannibal,

Although I can't remember any specific links or posts, there are rumours in the following thread

http://www.rcgroups.com/forums/showthread.php?t=885325

about how some hobby brushless ESCs can be updated at up to 200Hz, contrary to the stated specifications. I'll leave it up to you to read through the thread and find the ESCs they mention, since it sounds like you might be trying to do something fairly similar on a larger scale (I'm guessing a quadcopter?) so you'll find it a good read.

Will.
By macegr
#66023
Dealextreme has a lot of brushless motor controllers, and motors too.

Example: http://www.dealextreme.com/details.dx/sku.4474

That's a nice little 25A one for $15.50 including shipping. They have controllers down to 10A and up to 85A.
By quixfz
#66035
hi!

i'm using these:

http://www.hobbycity.com/hobbycity/stor ... grammable)

on this thing here:
http://diydrones.com/profile/quixfz

with currently the low part of the ppm pulse being aroung 0.4ms long. thats over 700Hz update rate (1000ms / (1ms+0.4ms)) at idle and something over 400hz at full throttle (1000ms / (2ms+0.4ms)).

could probably made even a little bit faster, but currently there's no need for that. that video in diydrones was shot with 200hz constant update rate (as far as i remember)
By Cannibal
#66037
Thanks for the input Krogoth and macegr,

macegr - I've looked at the Dealextreme link and like what I see, especially the comment that says it should function well without too much extra configuration - what scared me away from off the shelf ESC's is that most of them seem to have a complex initialization procedure, making the learning curve almost as steep (in my mind) as doing something crazy like adapting a microchip application note.

Krogoth - Yep, it's two of my friends and I who want to waste some time and money building a quadcopter - though I don't know if I would call the scale larger or not - We're going into this hoping to get something that can fly by wire and hold position on its own (modest goals, but we appreciate the details that this will require - one of the guys is an inertial+satellite navigation specialist, the other is a differential gps code monkey, and I'm the EE who has built hardware for both of them in the past, so we have the combined skill set, but frankly we all know this is going to be a lot of work to get moving).

I remember ~a year ago you discussed starting up a similar project, but with goals that included indoor movement - I hope that's going well - any updates?


quixfz - Thanks for the links, I'll look into them and see what I can see.
By Cannibal
#66040
I suppose I should ask this aswell - Does anyone have links or insight to any guides on generating these servo signals that will drive the commercial motor controllers?

Also, I gather that different controllers have different initialization sequences based on what sort of throttle setting they expect at start up, and what sort of 'radio controller' (not applicable here) you are using.

Any free insight?

-Cannibal
By quixfz
#66045
rc-servos and rc-brushless-controlers take ppm signals. you can google that.

basicly it's a pulse, between 1ms (idle) and 2ms (full throttle), at 50Hz. so the signal is low, then high for 1ms-2ms, then low again for (1000ms/50Hz)-pulselength.

i case of the supersimple esc i mentioned, you can shorten the low-part to get higher frequencies. you don't have the keep the frequency constant, that means, you can have a constant "low-part"-length.

the only thing i had to initialise on the supersimples, is set the throttle start and endpoints (learn it to idle at 1ms and provide full power at 2ms).
you can do this by providing a 2ms signal right at startup, and then after a few seconds (2-3 seconds) go to 1ms.

here's the procedure: http://diydrones.com/profiles/blogs/sup ... e-escs-and
you can then measure the time after which to go to 1ms. it's very simple, try it.
By Cannibal
#66048
Thanks quixfz,

Is that your drone page? If so, pretty sweet, and nice hovering vid you have there.

Given the description of the sequence on that page, it sounds as though it's recommended to do the initial connections sans battery to ensure the signal is a clean 'full throttle' when the ESC gets power.

However from your description of "you can do this by providing a 2ms signal right at startup" I'm guessing that in your project you do this as part of your embedded system startup? (Thus the beeping motors?) :)

Also, since you seem to know a lot about this, I may as well ask what the colour coding is on supersimple servo line - I can guess black is ground, but which is the PWM in, and what is the last wire for?

Thanks again.
By VStar650CL
#66060
If anyone wants to try the DIY route, this is a fairly clever PIC16 brushless driver with schem and code... it uses back-EMF for closed-loop control. Not great at low speed (it's sensorless) but a very low part count for what it does. With substituted parts I've driven stuff up to 20A, and you can dink the code to create pretty much any kind of I/F you like.

http://www.microchip.com/stellent/idcpl ... e=en534512
By Cannibal
#66061
Vstar,

Impressive that it works with a PIC16. I was considering trying to duplicate the application notes with the dspic30f2010, since I'm much more comfortable with them (the page bits on the 16 and 18 series always made me uncomfortable).

Thanks for pointing this out!
By quixfz
#66067
Cannibal wrote:Thanks quixfz,

Is that your drone page? If so, pretty sweet, and nice hovering vid you have there.

Given the description of the sequence on that page, it sounds as though it's recommended to do the initial connections sans battery to ensure the signal is a clean 'full throttle' when the ESC gets power.

However from your description of "you can do this by providing a 2ms signal right at startup" I'm guessing that in your project you do this as part of your embedded system startup? (Thus the beeping motors?) :)

Also, since you seem to know a lot about this, I may as well ask what the colour coding is on supersimple servo line - I can guess black is ground, but which is the PWM in, and what is the last wire for?

Thanks again.
hey thanks!

yes, i have kind of hardcoded this at startup. after checking for a receiver signal, it checks the current position of the throttle stick, if over 50%, it starts ppm-output with 2ms, then in the gyro-calibration loop (which lasts 5 seconds) it continously checks the throttle-stick and goes to 1ms when it's below 50%. so i do it manually after the two beeps. but it could be done automaticly.

black is ground, white is the ppm signal (5V is high), and red in the middle is power. servos take power from this line, (brushless) speed controlers (with bec) provide power through this line.

a very very nice side-effect of this is that you have 4 independent and very clean 5V power sources!

in my case one is running the gyros, one is for the two 3.3V regulators (one for pressure sensor, one for accelerometer and 3.3V-5V conversion), one for the stuff (gps and serial-lcd) connected on serial port (servo like connectors, gnd, power, and TX or RX) and one for the cpu and receiver
By VStar650CL
#66068
You're quite welcome. It works even better and faster if you port the code up to an 18F, which isn't too difficult. Or you can port down from the '690 to the '616 (that's already in the code) and go really small. Happy if it helps, enjoy. :D