Control devices from a PC desktop or via the Internet
Light control via the Internet.
Naturally, you can control not only the light, but also any other device from your computer or remotely via the Internet. One device or several.
In the example we will control a lamp.
Manufacturing details in the picture.
So, the unit consists of hardware And software parts.
Part 1. Hardware
We will need the following parts:
1. Lamp 220 V;
2. lpt extension;
3. Fee;
4. angled LPT connector to the board;
5. relay 12 VDC and switching voltage 220 volts;
6. 4.7K resistor;
7. NPN transistor type KT3117A or any other with normal coefficient. amplification;
8. diode;
9. power splitter in the PC, if powered from the PC. But it is also possible from another 12 V source.
The device diagram is easy to assemble:
The gray rectangle on top is the relay.
If we apply one to pin D, voltage will appear on it and eventually the relay will switch, turning on the lamp.
According to the above diagram we solder something like this:
We solder the board into the open circuit of our lamp; connect via an lpt extension cable to the corresponding PC port; connect to the PC power supply via power splitter 11; Well, and the 220 V lamp itself.
Part two. Software
To revive our lamp, let's write a program in Delphi (the first thing that comes to hand is not at all difficult to rewrite in C, the program literally has 3 lines of code)
Source: /svetom/lamp_1.0.rar (this program can only turn the lamp on and off by pressing a key).
You can turn on a lamp or any other lamp from your computer!
Having slightly modernized the program, we get the second source: /svetom/lamp_2.0.rar (this program monitors a file that can be modified by the php script lamp2.php on the local web server).
Now we can turn on our favorite lamp from anywhere on the planet where there is Internet.
Good luck !
Similar master classes
Particularly interesting
Comments (19)