Casting About for Ideas to Help Implement Variable-Range Controller
Archiver
Posts: 46,084
The circuit that I'm designing will use a BS2:
6 SSR outputs, 6 toggle switch inputs, 1 four-position rotary switch
input (DC/BS2 Off, Standard Random Firing Mode, Long-Pause Random
Firing Mode, Manual Firing Mode...hopefully with the right code this
will only utilize 2 input pins), and 1 Manual Firing pushbutton. That's
15 pins spoken for.
The firing cycle will proceed as follows:
Each solenoid will energize individually for a pulse of 50ms-70ms; de-
energize; pause for approximately 20ms. Sequentially each succesive
solenoid will energize/de-energize/pause until all 6 have been fired.
The pause time BETWEEN firing cycles will be randomly generated:
approximately between 1s-6s for the Standard Random Firing Mode.
The Long-Pause Random Firing Mode will have a pause time of between
approximately 1s and 300s.
Question: Is there a simple method to variably adjust the random pause
times? In other words, instead of having two fixed timing parameters
(Standard 1s-6s, Long-Pause 1s-300s) to have a variably adjustable
range of random pause times, say between 1s and 300s?
What options are there for effecting this either via hardware or code
(or a combination of the two)? Recall, the current design incorporates
a 4 position rotary switch + code (hopefully the rotary switch, again
will use only two BS2 pins). As it stands, I only have ONE pin left to
work with so perhaps a hardware solution is best.
Any ideas?
Thanks.
Cheers,
-Neal
6 SSR outputs, 6 toggle switch inputs, 1 four-position rotary switch
input (DC/BS2 Off, Standard Random Firing Mode, Long-Pause Random
Firing Mode, Manual Firing Mode...hopefully with the right code this
will only utilize 2 input pins), and 1 Manual Firing pushbutton. That's
15 pins spoken for.
The firing cycle will proceed as follows:
Each solenoid will energize individually for a pulse of 50ms-70ms; de-
energize; pause for approximately 20ms. Sequentially each succesive
solenoid will energize/de-energize/pause until all 6 have been fired.
The pause time BETWEEN firing cycles will be randomly generated:
approximately between 1s-6s for the Standard Random Firing Mode.
The Long-Pause Random Firing Mode will have a pause time of between
approximately 1s and 300s.
Question: Is there a simple method to variably adjust the random pause
times? In other words, instead of having two fixed timing parameters
(Standard 1s-6s, Long-Pause 1s-300s) to have a variably adjustable
range of random pause times, say between 1s and 300s?
What options are there for effecting this either via hardware or code
(or a combination of the two)? Recall, the current design incorporates
a 4 position rotary switch + code (hopefully the rotary switch, again
will use only two BS2 pins). As it stands, I only have ONE pin left to
work with so perhaps a hardware solution is best.
Any ideas?
Thanks.
Cheers,
-Neal