Alon Barzilai wrote:

hello list,

I am looking for a way to turn on and off electrical appliance (220V) from a computer program.

That is not hard at all :


First thing find an interface that you will be able to make one of its lines to give you 5v and 0v at
your own will (call it a DataOut).
IMHO parallel port is great for this && you have 8 lines so you can make 8 switches.
Get a TTL "T Flip-Flop" (it's a chip - costs 5-10 nis may contain 4-8 TFFs on one chip)
every T-Flip-Flop has 2 terminals when T and F , chips with several TFFs inside name the terminals T1->F1 , T2->F2....
sometimes they have a R(eset) line , if you let 5v into the R line the output (F) will be set to "0".
When TFF recieves a pulse (a jump from "0" to "1") on the T terminal it will negate the value of the coressponding F terminal.
TTL means 5v is logical "1" and 0v is logical "0" then get yourself an electric relay that can
handle the current that your AC equipment will use ((W/230)*sqr(2) where W is the watts your equipment consume. don't get anything lower then 2Amps).
Generic relay has 4 legs , 2 for command and 2 work as a switch , when there is current between the command legs the siwtch will connect the second
pair together.
Get a schematics for your TFF chip, power it from any 5v source , you can use your computer's power supply(hard disk's power cable).
Connect your PC's output line to one of the chip's T terminals and the coresspondig F terminal to the "+" leg of the relay command lines
and connect the "-" of the relay to the "-" of the whole circut (which is connected to the "-" of the 5v power supply mentioned earlier).
take a piece of AC equipment that connects to a plug , as you can see there are 2 wires in a plug connection , cut one of those wires.
connect the separated line to the "switch" terminals of your relay.
What you will recieve is this: when you give a pulse (from "0" to "1" small (1ms) delay and back to "0") on the DataOut line for the first time
the F output of the TFF will become "1" -> activates the relay that will connect the line you cut before and your equipment starts working.
A same pulse on DataOut for the second time will turn the F termianl to "0" and close the relay.
Use insulation and testing equipment (multimeter will do the job).


Enjoy,
Boris Ratner.




================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]



Reply via email to