Netherlands
Asked — Edited

How To Use Rc Esc As Motor Controller

I have made this thread because I use them (for about 4 months now in my robot) and I have noticed lots of people struggling with h-bridges. So I hope you all can use it and understand what I'm trying to tell. (THEY ARE EASIER!!)

What is an Rc ESC? An Rc esc is a motorcontroller used in about every electric Rc Car/plane/boot and every other Rc vehicle in the rc world that is more advanced than your standard $5,- toy. ESC stands for Electronic Speed Controller, it uses the same plug as your standard servo. And will work with the EZ-b.

User-inserted image

ESC types: There are 2 types of ESCs, this is because there are 2 types of electric motors. You have brushed and brushless motors. The differance is that brushless motors last longer and provide greater speed. Brushless motors also have 3 wires to control it, this means that there is a special type of ESC for it. A brushless motor has 3 wires because it has 3 coils inside. They are also known as a three-phase inductionmotor (they are brushless because they generate a rotating magnetic field which makes the anker, the thingy that is attached to the axle of your motor rotate).

How they work: ESC's for brushed motors puls of the maximum voltage to the motor, the faster the pulses the faster it will rotate. ESC's for brushless motors work in a simular way but they let the brushless motor create a rotating magnetic field by powering 3 coils, The faster the field is rotating, the faster the axle will rotate.

Brushed:

User-inserted image

Brushless:

User-inserted image

NOTE: there is a third type of esc but this one exists within brushed and brushless ESCs. These ESCs are different because they make the motor rotatie only one way, these are mainly used for rc airplanes and helicopters (where only one way of rotation is required).

How to wire it: Every esc has wires specified for the motor and the battery. So with brushed motors you will have 4 wires, 2 for an electric motor and 2 for the battery, a servo plug and an on/off switch. With brushless motors you will have 5 wires, 2 for battery and 3 for the motor and ofcourse a on/off switch and a servo plug.

So... Connect the red wire to the + pole of the motor and the same for the black wire. Same for the battery. There is almost noway to do this wrong! As usually one side of the ESC is for the battery and one side is for the motor and if not it will be written on it. Yes it's soooo easy! Note: never mix up the battery with the motor, you might fry the esc. Next up is connecting it to the EZ-b. And tadaaaa you have everything connected.

User-inserted image

How to use it in ARC: As an electric motor can rotate two ways (back and forth), the neutral stance will be the middle of a vertical/horizontal servo control in the ARC. And that is 35, since the v13 update. To make the motor rotate move the bar up or down. Note: it will not work automaticly with the modified servo panel. It does work with Movement Panel but then you will need scripts.

As we now have achieved to make it rotate you can also use it with the movement panel, for everyway of motion I have created scripts to slowly start it up and slow it down. As it will jump directly to the speed you have set. There are 5 scripts required for each direction if you want to use the modified servo panel.

Script (when using 2 esc): servo(d0, 35) servo(d1, 35) sleep(50) servo(d0, 39) servo(d1, 39) sleep(50) servo(d0, 42) servo(d1, 42)

If you notice that one of your set of wheels is rotating the otherway around, then deduct the amount that you are adding to the 35 of the 35 ( 40-35 = 5 --> 35-5= 30)

