Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10kHz PWM output does not go to 0% or 100% Duty on ESP8266 based receivers #2490

Closed
ot0tot opened this issue Nov 28, 2023 · 2 comments
Closed

Comments

@ot0tot
Copy link
Contributor

ot0tot commented Nov 28, 2023

I verified the behavior described below as well. 10kHz output works properly on ESP32 based receivers, but not on ESP8266 based receivers. Output initializes properly at zero, but once changed never goes below about 1% or above 99%.

Original report:
I can now confirm that my Channel goes from 988-1884. Tested different elrs Versions and differed RX pins.

The very strange thing is that the pwm signal on the receiver Pin is 0 (without any spikes) when the receiver is powered up and bound with the TX while the TX channel signal is low. As soon as the channel signal was above 1000µs once, the receiver output pwm will never go back to o again, it will always keep small positive spikes making to motor to spin slowly and never stop.
For me this looks like a bug in the pwm generation, anyone can confirm this? maybe @Ncerzzk ?

Feel free to contact me in Discord: https://discord.com/channels/596350022191415318/798006228450017290/1168851700002590751

Originally posted by @derFrickler in #1850 (comment)

@derFrickler
Copy link
Contributor

derFrickler commented Nov 28, 2023

As i read that you were using a BetaFPV Lite RX as well, i just crosschecked with an other Happymodel EP1 and the behavior is exactly the same. Seems to be on all ESP8285 RX.

0% PWM until you rise it once, than it only goes back to ~1% and leaves the motor running.

@ot0tot
Copy link
Contributor Author

ot0tot commented Nov 28, 2023

@CapnBry Does anything jump out at you as possible causes? Maybe a timer/interrupt issue on ESP8266 with https://github.com/ExpressLRS/ExpressLRS/blob/master/src/lib/PWM/waveform_8266.cpp ?

I suppose the trivial solution is just to add a "if duty =0, digitalWrite(pin, LOW); if duty = 100, digitalWrite(pin, HIGH);"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants