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

Added information on another dimmer library (my own). #22

Merged
merged 10 commits into from
Nov 11, 2023

Conversation

AJMansfield
Copy link
Contributor

AJMansfield/TriacDimmer is another phase-delay triac dimmer control library, developed by myself about 4 years ago.
While it's a lot less flexible in how it can be used, it takes advantage of additional features of the Atmel timers not used by other libraries to provide much more robust guarantees about timing accuracy, while allowing application code somewhat more freedom in implementing application functionality in ways that would conflict with other dimmer libraries.

In terms of raw specifications, this library allows a up to a half-microsecond resolution (assuming a 16 MHz system clock), and guarantees that the commanded phase offsets and pulse durations will be met with a tolerance of ± 0.5 µs with no compensation or tuning for variable code execution time.
These timing guarantees are met even if application code needs to make use of cli() to guard other timing-sensitive bit-bang operations, or has other interrupts that must be serviced at a higher priority, without making any compromises on accuracy or precision as long as the longest interrupt-excluded section always completes faster than the shortest commanded pulse duration or phase offset.
Outside that regime, there are additional safeguards that allow the library to continue to behave reasonably (for certain definitions of reasonable) in situations where that limit is exceeded by a small amount, and to quickly recover and return to normal operation once back in the preferred operating regime.

@fabianoriccardi fabianoriccardi merged commit 0fec7ae into fabianoriccardi:main Nov 11, 2023
6 checks passed
fabianoriccardi added a commit that referenced this pull request Nov 11, 2023
* another specialized dimmer control library

* extra pipe

* fixes

---------

Co-authored-by: Fabiano Riccardi <fabiano.riccardi@outlook.com>
@fabianoriccardi
Copy link
Owner

fabianoriccardi commented Nov 11, 2023

Hi @AJMansfield, finally I had true time to catch up with my library and considering your proposal. Congrats for your work: it is a different perspective w.r.t. my library (efficiency vs flexibility), so a comparison in the readme is great for users who want a better understanding of the possible implementations.

@AJMansfield
Copy link
Contributor Author

Thanks. I get feature requests too far out of scope for my own project with some regularity and your readme has been a valuable place to be able to point them to.

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

Successfully merging this pull request may close these issues.

2 participants