Computer Sound Card Provides Simple Internet-Based Appliance Remote Control
Texas Instruments » LM358
José M. Miguel
Using a standard PC-sound card and straightforward circuit, you can implement low-cost on/off control of home appliances via the Internet. The system (Fig. 1) consists of a local computer (located where you are) and a remote computer connected to a simple and inexpensive interface circuit with relay output. The local computer needs a browser and an application which offers access to the remote computer over the web, as if you were sitting right in front of it. If you have installed Chrome as your browser, you can add Chrome Remote Desktop. If you use another browser, TeamViewer  offers free remote access. This circuit also allows you to check from the local computer if the command is actually being executed.
In addition to the browser and remote-desktop access, an application to generate an audio tone through the sound card is needed at the remote computer. There are dozens of these sine wave generators available; one good choice is Audio Test set  from Darkwood Designs. This free software also incorporates a level meter which measures the input-voltage level applied to the mic/line input of the computer’s sound card (Fig. 2).
When you access to the desktop of the remote computer and operate the tone generator, a 1000-Hz, 2-V sinusoidal voltage is available at the speaker output of the computer sound card (adjust the reproduction audio volume to the highest value). This signal is connected to the input of the interface circuit (Fig. 3), then rectified via germanium diode D1 and filtered by R1/C2 into a dc voltage that feeds the non-inverting input of a comparator built around one-half of op-amp U1.
A 0.5-V signal is developed via the divider formed by R2 and R3 at its inverting input. In this way, when the tone generator is remotely activated, the comparator’s output goes high and activates the relay K1 via transistor Q1. The relay switches the appliance load on and off, so be sure the relay contacts have sufficient peak and RMS voltage and current ratings (note that Q1, a 2N2222, can switch up to 800 mA, so select a relay with appropriate coil-current specifications). Diode D2 clamps the inductive kick of the relay coil when it is de-energized.
When the comparator’s output goes high, an audio-relaxation oscillator built around the other half of U1 is also enabled. The frequency of this oscillator is adjusted by R8 and C3 to be in the audio range (1300 Hz for the values indicated). The generated square wave is attenuated by R10 and R11 and feeds the line/mic input of the sound card. In this way, the level meter of the Audio Testset software will detect it, showing it as a long green bar seen in the figure.
The 5-V supply voltage for the circuit can be provided by the computer's USB connector. Note that the system used one of the two channels of the computer sound card; therefore, you can duplicate the interface circuit and so control another appliance.
Materials on the topic
PCB Pricing: https://jlcpcb.com/quote
News on theme: