Added information on another dimmer library (my own). #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.