How to control brushless DC motor speed with my ESC? - Page 1
Forum section: electronics / projects

author: drummerdimitri
author_rank: Frequent Contributor
timestamp: December 12, 2018, 10:23:58 pm
content: So I've bought a brushless DC motor with it's ESC but I have no idea how to control the speed of the motor as the pin-out of the 3 wire cable coming out of the ESC is not mentioned anywhere.I bought a e-bike throttle to mount to my bike as I would like to turn it into an electric one but it does nothing.Can't even get the motor to run. So what is needed to get this thing going

author: maginnovision
author_rank: Super Contributor
timestamp: December 12, 2018, 10:35:08 pm
content: Probably power ground and signal which will probably just be PWM. Pictures, model #'s?

author: Benta
author_rank: Super Contributor
timestamp: December 12, 2018, 11:07:45 pm
content: Pics and more information, please. This is far too vague.

author: drummerdimitri
author_rank: Frequent Contributor
timestamp: December 12, 2018, 11:31:27 pm
content: Quote from: maginnovision on December 12, 2018, 10:35:08 pmSure, here's the link to the ESC/Motor combo:https://www.aliexpress.com/item/HIINST-Waterproof-B3650-4300KV-Brushless-Motor-w-60A-ESC-Combo-Set-for-1-10-RC-Car/32915974680.html?spm=a2g0s.12269583.0.0.2c407ae1RcyE9PAnd this one is for the throttle control:https://www.aliexpress.com/item/Passion-Ebike-36V-48V-72V-Electric-Bike-Thumb-Throttle-Throttle-Speed-Throttle-bicycle-Parts/32476370166.html?spm=a2g0s.12269583.0.0.22913c8beZfUmQI don't have a remote control receiver so not sure how to make this work.

author: kurt
author_rank: Contributor
timestamp: December 14, 2018, 03:35:33 pm
content: As it looks like a regular RC ESC it probably expect a standard RC-servo signal. Which is a PWM signal encoding position command (or throttle command in your case).The standard encoding is pulses spaced ~20mS apart where a ~1mS pulse is 0%, 1.5mS (or actually 1540uS IIRC) is center/50% and ~2mS is 100%.Old analog servos would burn out if pulsed faster than the standard ~50Hz, but digital servos and ESCs normally can handle higher frequencies as long as there is some space between the pulses. 330Hz seems to be a pretty standard refresh rate these days (gives faster response and tighter control loop when gyros for flight control, or governors for RPM control are involved).

author: IDEngineer
author_rank: Super Contributor
timestamp: December 14, 2018, 05:16:13 pm
content: Quote from: kurt on December 14, 2018, 03:35:33 pmAlmost certainly this is correct, though for completeness I will mention there are quite a few more modern control protocols for ESC's out there. SBus is a very common one, for example. However, it's 99.9% likely this one expects the traditional PWM RC signal exactly as kurt described.Easy enough to test: Use a signal generator to set up the waveform with 1mS period and then gently increase the pulse width.Report back!

author: rt
author_rank: Regular Contributor
timestamp: December 14, 2018, 05:49:14 pm
content: In practice most of these lower priced Chinese ESCs have a low pass filter on the 'PWM' servo input so just this just functions as a 0-5v proportional speed signal independent of the structure of the PWM signal.If you connect the main battery power to the ESC check if there is 5volts across the red and black wires first.If yes then most likely putting a potentiometer (e.g 1k or 10k pot) between the red (5v), black (ground) and white (wiper) should give you basic speed control without the need for a PWM generator.rt

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 15, 2018, 07:57:45 am
content: Quote from: drummerdimitri on December 12, 2018, 10:23:58 pmQuote from: drummerdimitri on December 12, 2018, 11:31:27 pmbig wires for motor power, 12V. small wire red, mcu power 5V. small wire black is ground, can be same as big wire black. white is for PPM signal.Quote from: drummerdimitri on December 12, 2018, 11:31:27 pmi think that thing is only a potentiometer with nice pedal for your feet. you'll need active circuitry to translate this into PPM signal. do you have mcu programmer? pic or avr? or arduino or such?

author: beanflying
author_rank: Super Contributor
timestamp: December 15, 2018, 08:07:02 am
content: They can be driven with home brew PWM control. There is an issue depending on the ESC you can put them into programming mode for most of them even the cheapies if you power them on with the wrong PWM input running. Generally speaking 1-2mS PWM is what ESC's understand but some go just over to 2.2 (unusual)Check the instructions and if it didn't come with them go back to the seller and ask for them! You really NEED these.The simple way out is to hack a servo driver similar to these and maybe hack the throttle you have already got into it in place of the built in Potentiometer. Haven't narrowed it down but get one with a Potentiometer control!https://hobbyking.com/en_us/radio-servos/servos-accessories/servo-testers.html

