Dual Timers to Operate Dual Relays
PICAXE 08M
revised 1-20-08
This circuit has five operational components, two
relays, two time adjustment potentiometers and one push button or reed
switch that acts as a trigger. |
Schematic - The two potentiometers (R3 and R4) select a time between 1 and 5 seconds. The power supply that is shown will power the circuit from track power. It can also be powered by 3 AA batteries or any other "clean" DC power source between 3 and 5.5 volts.
Software -
symbol relay1 = 0
symbol relay2 = 1
symbol timer1 = 2
symbol timer2 = 4
symbol trigger = 3
symbol time1 = w0
symbol time2 = w1
start:
if pin3=0 then start: 'stay at start till trigger pressed
readadc timer1, time1
high relay1
time1=time1*20
pause time1
low relay1
readadc timer2, time2
high relay2
time2=time2*20
pause time2
low relay2
goto start