Microcontroller Tasks: RF-Primarily based A number of Gadget Management

Right here we describe methods to management electrical and digital devices from a distant location utilizing radio frequency (RF) transmission. An RF interface is used as an alternative of infrared (IR) to keep away from the drawbacks of an IR interface. Moreover, RF has an extended vary. The sign is transmitted by an RF transmitter and acquired by an RF receiver to modify on or swap off the specified gadget. This technique can be utilized to regulate as much as fifteen gadgets.

Fig. 1: Block diagram for RF-based multiple device control using microcontrollerFig. 1: Block diagram for RF-based a number of gadget management utilizing microcontroller

Fig. 1 exhibits the block diagram for RF-based a number of gadget management utilizing microcontroller. Indicators from the keypad are fed to microcontroller AT89C2051, which, in flip, is interfaced to the RF transmitter via encoder HT12E. The microcontroller repeatedly reads the standing of the keys on the keypad.

When any secret is pressed, knowledge is handed to the encoder after which to the RF transmitter from the place it’s transmitted. The RF receiver receives this knowledge and offers it to the RF decoder. The decoder serially converts the serial bit knowledge into four-bit knowledge at a port of microcontroller AT89C51. The microcontroller energises the corresponding relay via a relay driver. Gadgets are linked to normally-open (N/O) contacts of the relays.

HT12E and HT12D

HT12E and HT12D are CMOS ICs with a working voltage vary of two.4V to 12V. Encoder HT12E has eight deal with strains and 4 deal with/knowledge strains. The info set on these twelve strains (deal with and deal with/knowledge strains) is serially transmitted when transmit-enable TE pin (pin 14) is low. The info output seems serially on DOUT pin. Knowledge is transmitted 4 instances in succession.

The frequency of the pulses of information transmission might lie between 1.5 kHz and seven kHz relying on the resistor worth used between oscillator pins 15 and 16.

78Z_Fig_2Fig. 2: Transmitter circuit with SM TX-433 RF module (TX1)Fig. 3: Receiver circuit with SM RX-433 RF module (RX1)Fig. three: Receiver circuit with SM RX-433 RF module (RX1)

DBF_PartsThe inner oscillator frequency of decoder HT12D is 50 instances the oscillator frequency of encoder HT12E. The values of timing resistors linked between pins 15 and 16 of HT12E and HT12D, for the given provide voltages, will be decided from the graphs given within the datasheet of the respective chips. The resistor values used within the circuit listed here are chosen for roughly 3kHz frequency for encoder HT12E and 150 kHz for decoder HT12D at a VDD of 5V.

Decoder HT12D receives knowledge from HT12E on its DIN pin serially. If the transmitted deal with matches the deal with of the decoder 4 instances in succession, legitimate transmission pin (VT) turns into excessive. The info from pins AD8 via AD11 of the HT12E seems on pins D8 via D11 of the HT12D.

Transmitter unit

Fig. 2 exhibits the transmitter circuit with SM TX-433 RF module (TX1). TX1 is an AM/ASK transmitter module working at 433 MHz. AT89C2051 is a low-voltage, high-performance CMOS Eight-bit microcontroller. It has 2 kB of Flash, 128 bytes of RAM, 15 enter/output (I/O) strains, two 16-bit timers/counters, a five-vector two-level interrupt structure, a full-duplex serial port, a precision analogue comparator, on-chip oscillator and clock circuitry.

Energy-on reset is supplied by the mix of resistor R3 and capacitor C1. Change S17 is used for guide reset. A 12MHz crystal together with two 33pF capacitors offers the essential clock frequency for operation.

The receiver deal with to be transmitted will be set with the assistance of Eight-way DIP swap S18. Port pins P1.zero via P1.7 of the microcontroller are interfaced with the keypad. Pins P3.zero and P3.2 via P3.5 are interfaced with TE pin and knowledge inputs AD8 via AD11 of encoder HT12E.

3B5_KeysWhen all switches (S1 via S16) are opened on the keypad, the microcontroller pulls the TE pin in addition to knowledge enter pins AD8 via AD11 to logic 1. If any swap is closed, the microcontroller pulls the corresponding knowledge pin together with TE pin to logic zero. When swap S1 is closed, the microcontroller makes pin 10 (AD8) and pin 14 (TE) of encoder HT12E low, and logic zero is transmitted via TX1. The opposite knowledge pins of encoder HT12E shall be in logic 1 state on this case. LED1 glows to point transmission enabled.

