Using a bushless ESC with the serial servo controller

Hi,

I recently posted a topic for correctly using the serial motor controller. But now I found out that I should better use brushless motors for what I do.

From an other posting I learned it would be possible to connect a normal brushless ESC to the servo controller.

I have all here, the serial servo controller, an EMAX 18A ESC (arkai.de) with the correct motor, but it still refuses to work correctly…

I have the SSC-tester utility here with cygwin and sometimes the motor quivers a bit or even runs - but it’s always unreproducible.

After reading the servo controller manual for the 101st time I realized the “Command 1” in pololu mode - “Set Speed”. But by using this in my programming, nothing happened.

What can I adjust to make the motor run? The range setting maybe…?
In my own program I tried setting the parameter with direction=forward, servo on and the default range, which is 15.

Any hints are greatly appreciated :slight_smile:
Werner

Brushless motors are cool, what are you planning on using yours for?

I would start by trying to narrow down the problem to either your computer & servo controller or your speed controller & brushless motor. If you can do this we’ll be in a much better position to track down the specific problem.

Do you have a working hobby servo you could plug into your servo controller? If that works, you’re setup is fine, and should work just as well with your ESC. Also, if you’re not sure of your cygwin setup, you could try this test program for windows:

gpsbots.com/tutorials/vb/pololu_controller.php

As the program window says, this test uses Pololu mode, so make sure the Mini-SSC-II mode jumper is off (which it should be already for the cygwin test program, hey, that could be your whole problem!).

If that’s not it, do you have a working radio-servo controller to test your ESC and motor with? I’m having trouble finding a copy of the 18A manual on-line, but websites keep calling it a “programmable” ESC. You may need to do some initial setup for things like response range and emergency cutoff voltage, using either the Pololu or radio servo controllers. This might be a one time thing, or something you do every time you start it up, but in either case it should just be things like maximum for three seconds, then minimum for three seconds. I’ll look a little more for the manual.

Hi nexisnet,

thanks for your response!

Those are meant to power a small blimp :slight_smile:

I already have the servos working with my pc. I used the cygwin ssc-tester for a start and created a java program later which does basically the same. I removed this jumper from the board (which really was a problem at the beginning…) for Pololu mode.

I tried the visual basic tool - thanks for it! - but it refuses to work with my port number (I have a virtual com3 as I use a usb to serial adaptor on this pc). but it’s looks alot like the cygwin thing - are there important differences?

The ESC manual is indeed terrible, I just have this piece of paper:

infinitebizz.de/robotics/arkai_esc.JPG

I have no radio controller here, unfortunately. I hoped for a default setting - and the motor works “sometimes” so I guess I just didn’t find the right “words” yet to convince him to work continuously…

I am currently writing a little test program and just found out the motor moves a bit (7bit-position mode, command 2/pololu mode) at position ~80 (of 127), almost no matter which range setting I use. Hm… crazy thing. Do you have a working ESC with the controller?

Do you know if it had to be set by using a position command or a speed command?

thanks a lot for your help :slight_smile:
Werner[/img]

Glad to see that the problem isn’t your fault.

The visual basic program isn’t substantially different from the cygwin example, I just find the standalone executable program useful, since I don’t have to install or set up anything else on whatever control computer I happen to be working with. Since you already have a working setup (plus it was a learning experience for you) there’s no reason you shouldn’t stick with it. I remember having some trouble with the com-port settings too.

I have run DC motor ESC’s (ment for RC cars) with my Pololu micro ssc, with no trouble whatsoever. My ESC’s were “programmable,” but had a button to hold to enter programming mode. They try to make ESC’s like yours (meant for model aircraft) as light as possible, and sometimes start omitting niceties like pushbuttons. The “beeps” your controller uses to communicate with you are probably made by vibrating the brushless motor, rather than with a buzzer (neat!) to save the weight.

Actually, since your controller does buzz (somehow) and doesn’t look from the pictures like it has any indicator lights, I would expect it to buzz or play some neat tones when you power it up, even if it’s not connected to the servo controller yet. I am also very confused by the Arkai data sheet, especially that they’re talking about servos, as the ESC itself has nothing to do with servo motor control. Did it come as a set with a radio receiver or something? Anyway, the power selecting part at the bottom sounds like a potential source of trouble. What are you using to power the ESC?

