This document describes a microcontroller-based wireless equipment controller that can switch on or off up to four devices at desired time intervals set by the user. The system consists of a transmitter section and receiver section. The transmitter section uses an AT89C51 microcontroller, LCD display, encoder IC, and RF transmitter module. It allows the user to set the timeout for each device using buttons and displays it on the LCD. The encoded data is transmitted via RF. The receiver section includes an RF receiver module, decoder IC, multiplexer, and relay driver to control the devices based on the received data. Circuit diagrams and component lists are provided for both sections.
This document describes a microcontroller-based wireless equipment controller that can switch on or off up to four devices at desired time intervals set by the user. The system consists of a transmitter section and receiver section. The transmitter section uses an AT89C51 microcontroller, LCD display, encoder IC, and RF transmitter module. It allows the user to set the timeout for each device using buttons and displays it on the LCD. The encoded data is transmitted via RF. The receiver section includes an RF receiver module, decoder IC, multiplexer, and relay driver to control the devices based on the received data. Circuit diagrams and component lists are provided for both sections.
Original Description:
This the article published in the EFORU august 2010.
This document describes a microcontroller-based wireless equipment controller that can switch on or off up to four devices at desired time intervals set by the user. The system consists of a transmitter section and receiver section. The transmitter section uses an AT89C51 microcontroller, LCD display, encoder IC, and RF transmitter module. It allows the user to set the timeout for each device using buttons and displays it on the LCD. The encoded data is transmitted via RF. The receiver section includes an RF receiver module, decoder IC, multiplexer, and relay driver to control the devices based on the received data. Circuit diagrams and component lists are provided for both sections.
This document describes a microcontroller-based wireless equipment controller that can switch on or off up to four devices at desired time intervals set by the user. The system consists of a transmitter section and receiver section. The transmitter section uses an AT89C51 microcontroller, LCD display, encoder IC, and RF transmitter module. It allows the user to set the timeout for each device using buttons and displays it on the LCD. The encoded data is transmitted via RF. The receiver section includes an RF receiver module, decoder IC, multiplexer, and relay driver to control the devices based on the received data. Circuit diagrams and component lists are provided for both sections.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online from Scribd
Download as pdf or txt
You are on page 1of 5
ConstruCtion
electroni cs for you August 2010 59 www. e f y mA g . c o m
Dr A.A. BhAskAr, Dr h.N. PANDyA AND Ms s.J. OzA Wireless equiPMeNt CONtrOl usiNg MiCrOCONtrOller SAN THEO effective and good for wireless con- trol of home appliances or industrial instrumentation. Block diagram The system consists of a transmitter and a receiver as described below. Transmitter section. Fig. 1 shows the block diagram of the transmitter section. Four pushbutton switches (S1 through S4) are used as inputs to se- lect the devices and set the time-out in the transmitter section. These are designated as up, down, ent and run keys, respectively. The time-out data is transferred over the RF wireless link to the receiver section. The 8-bit AT89C51 microcontroller is the main controlling part of the transmitter section. It is connected to the LCD module, input switches and en- coder IC (HT12E). The device control program is stored in the memory of the microcontroller and controls the devices as per the time-out set- ting done through input switches S1 through S4. A two-line, 16-char- act er LCD modul e shows the status of the main program that is running inside the mi- crocontroller. The HT12E is an 18- pin DIP package en- coder IC that encodes 4-bit data and sends it to TRX-434 RF transmitter module. The TRX-434 RF transmitter module uses a digital modulation technique called amplitude-shift key- ing (ASK) or on-off keying. In this technique, whenever logic 1 is to be Parts List Semiconductors: IC1 - HT12E encoder IC2 - AT89C51 microcontroller IC3 - 7805 5V regulator IC4 - HT12D/SM5172 decoder IC5 - CD4519 multiplexer IC6 - ULN2003 relay driver TRX-434 - 434MHz RF transmitter module RX-434 - 434MHz RF receiver module LED1-LED8 - 5mm light-emitting diode D1-D10 - 1N4148 signal diode Resistors (all -watt, 5% carbon): R1, R2, R17, R20-R24 - 1-kilo-ohm R3 - 680-kilo-ohm R4-R11 - 10-kilo-ohm network (RNW1) resistor R12-R15 - 4.7-kilo-ohm R16 - 1.2-kilo-ohm R18, R19 - 47-kilo-ohm VR1 - 47-kilo-ohm preset Capacitors: C1 - 10F, 16V electrolytic C2, C3 - 27pF ceramic C4 - 1000F, 25V electrolytic C5 - 0.1F ceramic C6 - 470nF ceramic Miscellaneous: LCD1 - 162 line LCD display S1-S5 - Tactile switches X TAL1 - 11.0592 MHz crystal JS - Jumper switch - Antenna - 42-pin berg strip male and female connectors H ere is a microcontroller- based wireless equipment controller that can switch on or off up to four devices at a desired time interval set by the user in the transmitter unit. The devices can be controlled remotely from a distance of up to 30 metres from the transmit- ter unit. In the transmitter unit, an LCD module is used to show the de- vice numbers and preset control time for the devices (00 to 99 seconds). Concepts of wireless RF communica- tion and automation with AT89C51 microcontroller are used here. The system is small, simple, cost- Fig. 1: Block diagram of transmitter section for wireless equipment control Fig. 2: ASK concept for the RF transmitter module RF Module Specifications Parameter Value Frequency of operation 434 MHz Modulation ASK Range 9.14 metres Power Supply 5V (RX) 3V to 12V (TRX) ConstruCtion 60 August 2010 electroni cs for you www. e f y mA g . c o m sent, it is modulated with carrier signal (434MHz). This modulated signal is then transmitted through the antenna. The waveforms in Fig. 2 depict the ASK concept. The main specifcations of the RF module are shown in the table. Receiver section. Fig. 3 shows the block diagram of the receiver section. The 12V DC supply, used along with a 5V regulator, can be provided by a 12V battery or power adaptor. The RX-434 radio receiver module receives the ASK signal from TRX-434. The HT12D decoder demodulates the received address and data bits. IC CD4519 is a quadruple two-in- put multiplexer that selects the appro- priate data bits to control the devices. The ULN 2003 relay driver consists of seven npn Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching the inductive loads. The collector-current rating of a single Dar- lington pair is 500 mA. Circuit description Transmitter circuit. Fig. 4 shows the transmitter circuit. The microcontroller reads the input data from switches S1 through S4 at its Port-2 pins 21 through 24 and displays it on the LCD. Port 3 provides read data to the encoder IC HT12E at pins 10 through 13). The mi- crocontroller is programmed to control input and output data. When the pushbutton switches (S1 through S4) are open, logic 0 is constantly fed to the respective port pins of the microcontroller. When any of the buttons is pressed, logic 1 is fed to the respective port pin of the microcontroller. The device control program stored in the memory of the microcontroller activates and executes as per the Fig. 3: Block diagram of receiver section for wireless equipment control Fig. 4: Transmitter circuit ConstruCtion electroni cs for you August 2010 61 www. e f y mA g . c o m functions defned in the program for respective input switches. Data inputs AD8 through AD11 (pins 10 through 13) of HT12E are connected to the microcontroller. Pins 1 through 8 (A0 through A7) of the IC are address inputs. Shorting the address pins using switches to either Vcc or Gnd enables different address selections for data transmission. Here we have connected them to 5Vcc. Since address pins are connected to 5V, the address is set to 255d (in decimal). If you were to connect all the address pins to ground, the address would be 000d. Thus there are 256 possible addresses available. So you can set up switches to control one or more of the encoder address pins. Pin 14 is a transmit-enable (TE) input pin. The encoder will send data only when pin 14 is connected to ground. Whenever a button is pressed, logic 0 is sent to this pin through the microcontroller, thus activating it and enabling transmission. Pin 17 is the data-out (D out ) pin that sends a serial stream of pulses containing the address and data. It is connected to the data input pin of the TRX RF module. The time-out control is set using in- put keys S1 through S4 to turn on/off the devices at predetermined time. The default time for all the devices is 00 seconds. So using up key you can in- crement time by one second, and using down key you can decrement time one second down. At the same time, the LCD module shows the current status of increments and decrements. When the time-out for a device is set, press ent key so that the program control transfers to the next device for time-out settings. In the same way, the remaining three time-out settings must be done be- fore pressing run key. When run key is pressed, it executes the device control program subroutine in the mi crocont rol l er and the program automatically col- lects the time-out i nformati on en- tered by the user and sends the pro- cessed data to encoder IC HT12E. The encoder IC sends the data to D in (pin 2) of the RF transmitter module. The data is transmitted by the TRX-434 module to the receiver section through the antenna. Receiver circuit. Fig. 5 shows the receiver circuit. The RF receiver (RX- 434) module can receive the signal transmitted by the transmitter from a distance of up to 9 metres (30 feet). The range can be increased up to 30 metres using a good antenna. D out pin of RX-434 RF module is connected to D in pin of decoder IC HT12D (IC4). D in pin of IC4 receives address and data bits serially from the RF module. Decoder IC4 separates data and address from the received information. It accepts data only if the received address matches with the ad- dress assigned to encoder IC1 (HT12E). We have used 1111 as the permanent address for communication. Pins 1 through 8 of IC4 are address pins and therefore 256 possible addresses are available. The address on the encoder and decoder ICs must match for the data to be valid. The HT12D decoder receives serial addresses and data from the encoder that are transmitted by a carrier signal over RF medium. The decoder com- Fig. 5: Receiver circuit Fig. 6: Software fow-chart ConstruCtion 62 August 2010 electroni cs for you www. e f y mA g . c o m Fig. 9: An actual-size, single-side PCB layout of receiver circuit for wireless equipment control Fig. 10: Component layout for the PCB in Fig. 9 Fig. 7: An actual-size, single-side PCB layout of transmitter circuit for wireless equipment control Fig. 8: Component layout for the PCB in Fig. 7 pares the serial input data three times continuously with its local addresses. If no error or unmatched codes are found, the input data codes are decod- ed and transferred to the output pins. VT pin (valid transmission) goes high to indicate a valid transmission. The HT12D provides four latch-type data pins whose data remains unchanged until new data is received. Data pins D8 through D11 (pins 10 through 13) of the decoder send 4-bit data to CD4519 multiplexer IC5. CD4519 multiplexer. This IC pro- vides four multiplexing circuits with common select inputs (S A and S B ); each circuit contains two inputs (An, Bn) and one output (On). It may be used to select 4-bit information from one of the two sources. There are eight input lines (A0 through A3 and B0 through B3), of which four (A0 through A3) are per- manently connected to Vcc through resistor R19, while the rest four (B0 through B3) are connected to the data output lines of the decoder (IC4). The select inputs can be connected to either Vcc or VT pin (pin 17) for latch or momentary mode-selection section. Jumper switch (JS) is used to select between latch and momentary operation. When latch mode is se- lected, data present at the output pins is latched, i.e., they remain the same and the respective relay energises until the next change is made in the mode selection. When momentary mode is selected, data present at the output pins is available as long as VT pin remains active-high. As soon as VT pin becomes active-low, the respective relay de-energises. The latched output data from mul- tiplexer CD4519 is fed to relay driver IC ULN2003, to control the devices (Device 1 through Device 4) through the relays (RL1 through RL4). VT pin is connected to LED4 through IC6 to ConstruCtion electroni cs for you August 2010 63 www. e f y mA g . c o m indicate the status of VT signal when it is active-high. software program The software fowchart programmed in the microcontroller of the trans- mitter section is shown in Fig. 6. It is written in Assembly language and compiled using ASM51 software to generate the hex code. The hex pro- gram can be burnt into the AT89C51 microcontroller by using any standard programmer available in the market. We have used TopView programmer from Frontline Electronics to program the microcontroller. The software program is designed to accept the input from the user as well as control the devices. It identifes the key pressed and displays the key code on the LCD module. In the program, the LCD module is initialised frst. As soon as the time-out is set, all the four devices turn on ini- tially, then a particular device turns off at preset time. In this project, the time- out range is 00 to 99 seconds, which can be easily modifed to extend the time duration in the delay subroutine of Assembly code. Port 0 is confgured as output port and interfaced with the RF module through encoder IC1. Port 1 is used for LCD interface and Port 2 is used for the input from push-to-on switches. Circuit operation When the system is switched on, the startup message press any key ap- pears on the LCD screen. When any key is pressed by the user, the LCD displays the message to set time out press ent!. Pressing ent key displays the follow- ing messages on the LCD with a cursor blinking near the frst device D1_T: D1_T= D2_T= D3_T= D4_T= Use up and down keys to set the time for controlling the devices. The set time for each device on the LCD screen looks like this: D1_T=10 D2_T=20 D3_T=30 D4_T=40 Now press ent key followed by run key. A device control subroutine executes and sends the data to the RF module, which transmits the data through ANT antenna. You can set maximum of 99 seconds as the control time for the device. If you set it to 00, a particular device is turned on for infnite time. Construction An actual-size, single-side PCB layout of the transmitter for wireless equip- ment control using microcontroller is shown in Fig. 7 and its component layout in Fig. 8. The actual-size, single- side PCB layout for the receiver circuit is shown in Fig. 9 and its component layout in Fig. 10. EFY. The source codes of this pro- ject have been included in this months EFY-CD and are also available on www.efymag.com website. Dr H.N. Pandya is head of Department of Electron- ics, Dr Anandkumar Atalbihari Bhaskar is a lecturer and Ms Seema J. Oza is a research scholar in Department of Electronics at Saurashtra Univer- sity, Rajkot