| The Free Site | vBuddy - make friends, share photos, blogs, have fun | Cheap Web Hosting - starting at $5 |
Picaxe 240VAC controller
This circuit turns on flouro lights. The picaxe drives a 2k7 resistor into a 547 transistor, which drives a 240V relay. 4001 back emf diode on the coil. The catch is that picaxes hate switching large currents near them. The only way I could stop the picaxe resetting was to mount the relay about 50 cm from the picaxe box. The control signal is the two wires going to the coil. Even then, RF hash came down these wires and they needed to run a few times through a small toroid. Moral of the story - keep picaxes and high current wires away from each other.
' 08
' turn on the 12VAC lights
' device no 5
' byte b3=number of seconds to turn on
start: low 0
low 1
low 4
low 2
main: serin 3, N1200, ("Data"), b1, b2, b3, b4, b5, b6, b12, b13
If b1 <> "T" Then main ' not an output byte
If b2 <> 5 Then main ' device number 4
Let w5 = b3 + b4 + b5 + b6
If w5 <> w6 Then main ' checksum invalid
If b3 = 0 Then main
high 2
For b4 = 0 To b3
pause 2000 '2 secs per value
Next b4
low 2
GoTo main
Picaxes can control much higher currents. I use picaxes to turn on a number of 240V 3 phase motors at 3.6kW each. The trick is to do the switching in jumps. Use a picaxe to turn on a 547 transistor, which turns on a relay, which turns on a 3 phase contactor which turns on the motor.