Control PPM ESC with Arduino

I have disassembled an old drone I had lying around and harvested four BLDC motors and their ESC's from it. The ESC's have four Pads:
Power +
GND
PPM
GND

I would like to control the motors with an ESP8266. I tryed using the liberary PPMEncoder, which didn't work, because the sketch wouldn't compile.
It would be ideal if I could control the motors via ESPHome.
Does somebody know how to do this?
Thanks

Despite the labelling of the pads, have you tried the standard Servo library ? I assume that the pads marked GND are joined together

I have tried using pwm for lights in esphome, but not the servo liberary.
And yes, the gnd pads are joined together

Update: I tried it with the servo component in esphome, doesnt work.
When I plug the 12v power into the wall (since the motor originally ran on 3s lipo) it just does its three beep boot sound, then beeps every i'd say 3 seconds (it does the exact same thing, when nothing is connected to the ppm pad).

The original drone probably required the controls to be in a certain position before it would arm. At the very least I would think that the throttle will need to be at its lowest

When I plugged the ESC in, the throttle was at 0.
But I remember it doing theese sounds, when the drone was off, but the battery plugged in. When I would turn the drone on, it would do some other souds.

I assume that you have not got the original transmitter

I actually do have the Remote, Reciever, and Control boards.
But there are some wires cut off, so it could be somewhat a challenge to hook everything up.

I also have an oscilloscope if that helps

Probably not unless you can measure what coms out of the controller board

Does the controller board have any identifying markings on it ?

Yes, but not very useful ones.
Here is an blog post from some spanish guy who disassembled a very similar one with (mostly) the same parts. (He has the x21 and I have the x16).

And i can measure the signals that are coming out of the board

Now I reassembled some stuff in order to measure it.
My findings:
When the drone gets turned on, it sends a signal with 1ms high, 1.5ms low. --> Motor is off

1ms low, 1.5ms high --> 100%power

As I mentioned above, it is common practice for the drone not to be armed unless the transmitter controls are not in a safe position when the drone is turned on. Either that, or there is a requirement for the sticks to be moved to particular positions to arm the drone once both the transmitter and receiver are turned on and a link has been established

Here is the best explanation I have found so far on PPM.

The last paragraph provides a lot of information. The pertinent data is encoded in the time between pulses.

I have not found anything that explains how each servo, or in this case each ESC, determines which pulse belongs to them. In the current case it may be hard coded because of it being a mass produced item.

I seem remember having read a bit about Futaba’s S-bus servos having to be configured before use. I cannot even say that S-bus is a PPM implementation or not.

I have read in several articles that converting PPM to PWM is a trivial process. None show how it is done.

The clue is in the "position" part of PPM - the order of the pulse, relative to the longer inter-pulse sync signal is it's position.

Decoders used to be a simple counter, with an RC to reset it when the decoder detected the longer gap between pulses.

Yes, I understand that part. The traditional receiver does that and sends the PWM signal thus decoded to a specific servo port on the receiver. But how does each servo on a single signal line determine which of the several pulses belongs to it?

It works!!
Using an Oscilloscope i found out I need an pwm signal with 400hz.
40% duty cycle --> off
60% duty cycle --> 100% power

I am controlling it via esphome and home assistant

TADA! Mark your own last post as the solution to the problem.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.