Some ESC’s make you do a range calibration or some other setting every time you start them up, but since you have to do something special to get into programming mode of yours (power up with the throttle full on) I would assume that it normally starts up with default or previous settings. If you do want to try programming mode you can use your Pololu controller, just send it a position command towards one extreme while switching the ESC on. I’m not sure which extreme it will want though, or how extreme might be too extreme for your ESC, so you will have to figure it out.

The speed of your ESC, and any programming of it, will be done with the “position” command you send to the servo controller: i.e. the same command that sends one of your servos to a particular position. The “position” command actually sets the width of the pulse-width-modulated signal both your servos and your ESC use. The servos use it as a reference for the position you want them in, and the ESC uses it as a reference for the speed you want.

The “speed” command for the servo controller (command 1) has more to do with how a change to the PWM signal is made. The default setting is to just send the new pulse width right away, but the “speed” command (command 1) makes the controller send pulses of intermediate widths over time when you change the “position” command. This has the effect of slowing down your servo as it moves from one position to another, and would make your brushless motor change more slowly from one speed to another (which you might want), but it would still reach the final speed specified by the “position” command. Confusing, isn’t it? For now you should never need to use the “speed” command.

-Adam

Hi Adam,

thanks a lot for your help!

You are right, the ESC uses the motor as a buzzer :wink: But the beeps are different from those in the manual - more like a short notification sound.

I think the batteries are a point worth of investigation. I am using 10 AA cells, but having read a lot about batteries today, I suspect they are not capable of delivering enough amps to that motor.

Unfortunately, I don’t even have all of the same type, two are 600mAh (NiCd), the other are 2100mAh (NiMH). I have tested the maximum current delivery by connecting both poles to my indicator (was that right…?). I says 2-3A at most. If I understand right, the motor would draw at least ~10A and so the batteries are not suitable.

[See a description at this ebay item:]
cgi.ebay.de/EMAX-CF2812-Outrunne … dZViewItem

What do you think - do I have to buy those Li-Po accus or could I also use some wall adapter to get started?
What are you working with?

A question on the programming:
When I would use a standard radio control, I would hold the “UP” position all the time to speed the motor - this should actually send pulses to the controller/to the ESC all the time.

Is this mandatory or is it enough to send a position command only once - and the ESC would save the value and keep on running?

I also tried to send max/min values but it showed no effect at this time. Now I understand the speed setting better - as a programmer I am used to that kind of confusion :wink:

Again, thanks for your help, your responses helped to switch on some lights in my brain… :wink:
Werner

Mixing cell sizes/types is not the best thing to do, but it’s only bad for the cells themselves, not your motor. The maximum current batteries can supply depends on their chemistry, but also the type and brand of cell. Alkaline batteries can be pretty wimpy, and this could be your whole problem. It would certainly explain the ESC “booting up,” but producing only marginal movement of the motor.

If your “Indicator” is an amp-meter, you can measure the current going to your motor by putting it in series with the battery pack. If you’re saying that you connected directly to both sides of your battery pack, that wasn’t really the best thing to do, since you’re basically shorting the battery to itself. That will draw lots and lots of current, more than is necessarily to safe for the cells (so the amp-meter reading isn’t even useful) or for the meter, and it can damage your batteries. DO NOT do that with Li-Po batteries if you get them: aside from permanently damaging them, they are prone to BIG FIREBALL EXPLODING:

http://rchomepage.com/~dna/LipoFire.wmv

Actually this isn’t very common, but it does happen.

The no-load current of your motor is only 0.9A, so if you have just like a little piece of tape on it (i.e. not a propeller) your batteries might do, or could use a wall adapter to start. Most wall AC Adapters make less than 2A, and the big ones for laptops or mini-fridges top out at around six, so this isn’t a permanent solution. Just check the current capacity printed on the adapter.