Pros:

  • Masive speed, up to 160mph (fastest Rc boat, I've seen, maybe even faster).
  • Automatic lipo cut-off, this protects you lipo batteries from getting drained to far.
  • Brushless motors
  • Low prices.
  • For every motor there exist an ESC.
  • Most ESC's have an automatic BEC, BEC stands for Battery Eliminator Circuit, in the RC world the BEC is used to power the receiver(they usually give of 5v at 1 or 2 amps). In my experience with the EZ-b I have noticed that the batteries powering the EZ-b have lasted longer when I have my ESC's turned on, instead of off.

Cons:

  • You will need scripts to control them with a movement panel.
  • There aren't as much ESCs for brushed motors as there are for brushless motors, because brushless are so much better (in the rc world though).
  • They only work from a certain value to a certain value, when used like a servo in ARC .

Important things when using a ESC:

  • Always power up the EZ-b before the ESC. Most ESC's their neutral position is set buy the first signal they receive from the
    object it's connected to. And here is where the config of the connect button comes in, you can use that to creat a boot sequence which would set your servo position to 35 ,which is the neutral position.
  • Always turn of the ESC before the EZ-b, it can suddenly run of! If not, just do it, else you EZ-b wont turn off. This is because the BEC, BEC stands for battery elliminator circuit, when it's used in a rc car you don't want to carry batteries around, so they came up with BEC you could then ditch the receiver battery and use the battery you use to power your electric motors.

How to pick an ESC: ESCs are available in about every size up to 320A up, maybe even more. ESCs are rated in Amps, so you first pick your motor and then the esc that matches it.

Example: I have a 25A motor. Then you could buy a 25A ESC, but it could occour that you wheels or what ever get jammed and your motor could drain a bit more like 30A or more, this would fry my ESC... So I am choosing a 30A ESC for a tollerance of 5A. You could choose a higher tollerance, thats up to you. Almost all ESCs are able to burst power for 5 sec and 1 sec. Ofcourse the 5 sec burst is less powerfull than the 1 sec. In a burst they can double their output current, but briefly to prevent damage. Note: An ESC can get very hot, for rc racing cars they have ESCs with a small fan on top of it. Also if you pick a higher tollerance, it will take longer to get hot or wont get hot at all.

Next thing you look at are the batteries for it. They are displayed in the amount of battery cells or in voltage. When displayed in cells there are 2 ways, for Lipo and nihm. Most of the times they are displayed both so users can stay within budget as Lipo batteries are expensive.

The lipo way: 1 lipo cell is 3,7 volt, this means 2 cells are 7,4 volt and so on. They are displayed on the ESC like: 2s-3s or 2-3 lipos, this means it alteast requires a 2 cell or atleast 7.4 volt to work.

The nihm way: 1 nihm battery cell is 1,2 volt, this means that 2 cells are 2,4 volt. On the ESC they are displayed like: 8s -12s or 8-12 nihm.

The difference between Lipo and Nihm: Lipo batteries provide a larger amount of current per second than nihm batteries, this means you can go faster with Lipo batteries.

Things you look at when buying an ESC:

  • Brushed or brushless, this compleetly depends on the motors you are using. NEVER and I mean NEVER try to connect a brushed esc to a brushless motor or viceversa!! Only if it is specified on the esc that you CAN use a brushed and brushless motor!
  • Is it able to rotate 2 ways, it will be displayed as "reverse" if it's not displayed or you can't find it in the specs, contact the seller or try to find more information on that ESC.
  • Does it have a auto cutt-off. This is VERY important when using Lipo batteries! You can destroy your Lipo batteries if it doesn't have this function. This function will stop your motor when the voltage that the is supplying falls under a certain amount (the minimum per cell is 3v, lower than that and it will DIE!!) and it will drain only a ver small amount to keep the ESC alive. Also handle Lipos with care. They can explode or start a large fire.

How to pick batteries: ESCs channel the voltage of the battery to the motor, so if your battery is 7,4 volt your motor wil receive 7.4 volt (not sure about the channeling part, I'll try to find out how that exactly works)

The lipo way: Using the examle of 7.4v you will need a 2s lipo, but there is more. A has 3 points of interrests:

First: the amount of cells (s). The more cells, the more voltage.

Second: the amount of energie stored inside (mAh). The more mAh the longer it'll last

Third: the amount of coulomb (C), those who know know what coulomb is ,but for those who don't know what it is. Coulomb = Amps per second. The more C the larger the amount of current per second that will go to your motor, this also means the more C you have the faster your battery will be empty (depending on the amount of mAh).

A forth point to always keep in mind: will it fit in your robot!

The Nihm way: Still using the example of 7.4v. When using nihm batteries you will never be able to get 7.4 volts, thats why it is written on the esc how much nihm cells you would need. Usually it's 6 cells or 7 to reach 7.2v or 8.4). When buying nihm batteries you should look out for:

The amount of cells. The amount of mAh, the more, the longer they last. The size.

For now I think I have told everything you need to know if you want to use an ESC, how to control it, how to pick it and even how to pick batteries. If you have questions, just let me know. Also check out my robot, it uses ESC to power it's motors.


ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

Netherlands
#2  

Oh thanks man, I've been typing for over an hour :P. But you can get Rc ESCs at lots of places:

  • At you local Rc hobbystore, they can probably tell you which one you would need if you are using a specifick motors.
  • All other RC stores on the internet/ the real world.

My personal favourit places to get rc stuff:

-Ebay, just type in rc esc or brushed rc esc or somthing like that. -Towerhobbies ,they have lots and lots of ESCs and more. -HobbyKing, this store also has lots and lots.

The ones I'm using in my robot: Back to ebay, They're still working great, the have a reverse, auto cut-off and they are also available in larger versions.

But the ESC you need will always depend on the motors you want to use. It isn't one size fits all. That's why there are so many:P and thats why I created somthing where some one could learn from how to pick one.

Spain
#5  

Budel0 good work! I find very interesting your work, I also use rc esc for my planes, but was not sure I could use with EZ-b. I have a draft: robot with brushed motors and have a good prices and stores to find them. But then work with the servo panel moviminto changed? although you have to do a script for each direction To my knowledge there are two panels of motion: 1: panel modified servo motion 2: h bridge motion panel I seemed to read that panel does not work with modified servo motion and then if it works, I do not understand or is this script to make 5 up front, back, left, right and stop, each responds when actions panel arrows to move. Sure it effectively explained, but the technology leaves some Herror google translator in the translation I can not understand. Thanks in advance, if I can clarify this, I see a bright future for the two-way pair esc our robots, especially by a speed accuracy. eek

I plan to buy two esc like this:

www.r2hobbies.com/eng/proddetail.php?prod=rcvp3310002

Netherlands
#6  

Hi , You can use the "modified servo movementpanel" once you created individual scripts for: forwards, backwards, left, right and stopping. Then you can use the "movement script" to start the scripts via the "modified servo movementpanel".

"But then work with the servo panel moviminto changed?" The control via the Movement Panel hasn't changed. In one of the threads I saw or believed that I saw DJ recomending an ESC (atleast I thought it was an ESC), which later turned out to be a h-bridge.

About the modified servo window, I haven't tested an ESC since v12 with the modified servo window... So I am going to test it later today! I just saw that instead of the slow, slowest, fast, fastest there are 255 values... It didn't work because of only 4 values... Now that there are 255 it might work! This might also mean that I have to reprogram:P or not:P

TO BE CONTINUED!

Netherlands
#7  

Here is the next episode:

I have tested it with the modified servo window and I have found that it does not work... With the vertical/horizontal servo it does work but not with the modified servo. I had tried lots of values so...

@PhG You can always add a small heatsink or fan to your ESC's! Mine are mounted to a gigantic heatsink, I call it my robot:P, the chassis is made from aluminium. They will never get hot! Maybe if I run them for days, or 5 hours, as I calculated the maxium time my batteries would last! It could also be 20 minutes, not sure yet:P

#8  

the third wire of the esc is because it's a three phase motor. It's not controlling where is it but it gives the current to continue the rotation. Otherwise it will turn only by 60.

I'm using some on my robot and I think there's no way to control the rotation degrees but only the speed.

@DJ. I think a great function you could add is an esc servo controller

Netherlands
#9  

Oh neverthought that brushless rc motors actually where 3-phase induction motors... I said it was for a thingy passing by because I once read it on a forum... Should have known better:P, I even had a class about it... Last week... Oh well it might have been confusing because it was about AC-motors.

Lol another epiphany... It actually is an AC-motor :P. I'll edit the main text right away!

Spain
#10  

budel0 ok, thanks for the info, now all we want to use esc to motor control and we have a solution, you just have to make five script, with the advantage that we can make a smooth start in any direction as you have explained in your previous example. This is a great victory because the soft start reducers have fewer engine and can do different script for different speeds. excellent:P :P :P

PRO
Synthiam
#11  

I hooked up a brushless motor to the EZ-B last night. PHEW those things spin quick!!!! I used the ESC that was included with the motor kit.

Netherlands
#12  

@R2D2 For my own robot I made a turbo script that gently increases the speed to the max and slows it back down to "normal" speed when I release the button:). I sort of interlinked the five direction scripts together so that all stearing functions I would need are achieved.

@DJ jepp in the rc world people only want speed:P, as do I:P. To fix the problem of getting out of range I just stuck a netbook on top of my robot:P I might also make a thread about rc brushless motors, on how to pick them and stuff.

Ah I'll do it right here... Already set my mind to it:P.

It also fits together with ESC's.

Brushless motors... A brushless motor is a three-phase induction motor(also known as an AC motor), it uses an AC current to power 3 coils, these coils are powered one after another to create a rotating magnetic field. If you'd remove the anker(the axle part thingy) and put in a steel ball it will actually roll around in the motor against the wall!

AC motors which are used the machine industry are rated in Watts and in RPMs. With that data you can easly calculate the torque they will give of. Formula:

T= P/(2piN/60)

T= torque (N/m) P= Power (Watts) N= RPM

A nice fact to know is that if you lower the amount of RPMs you will increase the amount of torque. You can do this with gears, pulleys chains. And the ratio with what you decrease the RPMs by you increase the amount of torque by.

Short example: I have 1500 Watt 1000RPM motor, this means that I get 14N/m of torque this meas that at 1 meter I can exert a force of 14N, or at 1mm 14000N!

But as no one on this forum will ever have the need to spent $5000,- on a motor you wont be looking for AC motors.

So thats why there are rc brushless motors these are small AC motors which everone can afford! In the RC world brushless motors are rated in KV and ofcourse Amps and volts often the amount of Watts are also added (you can easly calulate the amout of watts by multiplying the Volt with the Amps). Weird right KV? Thats why I have examples so everone understands this which took me a few days to.

SO example: I have a 1500KV brushless 30A 11.1V. Now the hard part. The unit KV is used for rotations per minute per volt. So a 1500KV 11,1V motor will do 16650 RPM! Unloaded, when there is a load on it, it will be lower, because of the load...

Rc Brushless motor types: There are two types of brushless motors, you have inner runners and outer runners. The difference is the part of the motor that is rotating. I'm not sure which is better, all I know is that outer runners are often used in rc airplanes and helicopters. And that inner runners are more often used in rc cars and boats. It might have something to do with cooling, or that wires can get stuck in outerrunners when they are placed in small spaces with lots of hanging wires.

How to pick them: You could use the calculation I added to calcuclate how much torque you need or you could just pick one that you seem fit.

How to calculate: You esimate or weigh your robot multiply the weight with the gravitational exerleration (in my country 9,81 m/s easiest way is to pick 10m/s. Makes calculating without calculator easier). So what you now have is the amount of force your robot will generate while it's standing on the ground. Now you devide this number with the amount of wheels your robot has. This will give the force per wheel. Now multiply this number with the beam of your wheel. This will give the amount of Torque required per wheel. Now you have the data of that will not make your robot move! To atleast have movement or movement in a shorter time multiply the amount of torque by 2 or 3 maybe 4. This prevents your motor from easly stalling and it will give you a nice acceleration.

Example: I have a 6 wheeled robot that weighs about 4KG the wheels have a beam of 50mm (50mm = 0.05M) (I work with the metricsystem, way more logical that the imperialsystem:P) 4 * 9.81 = 39,24N 39,24 / 6 = 6,54N per motor 6,534*0,05= 0,327 N/m (torque per wheel) 0,327 *2 = 0,654 N/m (seems like nothing, but it's averige for small motors) I already chose for motors that do 500rpm on 6v with some gear reduction. So modifing the first formula to calculate Watts:

P= T * (2 * pi * N / 60) P= 0,654 * (2pi500/60) P= 34,2 Watt

So now I have the power it requires I can easly calculate the current.

P= U * I U=volt I= current

I= 34,2/ 6 = 5,7 A Now with all of this data you can pick a brushless motor and match an ESC with it!

Note: Always chose the values for the motor or ESC for which you calculated stuff higher that the values you calculated. ALWAYS keep tollerances!! A rod doesn't fit in a hole that has the exact same diameter!

PRO
Synthiam
#13  

@budel0

You can swap the bluetooth module with Xbee or synapse or what ever it's called. There is also WIFI too. A thread on here discusses it. That should fix your distance issue.

Man you wrote lots - very informative. I'm going to need a good sit down to read it all thoroughly:)

Netherlands
#14  

@DJ I first thought about doing that, but then I wanted to add a camera and then the problems started... If I would want a range of 100 meter or more... Then the camera I would want to use would be more powerfull than legally allowed without an "Amateur Transmitting licence"... The maximum transmitting power is 20mW in my country... So I figured I would use a reqular wired webcam and stick in a super cheap laptop/netbook or nettop. Eventually I found one for 40,-, which is like nothing for a complete functioning laptop, after some mods (keybord and battery were missing, also added a SSD) came on a nice price for a mini netbook that is resonably fast. So to sum everything up: I added a laptop so I could use it like a Xbee or synapse and transmit the signals via wifi or I could still bring a camera and when it's finished make it run autonomus without having the problem of ever running out of range from the computer. But as I'm not even close to finishing my robot I'll control it with a wireless joystick.

Oh and srry if I type infinitly long peices of text... It's sort of a habbit... I always try to add pictures:P and make it more bareable to read:P

#15  

Using 4 brushless ESC in my project which has been in progress for nearly 3-4 months. DJ has been a great help in his firmware updates for helping with the project, and much more. I programmed it them through C# forms and the application has turned out nice with 4 different forms for the project.

Netherlands
#16  

@Orwnic82 Oh nice man, I wish I knew how to program C# code... But after a few attempts I figured I'll leave to the pros... Maybe when I find the tutorials/time/program manual for it... Oh got an idea! A "how to" for controlling Rc ESC's with C# code! Then we would cover everything one would need to know about controlling Rc ESC's with the EZ-b. It would help me:P and everyone who wishes to control his robot with C# code and Rc ESC's. I think I'll give SDK and C# another shot... Someday...

#17  

@budel0 I'll be glad to throw something together to show how. I was planning on creating a tutorial on how to build my project anyway, however as of right now there is no stabibility built into it so it can't,well shouldn't, fly yet.Thats almost the only thing left on my project besides creating a sleeker interface.

Netherlands
#18  

@orwnic82 Nice, I know what I'm going to build once my current robot is finished ^^

#19  

@budel0

Start off with the idea that you know how to place tool objects on the form, such as a button. By double clicking the object on the form it brings up the forms program menu and creates the method for the button_click void Button1_Click(Object sender,EventArgs e) { }

First you'll want to declare a global variable that will be used to increment and decrement the servo line. unsigned int servo1_variable = 0;

By placing two buttons and creating their two methods you'll have the ability to click one to increment the servo line up and one to decrement the servo line down.

#region Increment void Button1_Click(Object sender,EventArgs e) {

}

#endregion

#region Decrement void Button2_Click(Object sender,EventArgs e) {

}

