0

does anyone one know if it's possible to use the Raspberry pi to send packets via pwm? I want to interface the raspberry pi with some escs(electric speed controllers). These escs use Dshot (https://oscarliang.com/dshot/) a digital protocol, instead of pwm. From what I read online, you can make pwm follow a duty cycle. However, I want to change the duty cycle after each pulse and not just repeat the same duty cycle. I understand this requires dma (direct memory access) but it's abit over my head.

0

This is not PWM, the pulse width is irrelevant.

The protocol seems to require 16 bits repeatedly, 11 bits of throttle, 1 bit telemetry, and 4 bit CRC.

No framing is mentioned in the linked article so presumably the bits must be accurately timed at 150kbps, 300kbps, or 600kbps.

Depending on how accurate the timing needs to be you may be able to do it with pigpio waves.

The linked article is too vague to allow for an implementation.

You need to find out the CRC definition, the value of the telemetry bit, and the framing method.

  • The parity bits are just a xor operation. I think the pigpio would be too slow iirc. Someone suggested to use spi but is there a way to connect 4 escs? Demuxer would be an option but I think the esc might interpret this as a disconnect. – Melvin Foo Aug 19 '17 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.