•  
  •  

Control electrical appliances using PC

Here is a circuit for using the printer port of a PC, for control application using software and some interface hardware. The interface circuit along with the given software can be used with the printer port of any PC for controlling up to eight equipment .

The interface circuit shown in the figure is drawn for only one device, being controlled by D0 bit at pin 2 of the 25-pin parallel port. Identical circuits for the remaining data bits D1 through D7 (available at pins 3 through 9) have to be similarly wired. The use of opto-coupler ensures complete isolation of the PC from the relay driver circuitry.
Lots of ways to control the hardware can be implemented using software. In C/C++ one can use the outportb(portno,value) function where portno is the parallel port address (usually 378hex for LPT1) and ‘value’ is the data that is to be sent to the port. For a value=0 all the outputs (D0-D7) are off. For value=1 D0 is ON, value=2 D1 is ON, value=4, D2 is ON and so on. eg. If value=29(decimal) = 00011101(binary) ->D0,D2,D3,D4 are ON and the rest are OFF.

Click here for the sample software.
Click here for the source code of the software (in C).

If there are any problems please contact webmaster@electronic-circuits-diagrams.com

Please share & like


NEW Sick Photoelectric Switch Sensor WTV4-3P2241  picture

NEW Sick Photoelectric Switch Sensor WTV4-3P2241

$210.00



NEW ALLEN BRADLEY 806-D42 DRUM SWITCH REVERSING 4POLE STOCK 5480 picture

NEW ALLEN BRADLEY 806-D42 DRUM SWITCH REVERSING 4POLE STOCK 5480

$340.00



NEW ALLEN BRADLEY 806-D42 DRUM SWITCH REVERSING 4POLE STOCK 5474 picture

NEW ALLEN BRADLEY 806-D42 DRUM SWITCH REVERSING 4POLE STOCK 5474

$340.00



NEW ASCO 00092003001910C 100 AMP 920 REMOTE CONTROL SWITCH 3 POLE COIL 480 VAC picture

NEW ASCO 00092003001910C 100 AMP 920 REMOTE CONTROL SWITCH 3 POLE COIL 480 VAC

$1349.99



Toggle SWITCH ON/OFF/ON Heavy Duty 20A 125V SPST 3 Terminal Car Waterproof BOOT picture

Toggle SWITCH ON/OFF/ON Heavy Duty 20A 125V SPST 3 Terminal Car Waterproof BOOT

$3.95



30A 250V KCD2 KCD4 Rocker Switch DPST 4 Pin Red Lighted 120V Rocker Toggle Switc picture

30A 250V KCD2 KCD4 Rocker Switch DPST 4 Pin Red Lighted 120V Rocker Toggle Switc

$11.37



ELECTRIC COOLING FAN GROUND-ING THERMO-STAT SWITCH RADIATOR TEMP-ERATURE SENSOR picture

ELECTRIC COOLING FAN GROUND-ING THERMO-STAT SWITCH RADIATOR TEMP-ERATURE SENSOR

$17.99



5X Toggle SWITCH ON/OFF Heavy Duty 15A 250V SPST 2 Terminal Car Boat Waterproof  picture

5X Toggle SWITCH ON/OFF Heavy Duty 15A 250V SPST 2 Terminal Car Boat Waterproof

$7.95



Appleton EDSC175F1 Explosion Proof Switch and Box Used Pullouts, All Operable picture

Appleton EDSC175F1 Explosion Proof Switch and Box Used Pullouts, All Operable

$60.00



WPS30V 60V 120V 160V 2A 3A 5A 10A Lab Adjustable DC Power Supply Variable Switch picture

WPS30V 60V 120V 160V 2A 3A 5A 10A Lab Adjustable DC Power Supply Variable Switch

$110.19