The Free Site   |  vBuddy - make friends, share photos, blogs, have fun   |  Cheap Web Hosting - starting at $5

Pump controller with hardware shutdown

This controller ensures that a pump turns off if the controlling PC crashes. The PC sends data to the picaxe every minute or so and the picaxe outputs this data. The picaxe also outputs a high pulse which charges up a capacitor. This capacitor is in parallel with a resistor and slowly discharges over a few minutes. The output of the capacitor goes into an HC08 and gate and is 'anded' with the output of the picaxe.

If the PC were to crash, then refresh signal would not be received and the capacitor would discharge and turn the pumps off. This is an example of a generic circuit interfaced to a picaxe which fails in a safe way.

' 08
' turn on the two pumps
' device no 2
' uses33uF 3.3M via a diode into an and gate
' send byte b3 = 0 for all off, 1 =device1, 2=device2,


main: serin 3, N1200, ("Data"), b1, b2, b3, b4, b5, b6, b12, b13
If b1 <> "T" Then main ' not an output byte
If b2 <> 2 Then main ' device number 2
Let w5 = b3 + b4 + b5 + b6
If w5 <> w6 Then main ' checksum invalid
If b3 = 0 Then AllOff
If b3 = 1 Then Pin1On
If b3 = 2 Then Pin2On
GoTo main ' in case was something else

AllOff: low 1
low 2
low 4
GoTo main

Pin1On: high 1
low 2
GoTo Charge

Pin2On: high 2
low 1
GoTo Charge


Charge: high 4
pause 1000
low 4
pause 55000
GoTo main

 

Home