author: drummerdimitri
author_rank: Frequent Contributor
timestamp: December 15, 2018, 09:41:06 pm
content: Quote from: rt on December 14, 2018, 05:49:14 pmI do get 5.7V across the black and red wires so will get a pot and try wiring it out the way you suggested.Thanks for all your replies. Will test them out!

author: james_s
author_rank: Super Contributor
timestamp: December 15, 2018, 10:36:53 pm
content: It's extremely unlikely that a pot will work. This is an ESC for radio controlled vehicles, the signal will be a standard servo PWM signal and the 5V coming from it is due to the internal BEC regulator, it is meant to power the radio receiver. Most of these require the signal to start at zero throttle in order for the ESC to arm before they can be activated.

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 16, 2018, 03:50:01 am
content: if i'm not mistaken 0 throttle is 50% PPM for that land car type rc, less than that reverse with 0% the fastest reverse, more than that forward with 100% the fast and furious.

author: beanflying
author_rank: Super Contributor
timestamp: December 16, 2018, 03:55:35 am
content: Most if not all modern brushless ESC's have a programming mode and a micro of some sort on them they will not like a voltage divider input while looking for a PWM one!Quote from: Mechatrommer on December 16, 2018, 03:50:01 amThis is why the correct instructions are needed some are 0-100 and others are 100-0 some need to be initialized as was mentioned above with a low pulse and some require a calibration of sorts to initialize with the input starting low to high and back again generally with a tone for feedback from the ESC/Motor.

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 16, 2018, 04:31:05 am
content: Quote from: beanflying on December 16, 2018, 03:55:35 amflipping the motor rotation is as easy as flipping 2 wires out of 3 that go to the motor, fwiw...

author: beanflying
author_rank: Super Contributor
timestamp: December 16, 2018, 04:34:02 am
content: Quote from: Mechatrommer on December 16, 2018, 04:31:05 amThat is the control signal not the motor rotation, the arming procedure is driven by the control input. The convention of 1-2mS is not a standard either just a 'normal'.EDIT:Just so some of those without first hand usage this is the sort of thing I am talking about.http://tom-620.bplaced.net/rc_modelle/zubehoer/regler/turbojet/turbojet_80a_esc.pdf

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 16, 2018, 04:52:19 am
content: thats the thing i was playing about and have many in stock, the air ESC type, just not up to 80A, the rc transmitter/controller has flip joystick value capability. the motor is one direction, once the joystick is correct, if motor in wrong direction, 2 wire flip is the trick. that land rc i only saw my brother played it so it must be different since motor can go 2 directions, but i believe 2 wire flip trick applied. one brand came with some programmer pad that i still have no clue how to use, the ESC just works OOB with no programming hassle, just simple up and down and its armed.

author: beanflying
author_rank: Super Contributor
timestamp: December 16, 2018, 04:56:30 am
content: To reverse the motor direction in the case of aircraft or land/water vehicles and controllable direction you are correct that switching any two motor wires reverses direction like a conventional 3 phase industrial motor. So yes you are correct on that.The signal however needs to get the correct pulse series to arm and be programmed in most cases. Some ESC's can be software programmed to reverse also so don't even need a wire swap for a change in direction. Without knowing the operating details of the ESC the original poster has a lot of the advice here isn't necessarily good advice.As you changed your post to reflect yes some have a programming card too like this oneSome of mine are can be hooked up to a laptop as well and then there is the more common stick programming approach.

author: radar_macgyver
author_rank: Frequent Contributor
timestamp: December 16, 2018, 05:22:41 am
content: Quote from: drummerdimitri on December 12, 2018, 10:23:58 pmAs @beanflying mentioned, get a servo tester, like this one:https://hobbyking.com/en_us/hobbykingtm-servo-tester.htmlConnect the control cable from your ESC to the tester, make sure the knob is at zero, apply power. The motor should emit a few beeps indicating that the ESC measured the PWM output of the tester and stored it as 'zero'. Turn up the throttle, the motor will spin.Since they are fairly cheap, get a couple of them. Once you have the ESC working, you can hack the throttle that you bought and wire it in place of the pot inside the servo tester.

author: drummerdimitri
author_rank: Frequent Contributor
timestamp: January 01, 2019, 05:16:37 pm
content: I got myself a function generator that can create PWM signals.I've tried a 50 Hz signal with a 1 ms pulse duration and a 5V RMS/Vpp signal but the thing just wont budge!There are Three wires that connect to the ESC, a black (ground), a red (5V) and a white (signal).I've tried feeding the signal into the ground and white wires but still nothing.Am I wiring thing wrong? What am I missing here?

author: beanflying
author_rank: Super Contributor
timestamp: January 01, 2019, 05:25:07 pm
content: 1mS is generally off. It is a range from 1-2mS square wave for control generally.Failing that do you have an instruction sheet for the ESC?EDIT : Found you an instruction sheethttps://img.banggood.com/file/products/20151229020656SKU308360.pdfBased on this it can be programmed by control inputs so if you get it WRONG you will need to reset the options again.