4 ms·
For that, you just need to not make the transition from 100% duty cycle to 0% duty cycle instantaneous, but to ramp down linearly the duty cycle over a large fr
by adrian_b 6mo ago
For that, you just need to not make the transition from 100% duty cycle to 0% duty cycle instantaneous, but to ramp down linearly the duty cycle over a large fraction of a second or even an entire second.
As another poster said, the overshoot may look cool, but I would be worried that a cheap panel voltmeter would not survive a very large number of such shocks.
- invalidator 6mo agoYou can do better: cut to 0%, let the needle fall, go back to 100% for a moment to catch the needle as it approaches the bottom of the scale. If you want to be fancy, add some quick sinusoidal ramps to smooth out the derivative.
- Doxin 6mo agoA linear ramp would work, but you can probably get to the end-point quicker if you're not going linearly. Something like needle_position = needle_position * 0.9 + desired_needle_position * 0.1 is very easy to implement, easier than linear if you ask me, and should give it a nice damped movement. The constants can be tuned to go as quick or as slow as you like of course.
- floxy 5mo ago>just https://duckduckgo.com/?ia=web&q=control+theory https://duckduckgo.com/?ia=web&q=control+theory