Relay control timer
Fklaas
Posts: 15
I need to control some relays with timer A" solinoid runs for 2sec. B" solinoid runs for 1Sec. C" solinoid runs for 2 Sec. Like this
A,on
A,off
B,on---B,off
C,on
c,off
goto main;
would be really coool to add more with fully start and stop points!
Thanks, Frank
A,on
A,off
B,on---B,off
C,on
c,off
goto main;
would be really coool to add more with fully start and stop points!
Thanks, Frank
Comments
A initially on two seconds. Off for two seconds
B initially off for one second. On for one second. Off for two seconds
C initially off for two seconds. On for two seconds
Total sequence time 4 seconds.
Is this basically the pattern you're trying to recreate? (Though B looks like it may be 1.5 seconds off, but it gets the idea). A 555 timer is possible, but you would probably have to use at least two. Since A and C alternate, you could control both of those with the high-low cycle of a 555 timer set at 50% duty for two seconds each. B would need it's own timer. Otherwise, it might be possible to just use the Stamp by using the Pause command and making the corresponding pin High or Low. Don't know if this helps, but hopefully it gives you a starting point.
David
Just make a single list of events:
"
A,on
A,off
B,on---B,off
C,on
c,off
"
so set pin numbers for all of your solenoids (this is NOT Basic code, just a list of steps)
Start:
PIN A-high
Pause 500
PIN B-high
Pause 1000
Pin B-low
Pause 500
Pin A-low
Pause 500
Pin C-high
Pause 2000
Pin C-low
Pause 1000
Goto Start
And you can always turn this into a loop, if you want the sequence to repeat. I asked about the precision of timing needed for your application because each command execution takes some time, very little time but should be accounted for in order to acheive high precision. If you only have 3 solenoids, and that is the only thing you are using the BS2 for, it might be cheaper to use 555 timers (or 556-2 timers in 1 package).