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

Increase output control resolution #2

Open
richardbarlow opened this issue May 1, 2019 · 0 comments
Open

Increase output control resolution #2

richardbarlow opened this issue May 1, 2019 · 0 comments

Comments

@richardbarlow
Copy link
Collaborator

Currently the servo board adjusts the pulse width in 5µs steps for each step of the input control value (in the range ±100 if #1 is not yet implemented - although #1 will not result in the increment changing from 5µs). From some quick Googling it seems that that 1-2ms of pulse range, which we get with a control value in the range ±100, will result in most servos rotating 90°. This means that our current 5µs step gives 0.45° of rotation.

The servo board is easily capable of much finer control than this. I think it's reasonable to increase the frequency of the timer used to control the pulse widths from 200kHz to 800kHz; reducing the step size to 1.25µs (0.1125°). To be able to take advantage of this the control values will need to quadruple in range. Since this breaks backwards compatibility with existing libraries I think the servo board should default to its current resolution (have the timer running at 800kHz and multiply all control values by 4) and change to the high resolution mode if explicitly requested over the USB interface via a new 'enable high res' command. If high res is enabled then the control values will change to ±400 (or ±800 if #1 is implemented).

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

1 participant