In general, rechargeable batteries are the best for high-current things like your motor. I use mostly Lithium Polymer cells for their high power to weight ratio, but they’re also kind of dangerous (so be nice to them) and expensive. Most Lithium Ion, NiMH, and some NiCad battery packs will be up to the your challenge, the important thing is to check the max current safety rating on the pack before you buy it.

As for position commands, you are correct that your ESC must get a constant signal from the SSC to keep the motor turning, but the SSC takes care of this for you. Each of the channels on the SSC starts out off (i.e. the SSC isn’t sending a signal out that pin). When you send any position command to that channel, even a neutral position command (zero speed for your ESC) the SSC will start sending a signal, and keep sending that signal until you tell it a new position, or turn the channel off with command 0.

Okay, great - I made it start today! After buying 10 Sub-C cells I got things moving :slight_smile:

I am still not sure about the calibration, but it now takes the position commands and adjusts (more or less precise) the motor speed to my position value.

I am now charging the pack and will test again tomorrow (if it doesn’t burn tonight).

I was basically aware of shorting the cells by setting the amp-meter in between the poles. But I think the device has some kind of fuse as the cells were not even getting warm (testing max. 3 seconds).

Thanks for giving me an idea how the controller works - I almost expected to have to send signals all the time which wouldn’t be best practice… :wink:

Thanks for that movie anyway, I think I killed one of my laptop (Li-Io…) packs indeed - probably just the electronics… well, they weren’t good anymore anyway… sniff…

I think I will have to use Lithium Polymer later too as weight really maters for my purpose.

Those LiPo packs seem to mostly consist of several cells - do they always have the same size? Because - instead of using maybe 8 cells for one package - one could just have a single big cell which should save some weight, too.
Is this available somewhere? Otherwise I will have to buy half a dozend packs which is neither cheap nor elegant.

Thanks for your great help! - This avoided me to bump my head against one of my monitors or eat the controller :slight_smile:
Werner

Awesome! Glad things are coming along.

Lithium Polymer (LiPo) batteries are funny things. The individual cells aren’t hard cylinders or rectangles, so much as vaguely rectangular foil sacks. Each sack is a cell, and each cell in a pack adds 3.7V to the nominal voltage. The cells come in a variety of sizes, and the size is generally proportional to the power capacity (mili-amp-hours) of the pack.

Below is a picture of three different pack sizes used by my lab (on a 1/2 inch grid):

Each pack has two cells stacked together (you can see the split) and therefore produces a nominal 7.4V. The power capacities of the three packs are (top to bottom) 2,000mAh, 1320 mAh, and 730 mAh.

You can use a 2 cell 7.4V or a 3 cell 11.1V pack with your motor and ESC. 3 cells will give you higher voltage, and increase the top speed of your motor, but won’t necessarily give you the longest flight time/weight. You may find that the limiting factor in your battery selection is the high current you need to draw.

The size (power capacity and physical dimensions) of the individual cells in the pack, not the number of cells, determines the safe discharge current. The picture above shows three different 2 cell packs from the same manufacturer, and the middle one can (safely) continually supply 17A, while the small one can only continuously supply 9.5A. In general, the larger the power capacity of the individual cells, the higher the current they can supply.

Now, if you do end up getting LiPo batteries they will come with a HUGE safety sheet, but here are some of the highlights:

Be nice to your batteries. Don’t bend/tear/puncture the cells. Don’t charge the cells too quickly, charge them higher than 4.2 volts/cell, or discharge them lower than 3 volts/cell. Doing any of these bad things can cause the batteries to swell up, leak, or (maybe) explode in a horrible fireball of death. You can and should get packs with protection circuits that will cut the cells off if they are being charged too high or discharged too low. You can also get separate low voltage cutoff circuits for your blimp.

Don’t short the cells! Aside from the danger of battery damage and explosion, there is the heat involved. LiPo’s can discharge huge currents when shorted, and as my 11’th grade physics teacher famously said “It’s the amps that make things hot.” I have heard of people shorting these things to watches or bracelets and getting horribly burned. One set of batteries I bought came with a warning that if you shorted one across a gold ring, the ring would vaporize and sever your finger. I don’t believe that for a second, but it would suck.