#endregion

The variable will be changing and setting the servo line as the button_click is initiated. increment: servo1_variable++; decrement: servo1_variable--;

The next portion is to set the servo lines based on the servo1_variable ezb_connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D0,servo1_variable);

so void Button1_Click(Object sender,EventArgs e) { servo1_variable++; ezb_connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D0,servo1_variable); } void Button2_Click(Object sender,EventArgs e) { servo1_variable--; ezb_connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D0,servo1_variable);

This should give you the result of incrementing the ESC lines up and down from your form. However do remember to place value restriction on the buttons as if you increment the servo line higher then the Servo.Max it will give you and error.

Simply: void Button1_Click(Object sender,EventArgs e) { if(servo1_variable < Servo.Max) { servo1_variable++; ezb_connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D0,servo1_variable); } }

If you wish to use scrollbars instead of buttons DJ has already created a small sample video on his youtube account: www.youtube.com/user/aliencurv#p/u/38/Mvh5Njx7jog

Last note do remember to add the ez_b.dll file to your references also list using EZ_B; Follow the video DJ supplied to add the connection tool to your form.

#20  

@DJ you said...

"You can swap the bluetooth module with Xbee or synapse or what ever it's called. There is also WIFI too. A thread on here discusses it. That should fix your distance issue."

