Analog Ground
- Joined Apr 24, 2019
- 460
Here is a cut at a "Flickerless" state diagram. The delay is started when the switch goes from "on" to "off". Neither light should "flicker" when the switch is changed. There probably is an error somewhere but I wanted to show an example of how a state diagram can help discussion about behavior and nail down what is wanted. Please note there is no reason yet to discuss technology or how to implement the design. Just a disciplined way to specify what is needed. Also, there can be redundant states at this point. Redundant states can be eliminated later.
OUTPUTS
A - Main Light "on" when "1"
B - Aux Light "on" when "1"
INPUTS
S - Switch "on" when "1"
D - Delay ""on" when "1"
Delay is triggered when Switch goes from "on" to "off". One question: Is it retriggerable? This may change the diagram.
STATE DESCRIPTIONS
A - Idle, no lights on, waiting for Switch on
B - Main light on, waiting for switch off
C - Main light on, waiting for Delay to start
D - Main light on, waiting for Delay to end
E - Both lights on, waiting for Switch off
OUTPUTS
A - Main Light "on" when "1"
B - Aux Light "on" when "1"
INPUTS
S - Switch "on" when "1"
D - Delay ""on" when "1"
Delay is triggered when Switch goes from "on" to "off". One question: Is it retriggerable? This may change the diagram.
STATE DESCRIPTIONS
A - Idle, no lights on, waiting for Switch on
B - Main light on, waiting for switch off
C - Main light on, waiting for Delay to start
D - Main light on, waiting for Delay to end
E - Both lights on, waiting for Switch off