You will need a special charger for LiPo batteries, and even so, you’re not entirely safe. Depending on how “smart” your charger is, you may have to set the number of cells in the pack, and the charge current. Setting either of these two high can cause the afore-mentioned horrible fireball explosion.

You can also get special packs with extra leads that go to each individual cell, and a “balancer” (in addition to a charger) that will, well, balance the charge on each battery. I may get one of these for the helicopter robot I’m working on now, because they let you safely squeeze a little more power into your pack. I haven’t really felt the need for them yet though, and the special batteries and balancer are more expensive. Actually, everything having to do with LiPo batteries is expensive, but sometimes worth it.

Don’t let me scare you off of LiPo batteries with all this, they really are awesome. My lab has been using exclusively LiPo batteries in our robots for over a year now, and we have had some brief shorts and bent/dented a few cells without incident. The worst thing that has happened is that we ruined one pack by leaving it plugged in and switched on over a weekend. It drained down to zero (no cutoff circuit! Bad!) and got all swollen. We followed the safe disposal procedure of soaking the cells in salt water for a few weeks, then threw them away. That’s it, no big fireball.

This seems like a lot of power for a “small” blimp. What is “small” to you, or is it just going to be an incredibly fast, small blimp?

-Adam

Hi Adam,

okay, sounds cool but also too dangerous to play around with for the moment (I will have to clean up my mess here before buying some…) :wink:

Anyway those will be the right choice for the “small” blimp - which will have around 5 cubic meters volume - this still depends on the weight of all the stuff it will have to bear. Speed doesn’t matter that much but it needs power to withstand possible winds.

The thing is meant to bear a camera and shoot pictures from above. I don’t wont to land every ten minutes and need enough power to stay there for several hours.

Unlike a plane, I don’t need much power to stay in the air but to maneuver and balance thermal and pressure differences. Actually my energie source of choice would be radioisotope battery, but so hard to obtain… :wink:

There is still much work to be done, despite the difficulties the electronics and computer parts will be the small part of it all.

Btw, I think this battery balancer is also a nice feature, it is probably meant for charging as well as for discharging, or?

What are you working on, do you do robotics for fun or on a professional base? For fun or not, it’s very time consuming… but always fun after something is brought to work :slight_smile:

thanks a lot
Werner

Wow. Okay. When you said a “small” blimp I was thinking you meant something like one of the ones from rctoys.com, but those top out at 5 cubic feet (0.14m^3). What’s the rule, 1kg payload per m^3 of helium? Woah.

Anyway, yes, you will want to go with Lithium Polymer batteries eventually. Like most technology, they’re totally safe except for when they’re not. Some (all?) I-pods use LiPo batteries now too, doesn’t that make you feel safe?

The cell balancer is only meant for charging multi-cell battery packs. It keeps all the cells in the pack at the same voltage as they charge, and cuts off the charger if any one cell goes too high. This doesn’t technically increase the charge capacity of a brand new LiPo pack, but it does seriously reduce cell aging, so it’s a good investment for applications like yours where you want every last possible second of operation.

I do robotics for work and fun, sort of at the same time. I am a master’s student in mechanical engineering, and I have worked in robotics labs at both my undergraduate and graduate universities. Right now I work as a researcher at the Mobile Robotics Lab of the University of Michigan, which is both paying for my master’s degree, and forcing me to learn much more than from the classes I’m taking. Until a few months ago, I had worked primarily on serpentine (snake-like) robots, but I just got started on a quad-rotor helicopter robot project. It’s definitely a great position to be in, blurring the distinction between high-end hobby and professional robotics, with research grants (sometimes) to help finance everything. It’s also a lot of work, especially being a full-time student at the same time, but I have been able to cope this long.

-Adam

Well, yes around 1kg per cubic meter, but it depends on the temperature, pressure[/height]. This is for helium, hydrogen has even more but it might give spectaculous effects together with the exploding LiPo’s :wink:

I am actually software developer and new to all this hardware stuff, but I think I will like it as much for the aspect of “seeing what you’ve done” unlike with programming database backends…

I do this as a hobby project by maybe it becomes more professional (that’s how my software business started…) :wink:

thanks
Werner