Where is this tread?

Dave

Netherlands
#21  

@ Dave I think he meant to add a link to the "here", but forgot it so I'll add the link, because wifi has nothing to do with this thread. It was meantioned because I had a ranged problem and fixed it by adding a my robot. I also made is connect via USB.

Oh right, the Link:P. I believe it's this one.

#24  

@Alkalla This forum post is so old, and I doubt that Putt Putt still is active. As for your question, I couldn't access the first link, but the second looked promising. Is it a brushless or brushed?

Netherlands
#25  

@Alkalla In theory every speed controller can operate bidirecitonally, it only depends on the firmware it's flashed with if it can actually do it. Because on the inside, you could say a brushless esc would have 6 transistors, split in sets of 2 controlling one phase. These are then controlled by a small processor, that decides which one should open or close and in which order and rate. Creating speed and direction.

As for the linked escs, Horizon already mentioned that the first link doesn't work. However the second esc can have a reverse, if you read it's description you can see that it can be programed to have it. So most likely you'll have to buy the programing card and flash it so it has a reverse. But they aren't that expensive nor hard to use.

Horizon Ouch not even getting the credits for writing this, I might not post a lot, but I'm not dead and even after 4 years it's still one of the most viewed threads.:D But in any case, the core of the information is still the same, I even considered making a tutorial if I had the time to do it. I would love to make so it covers more of drive systems, from the wheels to the EZ-B.