Receiver unit

Fig. three exhibits the receiver circuit with SM RX-433 RF module. AT89C51 is a low-power, high-performance CMOS Eight-bit microcontroller. It has four kB of Flash, 128 bytes of RAM, 32 I/O strains, two 16-bit timers/counters, five-vector two-level interrupt structure, a full-duplex serial port, on-chip oscillator and clock circuitry.

Energy-on reset is supplied by the mix of resistor R5 and capacitor C6. Change S20 is used for guide reset. A 12MHz crystal together with two 33pF capacitors offers the essential clock frequency to microcontroller AT89C51.

Deal with strains of the encoder (IC1) and the decoder (IC4) needs to be similar for knowledge reception within the receiver. Right here addresses are made similar via switches S18 and S19. When any of the keys on the keypad is closed, the corresponding knowledge pin of the decoder goes low. When any knowledge is acquired, legitimate transmission pin (VT) goes excessive as indicated by LED2.

Knowledge outputs D8 via D11 of HT12D are linked to port pins P0.zero via P0.three of the microcontroller. The microcontroller receives the decoded knowledge and controls the corresponding relay via relay drivers ULN2003 and ULN2803. The gadget to be managed is linked to the relay contacts. Unregulated energy provide is used for relays.

Energy provide

The 230V AC mains is stepped down by transformer X1 to ship a secondary output of 6V, 500 mA. The transformer output is rectified by a full-wave rectifier comprising diodes D6 via D9, filtered by capacitor C8 and controlled by IC 7805 (IC8). Capacitor C7 bypasses the ripples current within the regulated provide. LED3 acts as the facility indicator and R6 limits the present via LED3.

Software program

Applications for the microcontrollers are written in BASIC and compiled utilizing BASCOM Primary compiler for 8051 household. These are supported by Home windows OS. The microcontrollers of the transmitter and receiver models are programmed with supply packages ‘Distant.bas’ and ‘Receiver.bas,’ respectively. The bas codes are transformed into hex codes utilizing the above compiler. The hex codes are burnt into the respective microcontrollers utilizing an appropriate programmer.

Obtain Supply Code for A number of Gadget Management System: click on right here

Building and testing

A single-side PCB for the transmitter circuit (Fig. 2) is proven in Fig. four and its element structure in Fig. 5. The PCB for the receiver circuit excluding relay part (Fig. three) is proven in Fig. 6 and its element structure in Fig. 7. The PCB for relays RL8 via RL15 linked to load Eight via load 15 is proven in Fig. Eight and its element structure in Fig. 9. You should utilize one other PCB for relays RL1 via RL7 to attach load 1 via load 7. Appropriate connectors are supplied on the PCB. The receiver PCB is interfaced with the relay PCB by connecting CON1 to CON5, and CON2 to CON6.

Fig. 4: An actual-size, single-side PCB for the transmitter circuit (Fig. 2)Fig. four: A single-side PCB for the transmitter circuit (Fig. 2)Fig. 5: Component layout for the PCB in Fig. 4Fig. 5: Element structure for the PCB in Fig. fourFig. 6: An actual-size, single-side PCB for the receiver circuit (Fig. 3)Fig. 6: A single-side PCB for the receiver circuit (Fig. three)Fig. 7: Component layout for the PCB in Fig. 6Fig. 7: Element structure for the PCB in Fig. 6Fig. 8: An actual-size, single-side PCB for relay sectionFig. Eight: A single-side PCB for relay partFig. 9: Component layout for the PCB in Fig.Fig. 9: Element structure for the PCB in Fig.

Obtain PCB and Element Structure PDFs for A number of Gadget Management: click on right here

After assembling the transmitter, receiver and relay sections on the respective PCBs, pull pin 1 of each HT12E and HT12D to floor. LED2 linked to VT pin of the decoder ought to glow, indicating legitimate sign has been acquired. 255 units of transmitter-receiver pairs can be utilized throughout the similar space, every with a novel deal with. Alternatively, we are able to additionally management 255 receivers with distant management by altering the deal with. Now your RF-based a number of gadget management techniques is prepared to be used.

The creator is a software program take a look at automation engineer at Wipro Applied sciences, Sarjapur Highway, Bengaluru

For studying different fascinating Electronics Tasks: click on right here

This text was first revealed on 25 September 2015 and was up to date on 4th June 2020.

Leave a Reply

Your email address will not be published. Required fields are marked *