PWM codes to program an ESC

This site may earn a commission from merchant affiliate
links, including eBay, Amazon, and others.

ruzsajanos

Fairly New Member
Messages
4
Reaction score
7
Hi,
could somebody tell me the codes for programming an ESC through the PWM signal?
I mean, case you want to do this, everybody uses an existing RC device - but in fact, any of these devices makes nothing else, then send a certain puls trains.
Yes, I know, that there are existing codeing cards. Please just send me the protocol: what do I have to send to the ESC, and which answer will I get back, after the ESC receives accepted or not.
Waht I have in the front of me, is a simple chinese ESC (XXD HW30A 30A ESC Brushless Motor Speed Controller RC BEC ESC T-rex 450 V2 Helicopter Boat for FPV F450 Mini Quadcopter Drone), which starts with the 1 ms starting puls, and reacts on the 1 ms ... 2 ms speed control pulses.
 
Hi @ruzsajanos,

The PWM protocol is well documented everywhere. If you use an arm based microcontroller that comes with a PWM IP inside then You can pick any RC opensource quad copter projects on GitHub for driver reference.
Popular ones are betaflight, inav, ardupilot.
If you use a simpler microcontroller without PWM support in the chip then you use gpio method which will be more software intensive.
Googling PWM with gpio give you lots of answers to chose from.
PWM is not specific to RC world, it is a known and well documented method to drive analog devices with binary logic.

Hope that makes sense,
Have fun!
 
Hi @ruzsajanos,

The PWM protocol is well documented everywhere. If you use an arm based microcontroller that comes with a PWM IP inside then You can pick any RC opensource quad copter projects on GitHub for driver reference.
Popular ones are betaflight, inav, ardupilot.
If you use a simpler microcontroller without PWM support in the chip then you use gpio method which will be more software intensive.
Googling PWM with gpio give you lots of answers to chose from.
PWM is not specific to RC world, it is a known and well documented method to drive analog devices with binary logic.

Hope that makes sense,
Have fun!
Hi, you missunderstood me. I know, what pwm means.
I want to get only a simple table: which command ( single impulse or impulse train), which meaning for the esc.
For ex: a single 1ms impulse means: zero speed. After this, if i send 1.5 ms impulses, at 100hz for ex, means medium speed.
But the esc is programmable.
I don't want to reverse engineer a programmer. Just the command codes.
 
Hi, you missunderstood me. I know, what pwm means.
I want to get only a simple table: which command ( single impulse or impulse train), which meaning for the esc.
For ex: a single 1ms impulse means: zero speed. After this, if i send 1.5 ms impulses, at 100hz for ex, means medium speed.
But the esc is programmable.
I don't want to reverse engineer a programmer. Just the command codes.

There is no commands, it’s only PWM. It’s you when you “program” the ESC you tell it what pulse is the min, what pulse is the max and after that he is able to extrapolate the values in between. There is no fixed value for all the ESC. That’s why they need to be taught (end point).
During programming (voltage, direction, punch …) the ESC goes to a state machine and it is using PWM to still go to selection an option or an other.
There is no specific pulse for a specific command.

Those are not Spektrum ESC we are talking about. Spektrum ESC have special protocol when used with Spektrum RX.
Spektrum ESC can detect RX spektrum and default to PWM only (no bidirectional communication for telemetry).

Make sense?
Sorry it’s possible I am not understanding what you are looking for.
I apologize in advance.
 
Look at this post: https://www.arrmaforum.com/threads/control-spin-direction-on-a-bldc-with-esc.50777/
He asked exactly what I am asking: "...I would like to know which comands uses a programming card to configurate the ESC to send directly PWM signal to the ESC to configure the different parameters of the ESC...."

It just do not work that way on the PWM port.
there is a state machine on the ESC side that goes through a predetermined sequence (order of feature) and waiting for a PWM input to decide to go into that feature to let the user select the parameter number (also using PWM as an input).
programer use a specific protocol through the programming port of the ESC so they do not have to mimic the PWM wave.

If you want to mimic ESC programming on the PWM port you have to mimic the user:
1)put the ESC in programming mode.
2) wait a few second (depending which feature you want to program
3) to select your option send a PWM pulse (equivalent of the full throttle, pulse width depend on your endpoint).
4) the esc will go through that menu and wait for you to select the parameter
5) wait s and send a PWM to select that parameter.
6) turn off the esc to save.

There is no command based on the pulse.

Each ESC has its own programming sequence (that’s the one indicates in the ESC manual). There is no programmer that will work for every ESC because they have different menu. But they are all based on “wait/no input” to go to the next menu and “send PWM pulse” to go inside the menu/select the parameter.
You can no skip and go directly to the next feature, you have to wait a few second for the esc state machine to skip to the next feature.

I hope this is clearer.

Programming port is a different story. They probably can access the esc memory like a table with offset and change the new value directly. I can not speak for those, every brand would have their own protocol.
 
If you're referring to programming through the program port.... Good luck. Every ESC brand has their own proprietary programming language they use and it's not as simple as PWM signals. Just buy the program card because it's far less expensive than trying to figure it out with expensive equipment.
 
Yeap i totally agree and I stated that exact same info in the previous thread. The details are for the PWM port.

The programming port protocol is vendor specific.
 
Old Thread: Hello . There have been no replies in this thread for 90 days.
Content in this thread may no longer be relevant.
Perhaps it would be better to start a new thread instead.
Back
Top