PC Based Wireless Appliance Control
Anshuman
Bezborah And Arunav Kumar Sinha
The parallel port of the PC is a powerful platform for implementing
projects dealing with the control of real-world peripherals. It can be used to
control home and other electronic appliances. The computer program through the
interface circuit controls the relays, which, in turn, switch the
appliances ‘on’ or ‘off.’
Fig.1: Pin configuration of
the RF transmitter module
Fig.2: Pin configration of the Antenna
type RF receiver module
Here we describe how to wirelessly control electronic appliances from a remote place by using the RF module. For this PC-based wireless appliances control system, you need to design and develop the required hardware and software. The parallel port of the PC is used to control the appliances at the transmitter side. The RF interface is used instead of the IR to overcome all the drawbacks of the IR interface. The PC signals are transmitted from the RF transmitter and received by the RF receiver.
Circuit description
Fig.3:
Transmitter circuit for PC-based
wireless appliance control
wireless appliance control
Signals from the PC’s parallel port are interfaced to the RF
transmitter through the RF encoder. The encoder (HT12E) continuously reads the
status of the op-tocoupler (MCT2E), passes the data to the RF transmitter and
the transmitter transmits the data. The RF receiver receives this data and
gives it to the RF decoder (HT12D). The decoder converts the single-bit data
into four-bit data and presents it to the decoder (74LS138). The output of the
decoder controls the appliances with the help of flip-flops (CD4013) and
transistors. Now, relays perform the corresponding action, i.e., switch the
appliances ‘on’ or ‘off.’
Fig.4: Receiver
circuit for PC-based
wireless appliance control
wireless appliance control
Remote control. For remote control, we have used the Holtek encoder-decoder pair of HT12E and HT12D. Both of these are 18-pin DIP ICs.
HT12E and HT12D are CMOS ICs with operating voltage range of 2.4V to 12V. Encoder HT12E has
eight addresses and another four address/data lines. The data set on these twelve lines+ (address and address/data lines) is serially transmitted when the transmitted able pin (TE) is taken low. The data output appears serially on DOUT pin.
The data is transmitted four times in succession. It consists of differing lengths of positive pulses for ‘1’ and ‘0,’ the pulse-width for ‘0’ being twice the pulse width for ‘1.’ The frequency of these pulses may lie between 1.5 and 7 kHz depending on the resistor value between OSC1 and OSC2 pins.
The internal oscillator frequency of decoder HT12D is 50 times the oscillator frequency of encoder HT12E. The values of the timing resistors connected between OSC1 and OSC2 pins of HT12E and HT12D, for a given voltage supply, can be found out from the graphs given in the data sheets of the respective chips. Here we have chosen the resistor values for approximately 3kHz frequency of the encoder (HT12E) and 150 kHz of the decoder (HT12D) at Vdd of 5V.
The HT12D receives data from the HT12E on its DIN pin, serially. If the address part of the received data matches the levels on A0 through A7 pins four times in succession, the valid transmission (VT) pin goes high. The data on pins AD8 through AD11 of the HT12E appears on pins D8 through D11 of the HT12D. Thus the device acts as a receiver of the 4-bit data (16 possible codes) with 8-bit addressing (256 possible channels).
Once the frequency of the pair is aligned, then on ground of any data pin on the encoder, LED1 on the decoder should light up. You can also check the data transfer on pins AD8 through AD11, which is available on pins D8 through D11 of the decoder once TE pin is momentarily taken low by making it ground.
RF transmitter and receiver
The RF transmitter and receiver modules from Alpus India, Mumbai, have been employed for RF remote control.
The RF transmitter TX-433 is AM/ ASK type. It features:
1. 5V-12V single-supply operation
2. On-off keying (OOK)/amplitude shift keying (ASK) data format
3. Up to 9.6kbps data rate
4. +9dBm output power (a range of about 200 metres)
5. SAW-based architecture
6. For the antenna, a 45cm wire is adequate
The output power and current drain for VCC of 5V and 12V, respectively,are shown in Table I.
Pin configurations of the transmitter and receiver modules are shown in Figs1 and 2, respectively. Technical specifications of the receiver module are shown in Table II.
Transmitter. Fig.3 shows the transmitter circuit for PC-based wireless appliance control. The receiver address to be transmitted can be set with the help of an 8-way DIP switch (DIP-SW1). If any switch is open the pin connected to that switch is at logic 1, and if it is closed the respective pin is at logic 0. The data pins are pulled high via resistors R2 through R5.
When pin 2 of the parallel port goes high, the internal LED of the optocoupler(MCT2E) glows to drive the internal phototransistor into saturation and its pin 5 goes low.
Pin 10 (AD8) of HT12E goes low through pin 5 of MCT2E and a ‘0’ is sent at that data position, while other data pins represent the logic-1 state. The logic circuitry at the receiver-decoder end decodes the data appropriately for controlling the switch of an appliance.
Receiver-cum-decoder.Fig.4 shows the receiver circuit for PC-based wireless appliance control. Assuming that an identical address is selected on the encoder and decoder, when anyone of data pins D0 through D3 of the PC’s parallel port on the transmitter is high, the corresponding data pin of the demodulator goes low at the decoder (HT12D). The data outputs (D8 through D11) of HT12D are connected to inverters N1 through N4. The output of inverters N1, N2 and N3 are connected to address inputs A, B and C of decoder 74LS138, respectively. The outputs of inverters N4 and N5 enable the decoder to drive the flip-flop (CD4013).
IC CD4013 is configured as a toggle flip-flop. The output of the flipflop (IC9(A)) drives transistor T2 into saturation and relay RL1 energises. D7 through D14 are used as free-wheeling diodes. The relay contacts are used for appliances.
When any data is received, the valid transmission pin (VT) goes high to drive the transistor into saturation and LED1 lights up.
Construction
An actual-size, single-side PCB
for the transmitter circuit (Fig.3) is shown in Fig.
5(View as PDF) and its component layout inFig.6(View
as PDF).Actual-size, single-side PCBs for the
receiver-cum-logic control section on the left side of dotted line in Fig.4 and
relay driver section (on the right side of dotted line in Fig.4) are shown in Fig.7(View
as PDF) and Fig.9(View
as PDF) and
their component layouts in Fig.8(View
as PDF) and Fig.10(View
as PDF), respectively. Connectors have been
provided on the PCB for all the outputs (CK1 through CK8) of IC8, VCC and GND. Thus it can be
extended for the relay driver section at any desired location. The PCB of the
relay driver is made for two relays to drive two appliances. You can extend the
same to control more than two appliances by adding another PCB as shown in
Fig.9. Wire the circuit on the PCB as shown in Fig. 9 and extend it to any
other appliance in the house.
Use bases for all the ICs. Check continuity between respective connections using a multimeter. Connect the electrical appliances through relay contacts.
Software
The source program for PC-based wireless appliance control is written in Visual Basic. To use the software on Win XP platform, the input32.dll file should reside in the same folder as the .exe file of the program. The main screen for PC-based wireless appliance control is shown in Fig.11.
Fig.11: Main screen on PC









Comments
Post a Comment