-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Servo stretch feature for wider range servo PWM pulses #2773
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
base: master
Are you sure you want to change the base?
Servo stretch feature for wider range servo PWM pulses #2773
Conversation
This feature is super useful for a lot of servos that use extended range PWM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no downsides I can see with this.
This has a lot of things that needs fixing, mainly the config struct can't just be changed like that, and the way this is calculated loses even more source resolution. I don't have time to get into it now though. To work around the former, does anyone actually use that 750us mode? Is that even a thing? I added it because when I wrote all the PWM stuff one person said to me "Can you make it so the pulses are half as long?" and I had never heard of that but I threw it in because everything was new then so it was easier than it would have been to add it later. If 750us isn't a thing, then we could just use that bit for this and save a lot of headache/code. Does anyone know if that can be removed? |
Actually I made it so that anybody else migrating from the old struct will still have their settings be effective until the next time they use the web interface to configure. I also have never heard of a practical use for 750us mode and would agree to simply turning it into a stretched mode. But how do we make sure
I can easily change this such that the calculation happens in the same place where |
Yes its useful for plane pilots who are switching to ELRS |
I mostly fly LOS fixed wing and heli, and I don't think 750us is really a thing outside of yaw servos for RC helicopters (which generally use a flight controller anyway), and probably some specialized cases that I can't think of. I'm not aware of any other radio system in the hobby with a PWM receiver that can support the 750us servo operating range. I'm sure one person will be upset if it gets removed though, haha! |
It's also useful for Drag Racing and similar folks who like to turn their rates up to 125% to "Get a little extra power and speed" out of their systems supposedly. |
if narrow mode is 500-1000 anyways, and the new stretched mode is 500-2500, can we assume that anybody who used to use 500-1000 can simply edit their mixer since those ranges overlap? as far as I can tell, the resolution will be similar and it's not like using 500-1000 increases the update rate anyways, the PWM generator's frequency never changes. |
The goal is to help people save money, save space, and save weight, by avoiding products such as this servo stretcher, or this (example 2), or this (example 3), or this (example 4), or this (example 4). These products exist because of the limitations of older receivers and old standards, while EdgeTX itself is not to blame, this is going to provide an option to mitigate that old constraint. The last commit I just did replaced the narrow flag with the stretch flag, and I think it could work as an implementation that satisfies everybody, even people who were previously using the narrow flag. I have also resolved the resolution issue and now it should have as much resolution preserved as possible. Please review, thanks! |
Then why not add standard 150% 732us-2268us. |
This is a great feature to add. With more adoption of ELRS in planes, combat robotics, rc cars/trucks/crawlers since the RM MT12 was released, this is the time to get this added. We need to get this reviewed please! |
I could really need this as well. I'm would really love using the full range of my servo. |
seems to work from my initial testing, the servo does indeed go twice as far, to the full 270 degrees |
Found this PR while looking for how to enable double pulse width that's already mentioned in the docs. Tested the PR and it does indeed work. |
I agree with all of your comments, A standard 150% 732us-2268us travel is needed for steering servo to have the full steering angle without using longer servo arms (rc car racing) |
Will the feature ever be merged? |
There are some servos that require PWM pulses about 500us to 2500us to get their full range of motion
There are some people who purchase "servo stretcher" devices to translate pulses from 1000-2000us to 500-2500us just to use these servos. However, this obviously costs money, space, and weight. So why not just add this feature to ELRS?!
Previously, there was a "narrow" flag for the pulses that made them half as long. My code addition converts this to both a "half" mode and a "stretched" mode. The checkbox in the web-ui has changed into a drop-down.
I have tested this and observed the signals on a logic analyzer to confirm the pulse widths. I have also checked that loading and saving from the web-ui works as expected.