#27  

@budel0 Dear budel0

Really I'm very glad for your prompt reply. I've attached another link above. And I'll tell you exactly what I would like to do. I need an ESC that can be used to reverse the direction of three phase BL motor which I'm using for flight purposes. So I'm not sure I can do that instantly I do not want to let the controller take some time for braking and then reversing the direction. This may cause damage for the system while fighting.

So, my questions exactly are:

Can I reverse the direction at once by RF transmitter? I need an ESC suitable for 6s lipo and reversible, is it available? What is the time should ESC take to transit from forward to reverse mode?

Thanks very much
Alkalla :) :)

Netherlands
#28  

@Alkalla You are indeed correct, the esc from HobbyKing can't handle a 6s lipo. I now know that you are planning on using a 6s. The other one can. Looking through the datasheet it says that you can reverse rotation direction, however it doesn't say if it bidirectional then or just runs the other way. To be absolutly sure have to contact the supplier and ask them if it can run bidirectionally.

The amount of time required to transit from forward to reverse mode really depends on what you're accelerating. And by this I mean the mass, shape of the object and other forces that are placed on it. It also depends on what motor you're using. If your motor has a lot of torque you will be able to accelerate faster. But keep in mind the faster you want something to accelerate/deccelerate the more force put on motor and the object. So if the object is big and heavy and your axle is thin, it will break if you accelerate too fast. You can also implement a brake system if it's really necessary to change direction fast with a large mass. You would then brake until the speed is 0 and then accellerate in to the other direction to the required speed.

You can calculate most of the variables if you have a the required amount of time in which you want to change direction and from which speed forwards to which speed in reverse. With that information you can calculate the required acceleration which you can use to calculate the angular acceleration. Then you'll only need to calculate the moment of inertia and multiply that with the angular acceleration to get the required torque. Based on the torque you can select your motor or calculate if your motor is up to spec and combine it with a fitting esc.

#29  

@budel0 Thanks very much, I really appreciate your help. I'll contact the ESC company to ask for bidirectional rotation. But, do you think ESC requires brake before reversing or it can change directly from forward to reverse mode? I think this may cause damage to the motor?

Netherlands
#30  

@Alkalla It really depends on your application, I have no idea on what you're trying to achieve besides changing the rotation direction of a brushless motor using an esc powered by a 6s lipo. I'll need more information about the application to give more advice.

#31  

What a great idea, i have a a few esc's lying around that i could use, awesome.:)