You are on page 1of 88
PROJECT REPORT 1 PROJECT REPORT ON WIRELESS ELECTRONIC NOTICE BOARD BY ANOOP M P ANUJITH BS NIDHIN S$ SAJAN CK SREENITH S UNNI KRISHNAN G A VISHNU S S DIPLOMA IN ELECTRONICS & COMMUNICATION DEPARTMENT OF ELECTRONICS AND COMMUNICATION GOVT. POLYTECHNIC COLLEGE NEY YATTINKARA 2017 Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 2 PROJECT REPORT ON WIRELESS ELECTRONIC NOTICE BOARD BY ANOOP M P ANUJITH BS NIDHIN S$ SAJAN CK SREENITH S UNNI KRISHNAN G A VISHNU S S DIPLOMA IN ELECTRONICS & COMMUNICATION DEPARTMENT OF ELECTRONICS AND COMMUNICATION GOVT. POLYTECHNIC COLLEGE NEYYATTINKARA 2017 Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 3 DEPARTMENT OF' ELECTRONICS AND COMMUNICATION GOVERNMENT POLYTECHNIC COLLEGE NEYYATTINKARA 2017 Certificate This is to certify that this seminar report is a bonafide record of the work done by ANOOP M P, ANUJITH B S, NIDHIN S, SAJAN C K, SREEJITH 8, UNNI KRISHNAN GA, VISHNU S S, under my guidance towards the partial fulfillment of the requirement for the award of Diploma in Electronics and Communication Engineering of the Department of Technical Education, Kerala during the year 2017. Guided By SRILSULFICAR A Smt. Reeya George HEAD OF DEPARTMENT Lecturer ELECTRONICS &COMMUNICATION Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 4 ACKOWLEDGEMENT We take this opportunity to express our sincere gratitude and profound obligation to Sri. SULFICAR A, Head of Department of Electronics and Communication engineering, Govt Polytechnic College Neyyattinkara. We ako wish to express our gratitude to SriPAVITHRAKUMAR G, Smt. DIVYA C SrLARAVIND SEKHAR R, SmtREEYA GEORGE, for his hep and encouragement done through this, work Last but not the kast; We are extremely grateful to all our fiiends without whose timely aid could not have completed the work successfully. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 5 CONTENT + INTRODUCTION... nid) MODULE ~ 1 GENERAL BLOCK DIAGRAM. 6 1.1 BLOCK DIAGRAM OF WIRELESS NOTICE BOARD. aa 1.2 LIQUID CRYSTAL DISPLAY....... 1.3 USART, 10 1.4 MUX. 1.5 MAX232 CONVERTER. 14 1.6 ZIGBEE. SSUSNERIORS 17 1.7 GSM MODULE. 22 1.8 RESET LOGIC. 1.9 CRYSTAL OSCILLATOR. % 26 1.10 BUZZER, cosets 1.11 POWER SUPPLY 31 “ MODULE - I COMPLETE CIRCUITE DIAGRAM........ sovsepeaes sa 33 2.1 SYSTEM REQUIREMENTS. 2.2 CIRCUIT OF LCD INTERFACING WITH ATMEGA32. 36 2.3 INTERFACING GSM WITH MICROCONTROLLER, 38 2.4 INTERFACING MAX232 WITH MICRCONTROLLER. ......22:0+sescesseveeee 40 2.5 OVERALL CIRCUIT DIAGRAM a2 Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT “ MODULE - IIL COMPONENT DISCREPTION... 3.1 GSM.. 3.2. ATMEGA32 3.3 POWER SUPPLY... 3.4 CRYSTAL OSCILLATOR. “MODULE -IV WORKING & PROGRAMMING. .......0.00000 4.1 WORKING 4.2 PROGRAMME... cece 65 “CONCLUSIONS. 83 “ REFERENCE...... Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 7 INTRODUCTION Wireless. communication has announced its arrival on big stage and the world is going mobile. We want to control everything and without moving an inch, This remote controlof appliances is possible through Embedded Systems. The use of “Embedded System inCommunication” has given rise to many interesting applications that ensures comfort and safety to human life. The main aim of this project will be to design a SMS driven automatic display board which can replace the currently used programmable electronic display. It is proposed to design receiver cum display board which can be programmed from an authorized mobile phone, The message to be displayed is sent (hrough a SMS from an authorized transmitter. The microcontroller receives the SMS, validates the sender and displays the desired information. Started off as an instantaneous NEWS display unit, we have improved upon it and tried to take advantage of the computing capabilities of microcontroller. Looking into current trend of information transfer in the campus, it is seen that important notice take time to be displayed in the notice boards. This latency is not expected in most of the and must be avoided. It is proposed to implement this project at the institute level. It is proposed to place display boards in major access points. ‘The electronic displays which are currently used are programmable displa which need to be reprogrammed each time. This makes it inefficient for immediate information transfer, and thus the display board loses its importance, The GSM based display board can be used as an add-on to these display boards and make it tly wireless. The display board programs itself with the help of the incoming SMS with proper validation, Such a system proves to be helpful for immediate information transfer. ‘The system required for the purpose is nothing but a Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 8 Microcontroller based SMS box. The main components of the kit include microcontroller, GSM modem. These components are integrated with the display board and thus incorporate the wireless features. The GSM modem receives the SMS. The AT commands are serially transferred to the modem through serial transmit and receive connection. In return the modem transmits the stored message through the same serial port. The microcontroller validates the SMS and then displays the message on the LCD display board. Various time division multiplexing techniques have been suggested to make the display boards functionally efficient. The microcontroller used in this case is ATMEGA32 SIMCOM 900A js used as the GSM modem. The data will be displayed only after entering unique pass key. In addition to that address matching is done and data can be receive only by the dedicated receiver, and this data is displayed on LCD display. The main focus of the thesis is on displaying information to a dedicated LCD display by the any part of world using GSM network, which facilitate to control any message board globally from any location. Message is Send from mobile to GSM Modem from any location where GSM mess wing service is available. Message is received at GSM modem and processed using microcontroller. Now message is stored in controller and displayed on LED display. Every unit is connected to power supply which is a prerequisite for operation. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT OVER ALL VIEW OF WIRELESS ELECTRONIC NOTICE BOARD LED DISPLAY , =) MESSAGE DATA SM MODEM Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT MODULE - 1 20 GENERAL BLOCK DIAGRAM 1.1 BLOCK DIAGRAM OF WIRELESS NOTICE BOARD Uo LCD DISPLAY LCD MODULE i BUZZER RESET A T M MUX CRYSTAL E OSCILLATOR S CONVERTER MAX232 E POWER SUPPLY ; | | ZIGBEE 2 GSM MODULE Government Polytechnic College, Neyyattinkara Eketronic & Communication PROJECT REPORT a 1.1.1 DESCRIPTION The system required for this purpose is nothing but, a Microcontroller based SMS box. ‘The main components of the kit ineludes Microcontroller, GSM modem. ‘These components are integrated with the display board and thus incorporate the wireless features. The GSM modem receives the SMS. The AT commands are serially transferred to the modem through MAX232. In retum the modem transmits the stored message through the COM port. The microcontroller validates the SMS and then displays the message in the LCD display board. Various time division nuiltiplexing techniques have been suggested to make the display boards function efficiently. The microcontroller used in this case is ATMEGA32Apu524, Motorola C168 is used as the GSM modem. In this prototype model, LCD display is used for simulation purpose. During the process of implementation this can be replaced by actual display boards. In addition to address matching, data can be received only by the dedicated receiver, and this data is displayed on LCD. It displays the same message until it receives another verified message. 1.2 LIQUID CRYSTAL DISPLAY LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred overseen segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 2 A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data. ‘The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD, Click to learn more about intemal structure of a LCD 1.2.1 PIN DIAGRAM O$HLE ZZSSRSaRBR ts gs = 82588228838 Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 3 Pin Function Name No 1 Ground (OV) Ground 2 Supply voltage; SV (4.7V — 5.3V) Vee 3 Contrast adjustment; through a variable resistor Vee 4 | Selects command register when low; and data register Register when high Select 5 Low to write to the register: High to read from the Read/write register 6 | Sends data to data pins when a high to low puke is Enable given 7 DBO 8 DBI 9 DB2 10 DB3 i 8-bit data pins Dat 12 DBS 13 DB6 14 DB7 is Backlight Vec (5V) Led+ 16 Backlight Ground (OV) Led- Government Polytechnic College, Neyyattinkara Eketronic & Communication PROJECT REPORT aa 1.3 USART A Universal Synchronous/Asynchronous Receiver/Transmitter (USART ) is a type of a serial interface device that can be programmed to communicate asynchronously or synchronously. See Universal asynchronous receiver/transmitter (UART) for a discussion of the asynchronous capabilities of these devices. ++ PURPOSE AND HISTORY The USART's synchronous capabilities were primarily intended to support synchronous protocols like IBM'sSynchronous transmit-receive (STR),Binary Synchronous Communications (BSC), Synchronous Data Link Control (SDLC), and the ISO-standard High-Level Data Link Control (HDLC) synchronous link- layer protocols, which were used with synchronous voice-frequency modems These protocols were designed to make the best use of bandwidth when modems were analog devices. In those times, the fastest asynchronous voice-band modem could achieve at most speeds of 300 bit/s using frequency-shift keying modulation «while synchronous modems could run at speeds up to 9600 bit/s using phase-shift keying . Synchronous transmission used only slightly over 80% of the bandwidth of the now more-familiar asynchronous transmission, since start and stop bits were unnecessary. Those modems are obsolete, having been replaced by modems which convert asynchronous data to synchronous forms, but similar synchronous telecommunications protocols survive in numerous block-oriented technologies such as the widely used IEEE 802.2 (Ethemet) link-level protocol. USARTs are still sometimes integrated with MCUs. USARTs are still used in routers that connect to external CSU/DSU devices, and they often use either Cisco's Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 15 proprietary HDLC implementation or theIETF standard Point-to-Point Protocol in HDLC-like framing as defined in RFC 1662 + OPERATION ‘The operation of a USART is intimately related to the various protocols; refer to those pages for details, This section only provides a few general notes. USARTS in synchronous mode tansmit data in frames. In synchronous operation, characters must be provided on time until a frame is complete; if the controlling processordoes not do so, this is an"underrun error ," and tansmission of the frame is aborted USARTs operating oriented mode. In character (STR and BSC) modes, the device relied on particular as synchronous devices used either character-oriented or bit- characters to define frame boundaries; in bit (HDLC and SDLC) modes earlier devices relied on physical-layer signals, while later devices took over the physical- layer recognition of bit pattems. ‘A synchronous line is never silent; when the modem is transmitting, data is flowing. When the physical layer indicates that the modem is active, a USART will send a s eady stream of padding, either characters or bits as appropriate to the device and protocol. 1.4 MUX In electronics, a multiplexer (or mux) is a device that selects one of several Analog or digital input signals and forwards the selected input into a single line.A. multiplexer of 2 n inputs has n select lines, which are used to select which input line to send to the output. Multiplexers are mainly used to increase the amount of data that can be sent over the network within a certain amount of time and Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 16 bandwidth. A multiplexer is also called a data selector. Multiplexers can also be used to implement Boolean functions of multiple variables. An electronic multiplexer makes it possible for several signals to share one device or resource, for example one A/D converter or one communication line, instead of having one device per input signal. Conversely, a demultiplexer (or demux ) is a device taking a single input signal and selecting one of many da -output-lines, which is connected to the single input. A multiplexer is often used with a complementary demultiplexer on the receiving end. An electronic multiplexer can be considered as a multiple-input, single- output switch, and a demultiplexer as asingle-input, multiple-output switch. The schematic symbol for a multiplexer is an isosceles trapezoid with the longer parallel side containing the input pins and the short parallel side containing the output pin.[4] The schematic on the right shows a 2-to-1 multiplexer on the left and an equivalent switch on the right. The wire connects the desired input to the output. Cost saving The basic function of a multiplexer: combining multiple inputs into a single data stream. On the receiving side, a demultiplexer splits the single data stream into the original multiple signals. One use for multiplexers is economizing connections over a single channel, by connecting the multiplexer's single output to the demultiplexer's single input. ‘The image to the right demonstrates this benefit. In this case, the cost of implementing separate channels for each data source is higher than the cost and inconvenience of providing the muliplexing/demultiplexing_ functions Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT Fed At the receiving end of the data link a complementary demultiplexer is usually required to break the single data stream back down into the original streams. In some cases, the far end system may have functionality greater than a simple demultiplexer; and while the demuliplexing still occurs technically, it may never be implemented discretely. This would be typical when: a multiplexer serves a number of IP network users; and then feeds directly into a router, which immediately reads the content of the entire link into its routing processor; and then does the demultiplexing in memory from where it will be converted directly into IP sections ly out, — out I J ~ sel sel! MULTIPLEXER Often, a multiplexer and demultiplexer are combined together into a single piece of equipment, which is conveniently referred to as a "multiplexer". Both circuit elements are needed at both ends of a transmission link because most communications systems transmit in both directions. In analog circuit design, a multiplexer is a special type of analog switch that connects one signal selected from several inputs to a single output. Digital multiplexers In digital circuit design, the selector wires are of digital value. In the case of a 2-to-1 multiplexer, a logic value of 0 would connect to the output while a logic Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 18 value of 1 would connect to the output. In larger multiplexers, the number of selector pins is equal towhere is the number of inputs For example, 9 to 16 inputs would require no fewer than 4 selector pins and 17 to 32 inputs would require no fewer than 5 selector pins. The binary value expressed on these selector pins determines the selected input pin. ‘A 2-to-I multiplexer has a boolean equation where and are the two inputs, is the selector input, and is the output: sel | sel DEMULTIPLEXER 1.5 MAX232 CONVERTER ‘The MAX232 is an integrated circuit first created in 1987 by Maxim Integrated Products that converts signals from a TIA-232 (RS-232) serial port to signals suitable for use in TTL-compatible digital logic circuits. The MAX232 is a dual transmitter / dual receiver that typically is used to convert the RX, TX, CTS, RTS signals. The drivers provide TIA-232 voltage level outputs (about +7.5 volts) from a single 5-volt supply by on-chip charge pumps and external capacitors. This makes Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT as it useful for implementing TIA-232 in devices that otherwise do not need any other voltages. The receivers reduce TIA-232 inputs, which may be as high as +25 volts, to standard 5 volt TTL levels. These receivers have a typical threshold of 1.3 volts and a typical hysteresis of 0.5 volts. The MAX232 replaced an older pair of chips MC1488 and MC1489 that performed similar RS-232 translation. The MC1488 quad transmitter chip required 12 volt and -12 volt power, [1] and MC1489 quad receiver chip required 5 volt power, The main disadvantages of this older solution was the +/- 12 volt power requirement, only supported 5 volt digital logic, and two chips instead of one. Government Polytechnic College, Neyyattinkara * MAX232 vcc GND TL out Rl, RL, T1 T2, R2. “out Eketronic & Communication PROJECT REPORT 20 ‘The later MAX232A is backward compatible with the original MAX232 but may operate at higher baud rates and can use smaller external capacitors — 0.1 uF in place of the 1.0 uF capacitors used with the original device. [3] The newer MAX3232 and MAX3232E are also backwards compatible, but operates at a broader voltage range, from 3 to 5.5 V. Pin-to-pin compatible versions from other manufacturers are ICL232, SP232, ST232, ADM232 and HIN232. Texas Instruments makes compatible chips, using MAX232 as the part number. 1.5.1 VOLTAGE LEVELS It is helpful to understand what occurs to the voltage levels. When a MAX232 IC receives a TTL level to convert, it changes a TTL logic 0 to between +3 and +15 V, and changes TTL logic 1 to between —3 and —15 V, and vice versa for converting from TIA-232 to TTL. This can be confusing when you realize that the TIA-232 data transmission voltages at a certain logic state are opposite from the TIA-232 control line voltages at the same logic state. To clarify the matter, see the table below. For more information, see RS-232 voltage levels Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT TIA-232 line type and logic level Data transmission CRx/Tx) logic O Data transmission CRx/Tx) logic 4 Control signals CRTS/CTss DTR/DSR) logic °o Control signals CRTS/CTs’ DTR/DSR) logic a 1.6 ZIGBEE IA-232 voltage +3V to +15V -3V to -—15Vv —-3V to —1sv +3V to +15V a TT4k voltage tos from mMax232 ov sv sv ZIGBEE is an IEEE 802.15.4 -based specification for a suite of high-level communication protocols used to create personal area networks with small, low- power digital radios, such as for home automation, medical device data collection, and other low-power low-bandwidth needs, designed for small scale projects which need wireless connection. The technology defined by the ZIGBEE specification is intended to be simpler and less expensive than other wireless personal area networks (WPANS), such as Bluetooth or Wi-Fi . Applications include wireless light switches, electrical Government Polytechnic College, Neyyattinkara Eketronic & Communication PROJECT REPORT 2 meters with in-home-displays, traffic management systems, and other consumer and industrial equipment that requires short-range low-rate wireless data transfer. Its low power consumption limits transmission distances to 10-100 meters line-of- sight , depending on power output and environmental characteristics. [2] ZigBee devices can transmit data over long distances by passing data through a mesh network of intermediate devices to reach more distant ones. ZIGBEE is typically used in low data rate applications that require long battery life and secure networking (ZigBee networks are secured by 128 bit symmetric encryption keys.) ZigBee has a defined rate of 250 kbit/s, best suited for intermittent data transmissions from a sensor or input device. ZigBee was conceived in 1998, standardized in 2003, and revised in 2006. The name refers to the waggle dance of honey bees after their return to the beehive. ZigBee is a low-cost, low-power, wireless mesh network standard targeted at the wide development of long battery life devices in wireless control and monitoring applications. Zigbee devices have low latency, which further reduces average current. ZigBee chips are typically integrated with radios and with microcontrollers that have between 60-256 KB of flash memory. ZigBee operates in the industrial, scientific and medical (ISM ) radio bands: 2.4 GHz in most jurisdictions worldwide: 784 MHz in China, 868 MHz in Europe and 915 MHz in the USA and Australia, Data rates vary from 20 kbit/s (868 MHz band) to 250 kbit/s (2.4 GHz band). ‘The ZigBee network layer natively supports both star and tree networks, and generic mesh networking, Every network must have one coordinator device, tasked with its creation, the control of its parameters and basic maintenance, Within star networks, the coordinator must be the central node, Both trees and meshes allow the use of ZigBee routers to extend communication at the network level. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 23 ZigBee builds on the physical layer and media access control defined in TEEE standard 802.15.4 for low-rate WPANs . The specification includes four additional key components: network layer, application layer, ZigBee device objects (ZDOs) and = manufacturer-defined application objects which allow for customization and favor total integration, ZDOs are responsible for some tasks, including keeping tack of device roles, managing requests to join a network, as well as device discovery and security. ZigBee is one of the global standards of communication protocol formulated by the significant task force under the IEEE 802.15 working group. The fourth in the series, WPAN Low Rate/ZigBee is the newest and provides specifications for devices that have low data rates, consume very low power and are thus characterized by long battery life. Other standards like Bluetooth and IrDA address high data rate applications such as voice, video and LAN communications. ZIGBEE DEVICES ARE OF THREE KINDS: + ZigBee Coordinator (ZC) : The most capable device, the Coordinator forms the root of the network tree and might bridge to other networks. There is precisely one ZigBee Coordinator in each network since it is the device that started the network originally (the ZigBee LightLink specification also allows operation without a ZigBee Coordinator, making it more usable for over-the-shelf home products). It stores information about the network, including acting as the Trust Center & repository for security keys. * ZigBee Router (ZR) : As well as running an application function, a Router can act as an intermediate router, passing on data from other devices. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 24 + ZigBee End Device (ZED) : Contains just enough functionality to talk to the parent node (either the Coordinator or a Router); it cannot relay data from other devices, This relationship allows the node to be asleep a significant amount of the time thereby giving long battery life. A ZED requires the least amount of memory, and, therefore, can be less expensive to manufacture than a ZR or ZC. ‘The current ZigBee protocols support beacon and non-beacon enabled networks, In non-beacon-enabled networks, an unslotted CSMA/CA channel access mechanism is used. In this type of network, ZigBee Routers typically have their receivers continuously active, requiring a more robust power supply. However, this allows for heterogeneous networks in which some devices receive continuously while others only transmit when an external stimulus is detected. The typical example of a heterogeneous network is a wireless light switch: The ZigBee node at the lamp may constantly receive, since it is connected to the mains supply, while a battery-powered light switch would remain asleep until the switch is thrown. The switch then wakes up, sends a command to the lamp, receives an acknowledgment, and returns to sleep. In such a network the lamp node will be at least a ZigBee Router, if not the ZigBee Coordinator: the switch node is typically a ZigBee End Device. In beacon-enabled networks, the special network nodes called ZigBee Routers transmit periodic beacons to confirm their presence to other network nodes. Nodes may sleep between beacons, thus lowering their duty cycle and extending their battery life. Beacon intervals depend on data rate; they may range from 15.36 milliseconds to 251.65824 seconds at 250 kbit/s , from 24 milliseconds to 393.216 seconds at 40 kbit/s and from 48 milliseconds to 786.432 seconds at 20 Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 25 kbit/s. However, low duty cycle operation with long beacon intervals requires precise timing, which can conflict with the need for low product cost. In general, the ZigBee protocols minimize the time the radio is on, so as to reduce power use. In beaconing networks, nodes only need to be active while a beacon is being transmitted. In non-beacon-enabled networks, power consumption is decidedly asymmetricak Some devices are always active while others spend most of their time sleeping. Except for the Smart Energy Profile 2.0, ZigBee devices are required to conform to the IEEE 802.15.4 -2003 Low-Rate Wireless Personal Area Network (LR-WPAN) standard. The standard specifies the lower protocol layers —the physical layer (PHY), and the Media Access Control portion of the data link layer (DLL). The basic channel access mode is "cartier sense, multiple access/collision avoidance” ( CSMA/CA). That is, the nodes talk in the same way that humans converse; they briefly check to see that no one is talking before he or she start, with three notable exceptions. Beacons are sent on a fixed timing schedule and do not use CSMA. Message acknowledgments also do not use CSMA. Finally, devices in beacon-enabled networks that have low latency real-time requirements may also use Guaranteed Time Slots (GTS), which by definition do not use CSMA. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPO! 26 1.7 GSM MODULE GSM/GPRS ModuleGSM/GPRS module is used to establish communication between a computer and a GSM-GPRS system. Global System for Mobile communication (GSM) is an architecture used for mobile communication in most of the countries. Global Packet Radio Service (GPRS) is an extension of GSM that enables higher data transmission rate. GSM/GPRS module consists of a GSM/GPRS modem assembled together with power supply circuit and communication interfaces (like RS-232, USB, etc) for computer, The MODEM is the soul of such modules. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 27 1.7.1 WIRELESS MODEMS Wireless MODEMs are the MODEM devices that generate, transmit or decode data from a cellular network, for establishing communication between the cellular network and the computer. These are manufactured for specific cellular network (GSM/UMTS/CDMA ) or specific cellular data standard (GSM/UMTS/GPRS/ EDGE /HSDPA) or technology (GPS /SIM). Wireless MODEMS like other MODEM devices use serial communication to interface with and need Hayes compatible AT commands for communication with the computer (any microprocessor or microcontroller system). Government Polytechnic College, Neyyattinkara Ekstronic & Communication PROJECT REPORT 28 1.7.2 GSM/GPRS MODEM GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for communication of a computer with the GSM and GPRS network. It requires a SIM (Subscriber Identity Module) card just like mobile phones to activate communication with the network. Also they have IMEI (International Mobile Equipment Identity) number similar to mobile phones for their identification. A GSM/GPRS MODEM can perform the following operations: + Receive, send or delete SMS messages in a SIM. & Read, add, search phonebook entries of the SIM. + Make, Receive, or reject a voice call. Government Polytechnic College, Neyyattinkara Ekstronic & Communication PROJECT REPORT 28 The MODEM needs AT commands, for interacting with processor or controller, which are communicated through serial communication. These commands are sent by the controller/processor. The MODEM sends back a result after it receives a command, Different AT commands supported by the MODEM can be sent by the processor/controller/eomputer to interact with the GSM and GPRS cellular network. 1.7.3 GSM/GPRS MODULE A GSM/GPRS module assembles a GSM/GPRS modem with standard communication interfaces like RS-232 (Serial Port), USB etc., so that it can be easily interfaced with a computer or a microprocessor / microcontroller based system. The power supply circuit is also built in the module that can be activated by using a suitable adaptor. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 30 1.8 RESET LOGIC From the Logic Menu, Retums the logic objects to their original state. Counters and Shifters are returned (o their initial values, but logic sources are not changed. 1.9 CRYSTAL OSCILLATOR = A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a precise frequency. This frequency is commonly used to keep track of time, as in quartz wristwatches, to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits incorporating them became known as crystal oscillators, [1] but other piezoelectric materials including polycrystalline ceramics are used in similar circuits. Quartz crystals are manufactured for frequencies from a few tens of kilohertz to hundreds of megaher More than two billion crystals are manufactured annually. Most are used for consumer devices such as wristwatches, Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 31 clocks, radios, computers, and cellphones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes. 1.9.1 TERMINOLOGY A crystal oscillator is an electronic oscillator circuit that uses a piezoelectric resonator, a crystal, as its frequency-determining element, Crystal is the common term used in electronics for the frequency-determining component, a wafer of quartz, crystal or ceramic with electrodes connected to it. A more accurate term for it is piezoelectric resonator . Crystals are also used in other types of electronic circuits, such as crystal filters Piezoelectric resonators are sold as separate components for use in crystal oscillator circuits. An example is shown in the picture. They are also often incorporated in a single package with the crystal oscillator circuit, shown on the right-hand side. 1.9.2 OPERATION A crystal is a solid in which the constituent atoms , molecules , or ions are packed in a regularly ordered, repeating pattem extending in all three spatial dimensions. Almost any object made of an elastic material could be used like a crystal, with appropriate transducers, since all objects have natural resonant frequencies of vibration . For example, steel is very elastic and has a high speed of sound. It was Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 32 often used in mechanical filters before quartz. The resonant frequency depends on size, shape, elasticity, and the speed of sound in the material. High-frequency crystals are typically cut in the shape of a simple, rectangular plate. Low-frequency crystals, such as those used in digital watches, are typically cut in the shape of a tuning fork . For applications not needing very precise timing, a low-cost ceramic resonator is often used in place of a quartz crystal. When a crystal of quarz is properly cut and mounted, it can be made to distort in an electric field by applying a voltage to an electrode near or on the crystal. This property is known as electrostriction or inverse piezoelectricity. When the field is removed, the quartz generates an electric field as it returns to its previous shape, and this can generate a voltage. The result is that a quartz crystal behaves like an RLC circuit, composed of an inductor, capacitor and resistor , with a precise resonant frequency. Quartz has the further advantage that its elastic constants and its size change in such a way that the frequency dependence on temperature can be very low. The specific characteristics depend on the mode of vibration and the angle at which the quartz is cut (relative to its crystallographic axes). Therefore, the resonant frequency of the plate, which depends on its ize, does not change much. This means that a quartz clock, filter or oscillator remains accurate. For critical applications the quartz oscillator is mounted in a temperature-controlled container, called a crystal oven , and can also be mounted on shock absorbers to prevent perturbation by extemal mechanical vibrations. Modeling Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 33 1.9.3 ELECTRICAL MODEL A quartz crystal can be modeled as an electrical network with a low-impedance (series) and a high-impedance (parallel) resonance points s ‘Mathematically (using the Laplace transform ), the impedance of this network can ed closely together. be written as: Schematic symbol and equivalent circuit for a quartz. crystal in an oscillator o—j0t——_o GQ i R, ry (cg sen) Ri +s +u,? hy 2 1 3-Cy or Zs) = (s+ Co) |s? + i + wp?) 1 C1+Cy wy, Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 34 Where s is the complex frequency (), is the series resonant angular frequency , and is the parallel resonant angular frequency Adding capacitance across a crystal causes the (parallel) resonant frequency to decrease, Adding inductance across a crystal causes the (parallel) resonant frequency to increase. These effects can be used to adjust the frequency at which a crystal oscillates. Crystal manufacturers normally cut and trim their crystals to have a specified resonant frequency with a known “load” capacitance added to the crystal. For example, a crystal intended for a 6 pF load has its specified parallel resonant frequency when a 6.0 pF capacitor is placed across it. Without the load capacitance, the resonant frequency is higher. 1.10 BUZZER A buzzer is a mechanical, electromechanical, magnetic, electromagnetic, electro-acoustic or piezoelectric audio signalling device. A piezo electric buzzer can be driven by an oscillating electronic circuit or other audio signal source. A click, beep or ring can indicate that a button has been pressed Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 35 1.11 POWER SUPPLY A power supply is an electronic device that supplies electric energy to an electrical load . The primary function of a power supply is to convert one form of electrical energy to another and, as a result, power supplies are sometimes referred to as electric power converters Some power supplies are discrete, stand-alone devices, whereas others are built into larger devices along with their loads. Examples of the latter include power supplies found in desktop computers and consumer electronics devices Every power supply must obtain the energy it supplies to its load, as well as any energy it consumes while performing that task, from an energy source. Depending on its design, a power supply may obtain energy from various types of energy sources, including electrical energy transmission systems, energy storage devices s ch as a batteries and fuel cells , electromechanical systems such as generators and alternators , solar power converters, or another power supply. All power supplies have a power input , which receives energy from the energy source, and a power output that delivers energy to the load. In most power supplies the power input and output consist of electrical connectors or hardwired circuit connections, though some power supplies employ wireless energy transfer in liew of galvanic connections for the power input or output, Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 36 IOVAC Ol (12042) Some power supplies have other types of inputs and outputs as well, for functions such as external monitoring and control. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 37 MOFULE- IT COMPLETE CIRCUITE DIAGRAM 2.1 SYSTEM REQUIREMENTS The main aim of this project is to design a SMS driven automatic display board which can replace the currently used programmable electronic display. It is proposed to design receiver cum display board which can be programmed from an authorized mobile phone. The message to be displayed is sent through a SMS from an authorized transmitter. The microcontroller receives the SMS, validates the sending Mobile Identification Number (MIN) and displays the desired information. 2.1.1 REQUIRED SYSTEM FUNCTIONALITY The system required for the purpose is a Microcontroller based SMS box. The main components of the kit include microcontroller, GSM modem. These components are integrated with the display board and thus incorporate the wireless features. The GSM modem receives the SMS. The AT commands are serially transferred to the modem through RX-TX connection. In retum the modem transmits the stored message through the COM port. The microcontroller validates the SMS and then displays the message in the LCD display board. Various time division multiplexing techniques have been suggested to make the display boards functionally efficient. The microcontroller used in this case is AT89S52. Simcom sim300 is used as the GSM modem. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 38 In the prototype model, 16x2 character LCD display is used for simulation purpose. While implementation this can be replaced by actually display boards The data will be displayed only after entering unique pass key. In addition to that address matching is done and data can be received only by the dedicated receiver, and this data is displayed on LCD. The main focus of the project is on displaying information to a dedicated LCD by the any part of world using GSM network, which facilitate to control any message board globally from any location. 2.1.2 HARDWARE REQUIREMENTS Hardware Specification Components GSM MODEM Simcom sim300 sIM Any SIM Microcontroller ATMEGA32A Power supply or Power Adapter Sv ~ I2v de power supply Transformer with Rectifier 230v AC to 12v DC Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT LCD 16x2 character display MAX 232 Miscellaneous 2.1.3 SOFTWARE REQUIREMENTS Software Tools Description Embedded C ‘The functionality of the System is programmed using Embedded C (Microcontroller) Keil Software The programmed ¢ file (file.c) is converted to hex file using Keil software MS Hyper Terminal To connect GSM Government Polytechnic College, Neyyattinkara 38 Eketronic & Communication PROJECT REPORT 40 2.2 CIRCUIT FOR LCD INTERFACING WITH ATMEGA32 Loot Government Polytechnic College, Neyyattinkara Ekstronic & Communication PROJECT REPORT a Circuit diagram for LCD interfacing with 8051 microcontroller is shown in the above figure. If you have basic understanding of 8051 then you must know about EA(PIN 31), XTALI & XTAL2, RST pin(PIN 9), Vec and Ground Pin of 8051 microcontroller. I have used these Pins in above circuit. Ifyou don’t have any idea about that then I recommend you to read this Article LED Interfacing with 8051 Microcontroller before going through LCD interfacing. So besides these above pins we have connected the data pins (DO-D7) of LCD to the Port 2 (P2_0~ P2_7) microcontroller. And control pins RS, RW and E to the pin 12,13,14 (pin 2,3,4 of port 3) of microcontroller respectively. PIN 2(VDD) and PIN 15(Backlight supply) of LCD are connected to voltage (Sv), and PIN 1 (VSS) and PIN 16(Backlight ground) are connected to ground. Pin 3(V0) is connected to voltage (Vcc) through a variable resistor of 10k to adjust the contrast of LCD. Middle leg of the variable resistor is connected to PIN 3 and other two legs are connected to voltage supply and Ground Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT a2 2.3 CIRCUIT DIAGRAM FOR INTERFACING GSM WITH MICROCONTROLLER TSS? FINA, PN 0 GHD Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 43 2.3.1 STEPS TO INTERFACE GSM MODEM WITH MICROCONTROLLER: STEP 1: MODEM TESTING: The Modem consists of two indicating LED’s Green and Red to indicate the availability of the network. Green indicates the availability of the network whereas red indicates its absence. Turn the modem ON and wait for some time to register itself in GSM network. STEP 2: INTERFACING WITH AVR MICROCONTROLLER: The Communication between AVR and modem takes place through USART protocol, GSM Modem SIM900 works on TTL level hence we can interface directly to RXD and TXD pins of AVR microcontroller. There is no need of using Voltage or level converter between them. However if you ever happen to buy a SIM300 or other module which operates above TTL level, you may want to use MAX232 level converter IC to make the communication possible, STEP 3: INITIALIZING MODEM: The modem must be Initialized using the commands and then the process you are about to carry out must be selected. In this tutorial am going to initialize the modem and them make it to send a message “Hi Murugan” to my mobile using the GSM modem. And then i will reply to the message which will be displayed in the LCD interfaced to the microcontroller. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 4a 2.4 CIRCUITE DIAGRAM FOR INTERFACING MAX232 WITH MICROCONTROLLER A connection between a computer and a self build Adriano (or other microcontroller) is easy to make with a MAX232 chip. The figure below is an almost classic design. It is according to the October 2002 revision of the datasheet: C4 is connected between pin2 and earth, while in other designs it is connected between pin 2 and Vcc (cathode on Vcc). This circuit just worked for me, I guessed that if pin 2 has a higher potential than Vcc, it also has a higher potential than ground. In some circuits you will also find it connected between pin 2 and 6In principle you could do with only 2 signals (Tx and Rd), but I have added a reset that is connected to the RTS signal on the sub connector (Via the Max232 of course)Just for some clarification: Normally with a serial communication set up, the Tx signal of one device, is connected to the Rd pin of the other device. In this circuit, that is taken care of on the Sub connector: Pin 3 is the Tx signal, that goes to the RdIn (pin 8) of the chip. It is converted in voltage in the chip, then goes to RdOut on pin 9. That pin — though called Rd- then goes to the Rd pin on the Adriano/At mega/Pic. The connection between Tx and Rd already has been made, no need to switch that again, Same for the Tx signal of the microprocessor: It attaches to pinl0 on the ‘Max232, is converted and appears on pin 7 of the chip and then is brought to the Rd pin on the Sub connector. The DB9 plug in th epicure is a female plug looked at from the solder side. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 45 GND Voc Arduino Rd — i —{ RIS + Bale If for any reason one would prefer to use an old SubD25 serial connector, the table below shows the comesponding pins between the two. To make things a bit confusing both pin 2 and 3 have exactly opposite functions on these connectors. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 46 2.5 OVERALL CIRCUIT DIAGRAM FOR’ WIRELESS ELECTRONIC NOTICE BOARD at ma Peaaoon Pace prance Pesanes Peano esas peas paar Ham Ben een Government Polytechnic College, Neyyattinkara Lear uae. Eketronic & Communication PROJECT REPORT a7 MODULE - Il COMPONENTS DISCREPTION 3.1 GSM GSM Stands for Global Network for Mobile Communication. A GSM modem is a wireless modem that works with a GSM wireless network. GSM ‘Modem accepts a SIM card and operates over subscription to other users connected to the Network. The GSM modem can be internally connected to a device or external for use, GSM modem is a data communicating device. So the external GSM Modems has serial communication interface to communicate with the data terminal devices. Data terminal devices use special category of commands known as AT commands abbreviation of Attention Commands to operate GSM Modem. But AT commands were developed for the dial-up modems. So extended AT commands were developed to control GSM modem, which support lot of services related to SMS and SIM Memory access Following are some of the services supported by GSM Modem Reading, writing and deleting SMS messages. * Sending SMS messages. % Monitoring the signal strength. “# Reading, writing and searching phone book entries Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 48 3.1.1 GSM MODEM SPECIFICATIONS GSM modem is built with SIMCOM makes SIM900 Quad-Band GSM Engine. It works on 850 MHz, 900 MHz, 1800 MHz and 1900 MHz. ‘The Modem is designed with RS232 level converter circuitry, which allows you to directly interface PC serial port. The baud rate can be configurable from 9600-1 15200 through AT command. Initially modem is in Auto baud mode. It is suitable for SMS as well as data transfer application. The modem needed only 3 wires (Tx, Rx, GND) except Power supply to interface with microcontroller or PC. Using this modem, you will be able to send & read SMS, connect to internet via GPRS through simple AT commands. SIM900GSM MODEM Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT as 3.1.2 SPECIFICATION OF GSM MODEM SIM900, Specification Description Bands | Can support any of the bands out of 850/900/1800/1900 Supported MHz shence known as Quad-Band Control The device operation is controlled through extended AT commands a) Point-to-Point Mobile Originated and Mobile SMS via GSM Terminated Messages b) SMS Cell Broadcast c) Text and PDU modes available 40° C to 80° C Operating Temperature a) RS232 Serial interface Interfaces b) SMA Antenna Connector ©) DC Power pins ‘Antenna used for communication is GSM L Type Antenna antenna connected to Modem for operation through SMA. Antenna connector. The antenna has features as specified below a) Operating Frequencies ; 850/900/1800/1900/2100 MHz, b) Gain : 3 dbi ©) Power : 10 Watts d) Impedance : 50 ohms ° Polarization : vertical Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 50 3.1.3 TESTING OF GSM MODEM GSM Modem can be operated by connecting it to the desktop. GSM modem is connected to the system using RS-232 module, This is usually the first step in working with the GSM, because the operation between GSM Modem and system gives idea how the AT commands need to be sent for proper communication and what response is received corresponding to the command. The Software that makes it more comprehensive is the HyperTerminal, It acts as an interface between the serial communicating device and the terminal equipment. Whatever user want to send through serial communication, it is just need to be written on HyperTerminal and whatever received is shown on the Screen of HyperTerminal interface. HyperTerminal is used to troubleshoot GSM modem. Before you can use HyperTerminal to troubleshoot your modem, you must create a connection to the port the modem is using. To do so, follow these steps Click Start | Programs | Accessories | Communications | HyperTerminal. Once HyperTerminal opens, it will automatically prompt you to create a new connection if none exist. If no connection(s) exists, you can click File | New Connection to create a new one. Specify a name for the connection, choose an icon, and click OK. In the Connect to dialog box, choose the COM port being used by your modem. In the port property sheet that appears, choose a port speed (bits per second) that matches the device, Then, choose communications parameters that match the device that is the number of Data Bits, Start Bits, Stop Bits and Parity Bits Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT si When you click OK, HyperTerminal will immediately open a connection to the port. You'll then be ready to troubleshoot. Now, when you can type AT and press [Enter] in the HyperTerminal connection to test communications. You should receive an OK message if your settings are correct and the modem is working. 3.2 ATMEGA32 The ATmega32 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega32 achieves throughputs approaching 1 MIPS per MHz allowing the system designed to optimize power consumption versus processing speed. The AVR core combines a rich instruction set with 32 general purpose working registers, All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers The ATmega32 provides the following features: 32K bytes of In-System Programmable Flash Program memory with Read-While-Write capabilities, 1024 bytes EEPROM, 2K byte SRAM, 32 general purpose I/O lines, 32 general purpose working registers, a JTAG interface for Boundary-scan, On-chip Debugging support and programming, three flexible Timer/Counters with compare modes, Intemal and External Interrupts, a serial programmable USART, a byte oriented ‘Two-wire Serial Interface, an 8-channel, 10-bit ADC with optional differential input stage with programmable gain (TQFP package only), a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and six software Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 52 selectable power saving modes. The Idle mode stops the CPU while allowing the USART, Two-wire interface, A/D Converter, SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next External Interrupt or Hardware Reset. In Power-save mode, the Asynchronous Timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all /O modules except Asynchronous Timer and ADC, to minimize switching noise during ADC conversions. In Stand by mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low- power consumption. In Extended Standby mode,both the main Oscillator and the Asynchronous Timer continue to run, The device is manufactured using Atmel’s high density nonvolatile memory technology. The On-chip ISP Flash allows the program memory to be reprogrammed in-system through an SPI serial interface, by Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 53 a conventional nonvolatile memory programmer, or by an On-chip Boot program running on the AVR core. The boot program can use any interface to download the application program in the Application Flash memory. Sofware in the Boot Flash section will continue to run while the Application Flash section is updated, providing tue Read-While-Write operation, By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega32 is a powerfull microcontroller that provides a highly-flexible and cost-effective solution to many embedded control applications The ATmega32 AVR is supported with a full suite of program and system development tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators, and evaluation Kits Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT sa 3.2.1 BLOCK DIAGRAM OF ATMEGA32 Government Polytechnic College, Neyyattinkara Ekstronic & Communication PROJECT REPORT 55 3.2.2 PIN DIAGRAM OF ATMEGA32 (XCKITO) PRO L PAD (ADCO) (Tt) Pat c 39:19) PAt (ADC) INT2/AINO) PB2 38 |] PA2 (ADC2) (OCOIAINY) P83 PA3 (ADC) (58) Pad | PAS (ADC) (MOS) PBS | PAS (ADCS) (MISO) P85 1 PAB (ADCE) (80K) PBT PAT (ADC?) “) AREF vec (J 7) aN GND (; ) AVCG XTAL2 PCT (TOSC2) XTALY 7 Pb (TOSCH) (RXO) PDO PCS (TDI) (TX) PD1 ¢ | PC4 (TDO) (INTO) PD2 | PCS (TMS) (INTI) PDS J) PO2 (TCK) (OC1B) PD4 PCt (SDA) (OC1A) PDS | 3 PCO (SOL) (KP) POS h) Po? (002) Government Polytechnic College, Neyyattinkara Ekstronic & Communication PROJECT REPORT 56 VCC This pin provides supply voltage to the chip. The typical voltage source is +5V. Some AVR family members have lower voltages for VCC pins in order to reduce the noise and power dissipation of the AVR systems, AVCC AVCC is the supply is the supply voltage for PortA and A/D Converter. It should be externally connected to VCC, even if ADC is not used. % XTALI and XTAL2 ‘The ATmega32 has many options for the clock source. Most often a quartz crystal oscillator is connected to input pins of XTALI and XTAL2. The quartz crystal oscillator connected to XTALI and XTAL2 pins also need two capacitors. One side of each capacitor is connected to the ground as shown in the figure below, ATmega32 can have speeds from 0Hz to 16MHz. ves Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 57 + RESET Pin 9 (ATmega32, 40-PIN DIP) is the RESET pin. It is an input and is active LOW (normally high). When a LOW pulse is applied to this pin, the microcontroller will reset, and terminate all activities. After applying reset, the contents of all registers and SRAM locations will be cleared. The CPU will start executing the program from run locations 0x0000 after a brief delayed when reset pin is forced low and released. * PORTS OF ATMEGA32 The 40 pin DIP has for ports. They are PORTA, PORTB, PORTC and PORTD. To use any of these ports as input or output port, it must be programmed. In addition to being used for simple /O, each port has some other functions such as ADC, timers, interrupts, and serial communication pins. Each port has three /O registers associated with it. They are designed as PORTx, DDRx and PINB. DDR stands for Data Direction Register, and PIN stands for Port Input pins. Each of /O register is 8 bit wide, and each port has maximum of 8 pins. Relations between the registers and the pins of AVR DDRx 7 6 5 4 3 2 1 0 | PORTX e 6 3 [4 3 z T 0 PINx 7 6 = 3 2 1 0 Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 58 The DDRx I/O register is used solely for the purpose of making a given port an input or output port. For example, to make a port an output port, we write Ls to DDRx register. In other words, to output data to all of the pins of the PortB, we must put ObLILLL1111 into the DDR register to make all of the pins output. To make port an input port, we must first put Os into the DDRx register for that port, and bring (read) the data present at the pins. On reset, all ports have 0x00 in their DDR« register. Toread the data present at the pins, we should read PIN register. It must be noted that to bring data into CPU from pins we read the contents of the PINx register, whereas to send data out of pins we use the PORTx register 1 1 1 DDRx.n ' Pin n of port x Outside the AVR chip Inside the AVR chip The I/O Port in AVR All these pins can be programmed as either input or either output pins. There are special functions associated with each pins which will be taken later in text, Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT se 3.2.3 SERIAL COMMUNICATION Computers transfer data in two ways: parallel and serial, In parallel data transfers, often eight or more lines (wire conductors) are used to transfer data to a device that is only a few feet away, Devices that use parallel transfers include printers, each uses cable with many wires. Although a lot of data can be transferred in a short amount of time by using a wires in parallel, the distance cannot be great. To transfer to a device located many meters away, the serial method is used. In serial communication, the data is sent one bit at a time, in contrast to parallel communication, in which the data is sent a byte or more at a time. Basics of Serial Communication When the microcontroller communicates with the outside world, it provides the data in byte sized chunks. For some devices, such as printers, the information is simply grabbed from the 8-bit data bus presented to 8-bit data bus of the device. This can work only if the cable is not too long, because long cables diminish and even distort signals. Furthermore, an 8-bit path is expensive. For these reasons, the serial communication is used for transferring data between two systems located at distances of hundreds of feet to millions of miles apart. For serial communication to work the byte of data must be converted to serial bits using a parallel-in-serial- out shift register; then it can be transmitted over a single data line. This means that receiver end should serial-in-paralleLout shift register to receive the serial data and pack them into byte. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 60 Serial Transfer Parallel Transfer Receiver Serial versus Parallel Data Transfer Serial data communication uses synchronous method transfers a two methods, asynchronous and synchronous. The block of data at a time whereas the asynchronous method transfers a single byte at a time. It is possible to write software to use either of these methods, but the programs can be tedious and long These chips are commonly referred to as UART and USART. In data transmission, if the data can be both transmitted and received, it is a duplex transmission. This is in contrast to simplex transmission such as with printers, in which the computer sends data. Duplex transmissions can be half or full duplex, depending on whether or not data transmission can be simultaneous. If data is transmitted one way at a time, it is referred to as a half duplex. If the data can go both the ways at a time, it is full duplex. Of course, full duplex requires two wire conductors for data lines (in addition to signal ground), one for transmission and one for reception, in order to transfer and receive data simultaneously. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 6 3.2.4 ASYNCHRONOUS SERIAL COMMUNICATION AND DATA FRAMING ‘The data coming in at the receiving end of the data line is a serial data transfer is all Os and Is; it is difficult to make sense of the unless the sender and Teceiver agree ona set of rules, a protocol, on how data is packet, how many bits constitute a character, and when the data begins and ends. Asynchronous serial data communication is widely used for character-oriented transmissions, while block-oriented data transfers use the synchronous method Simplex a Half Duplex Tansniter Ny a * Full Duplex Transmitter — Simplex, Half, and Full-Duplex Transfers Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 62 3.3 POWER SUPPLY A power supply is a device that supplies electric power to an electrical load. The term is most commonly applied to electric power converters that convert one form of electrical energy to another, though it may also refer to devices that convert another form of energy (mechanical, chemical, solar) to electrical energy. Aregulated power supply is one that controls the output Voltage or current to a specific value; the controlled value is held nearly constant despite Variations in either load current or the Voltage supplied by the power supply’s energy source ‘ 4 4 {| ‘ " un we. “L_. Cocapeouers of otypveal linear poorer soppy Government Polytechnic College, Neyyattinkara Ekstronic & Communication PROJECT REPORT 63 “+ TRANSFORMER ‘Transformers convert AC electricity from one voltage to another with a little loss of power. Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformer to reduce the dangerously high voltage to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils; instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. ‘Transformers waste very little power so the power out is (almost) equal to the power in, Note that as voltage is stepped down and current is stepped up. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 64 The ratio of the number of tums on each coil, called the turn’s ratio, determines the ratio of the voltages. A step-down transformer has a large number of tums on its primary(input) coil which is connected to the high voltage mains supply, and a small number of tums on its secondary (output) coil to give a low ‘output voltage. TURNS RATIO = (Vp/Vs) = (Np/Ns) Where, Vp = primary (input) voltage Vs = secondary (output) voltage Np = number of tums on primary coil Ns = number of turns on secondary coil Ip = primary (input) current Is = secondary (output) current. * RECTIFIER A rectifier is an electrical device that converts AC, which periodically reverses direction to DC current that flows in only one direction, a process known as rectification, Rectifiers have many uses including as components of power supplies and as detectors of radio signals. Rectifiers may be made of solid state diodes, vacuum tube diodes, mercury are valves, and other components. The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 65 rectifier is used because of its merits like good stability and fall wave rectification. In positive half cycle only two diodes( 1 set of parallel diodes) will conduct, in negative half cycle remaining two diodes will conduct and they will conduct only in forward bias only. Load + FILTER Capacitive filter is used in this project. It removes the ripples from the output of rectifier and smoothens the D.C. Output received from this filter is constant until the mains voltage and Joad is maintained constant. However, if either of the two is varied, D.C. voltage received at this point changes. Therefore a regulator is applied at the output stage. The simple capacitor filter is the most basic type of power supply filter. The use of this filter is very limited, It is sometimes used on extremely high-voliage, low- Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 66 current power supplies for cathode-ray and similar electron tubes that require very little load current from the supply. This filter is also used in circuits where the power-supply ripple frequency is not critical and can be relatively high. Below figure can show how the capacitor charges and discharges. Resistor, R I Capacitor. { ++ VOLTAGE REGULATOR 7805 The LM78XX/LM78XXA series of three-terminal positive regulators are available in the TO-220/D-PAK package and with several fixed output voltages, making them useful in a Wide range of applications. Each type employs internal current limiting, thermal shutdown and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output Current. Although designed primarily as fixed voltage regulators, Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 67 these devices can be used with extemal components to obtain adjustable voltages and currents. INPUT 7805 OUTPUT GND 0.33uF O.1uF 3.4 CRYSTAL OSCILLATOR ‘The crystal oscillator circuit sustains oscillation by taking a voltage signal from the quartz resonator, amplifying it, and feeding it back to the resonator. The rate of expansion and contraction of the quartz is the resonant frequency, and is determined by the cut and size of the crystal, When the energy of the generated output frequencies matches the losses in the circuit, an oscillation can be sustained. An oscillator crystal has two electrically conductive plates, with a slice or tuning fork of quartz crystal sandwiched between them, During startup, the controlling circuit places the crystal into an unstable equilibrium, and due to the positive feedback in the system, any tiny fraction of noise is amplified, ramping up the oscillation. The crystal resonator can also be seen as a highly frequency- Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 68 selective filter in this system: it only passes a very narrow subband of frequencies around the resonant one, attenuating everything else. Eventually, only the resonant frequency is active. As the oscillator amplifies the signals coming out of the crystal, the signals in the crystal's frequency band becomes stronger, eventually dominating the output of the oscillator. The narrow resonance band of the quartz crystal filters out all the unwanted frequencies. ‘The output frequency of a quartz oscillator can be either that of the fundamental resonance or of a multiple of that resonance, called a harmonic frequency. Harmonics are an exact integer multiple of the fundamental frequency. But, like many other mechanical resonators, crystals exhibit several modes of oscillation, usually at approximately odd integer multiples of the fundamental frequency. These are termed "overtone modes", and oscillator circuits can be designed to excite them. The overtone modes are at frequencies which are approximate, but not exact odd integer multiples of that of the fundamental mode, and overtone frequencies are therefore not exact harmonics of the fundamental. pats bi q . a ie = + h ! (os Sopa picked sk sone ci Sobek ec eguraont yet Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 68 MODULE - IV WORKING & PROGRAMMING 4.1 WORKING In Wireless Electronic Notice Board the first part is the power supply unit. Here we use 12-0-12 Step down transformer. ‘This transformer will be step down the 230V input AC current to 12V AC current, In the system the microcontroller unit work at SV DC current. So a voltage regulator is used by the circuit. Before regulating the voltage level 12V ac is converted to 12V DC using a bridge rectifier which contains 4 diodes, capacitor of 33uf, This rectifier is convert AC to DC. Also the pulsating DC is then purified by the cappeitor1000uf will give pure DC . This 12V DC current will be regulated to 5V DC for ATMEGA32. This will done by 7805 regulator IC. The regulated SV DC is applied to ATMEGA32. The main parts of the Electronic Notice Board system is that the GSM Module, MAX232, ATMEGA32, LCD 16x2. GSM module is the one of the part for receiving and transmitting data which contain SIM port, regulator IC, capacitor (1000uf & 0.3uf), antenna, power and range indication LEDs. When the power is ON the power LED will be ON. The other one ranging LED is blinking with a small delay, which indicated ‘No range’. If it will blink with a long delay indicated attain range. ‘Then we understand GSM will ready to transmit and receiving the data. The GSM is connected to a converter of MAX232 which is followed by a capacitor (104) for detecting unwanted noise and filtering. Then it will connected to microcontroller unit.. ie., ATMEGA32. An LCD of 16x2 is connected to Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 70 microcontroller unit for display of message. Also a buzzer is connected to the microcontroller unit, When we send to the message from the mobile, GSM modem which is receive the message. GSM has no memory location. Only the SIM, inserted by the SIM port on GSM have the SIM memory location. Hence the received data will be stored at the SIM location, While the message is arrive the GSM modem sent. A command serially to the microcontroller unit for indicates a message is arrived at SIM memory location, The command is just like +CMT1:"Hi",3 Here 3 indicated the location of the new mes ad its age. Now you need to unread message to display on LCD. Hence the microcontroller unit send a another command to GSM which contain another memory location to store the data at microcontroller unit, This command will be just like Attemgr=3 Here 3 indicated memory location of microcontroller unit to store data form GSM. When the command return to GSM modem, the received data will be transmit to microcontroller unit with certain format. The data will be send to microcontroller unit from GSM through data cable. Cable will connected from GSM to MAX232. The cable has DB9 connector, which has 3 terminal transmitting, receiving and Ground. Transmitting terminal from GSM connected to receiving terminal of MAX232 and the receiving terminal of GSM is connected to transmitting terminal of MAX232. Hence the data will be send both direction. That is GSM to MAX232 and vice-versa. Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT n When the command from microcontroller unit is received by the GSM. The data in SIM memory location will be retransmit to microcontroller have location and is like this format. UNREAD+9895315198="Hai™* Here the phone number indicates from where we get the data. Also at the end * indicate the keyword. Only the keyword is identity medium of microcontroller to data. Hence when we send a data or message, should write the message with a keyword at the end, To identifying the microcontroller the data. This will only k now by the sender without keyword no matter will display on LCD. The command wills directly the memory location in microcontroller for store the message. From GSM to microcontroller there is a connector MAX232. GSM is worked at RS logic. But the microcontroller is the TTL logic. The MAX232 connect the RS232 signals to TTL voltage level that will be acceptance to the AVR is transmitting and receiving pins. When data is converted form RS232 to TTL logic data will be filtered by capacitor. They will remove any noise present in the message data. After filter in message or data will be artived at microcontroller memory location. So the data at that memory location that send by microcontroller unit. After storing data microcontroller unit will read the data. The command will be read by, UNREAD+9898315198="Hai™* Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT R 1. Check first two and last two words. UN and AD. Hence it understand the starting format of data R Check + sign and first and last two digits. This understands from where the data is send. 3. Then check the keyword. If the keyword of the last data is same pointer will understand. That the message should be, at before keyword. ‘The data is understood by the microcontroller unit. ‘Then, the message sends to LCD module. It will displayed on screen until the arrival of next message. The number to which we want to sent to the message is stored in the ATMEGA32. The crystal oscillator is used for timing. We know that our class duration is about 1 hour. The time interval is select as 1 hour and during each tike interval the message will be send to the teachers number that we saved in the ATMEGA32. For example: The send message will be “This is your period in EC S6” A GSM module is used for sending the message. The GSM module has two indicator LED’s one is power LED and other is range indicator LED. It will continuously blinks will the module catch range. The LED blinks with a delay. The GSM module works on 12V DC. The supply to the GSM module is given from the bridge rectifier. When the period starts. The ATMEGA32 will give a signal to the GSM module and the GSM module will send the message to the corresponding number. That is stored in the ATMEGA32. When the message is want to send a star will appear on the screen, The appeared star will exists until the message is delivered Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT B 4.2 PROGRAME #inelude #include #include #include void delay(intx); void port_initial(): void led_initial(); void led_command(charc); void Icd_data(chard); void lcd_string(constchar*s): void usart_initial(); void usart_transmit(charp); charusart_receive(); void usart_string(constchar*q): void timer_initial(void); void hex_ascii(charu); void gsm_initial(void); void message(); chara,b,y[25],gsm_data[20]="AT+CMGR= te[20 AT+CMGD="; charnumber[12]; gsm_dele charusart_data,dummy_data,k; Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 7a charmsg_receive[15],msg_location,msg_data[10]; chardelete[5]="dlt" intz=0; charcon[S]; charsecond=0; charminute=0; charflag=1; charbuz=0; voidmain() (port_initialQ; led_initialQ; usart_initial(); timer_initial(); led_string("WIRELESS"); led_command(0xc0); led_string("NOTICEBOARD"); gsm_initial(); Icd_command(0x01); led_string("Time:00:00H:" seiQ: while(1) { Government Polytechnic College, Neyyattinkara Eketronic & Communication PROJECT REPORT if(minute==0&&second==1) { PORTA=0XFF: _delay_ms(1500); PORTA=0X00; led_command(0X8b): led_string("*") message(): } if(minute==1&&second==1) { PORTA=0XFF:; _delay_ms(1500); PORTA=0X00; led_command(0X8b):; led_string("*"); message(): } if(minute==2&&second==1) { PORTA=0XFF; _delay_ms(1500); PORTA=0X00; led_command(0X8b): led_string("*") Government Polytechnic College, Neyyattinkara 5 Eketronic & Communication PROJECT REPORT message(); } if(minute==3&&second==1) { PORTA=OXEF: _delay_ms(1500); PORTA=0X00; led_command(0X8b): led_string("*") message(); } if(minute==4&&second==1) { PORTA=0XFF; _delay_ms(1500); PORTA=0X00; led_command(0X8b): led_string("*") message(): } if(bu { PORTA=OXFF: _delay_ms(500); PORTA=0X00; Government Polytechnic College, Neyyattinkara 76 Eketronic & Communication PROJECT REPORT ” _delay_ms(500); PORTA=0XFF: _delay_ms(500); PORTA=0X00; _delay_ms(500): PORTA=OXEF: _delay_ms(500); PORTA=0X00; _delay_ms(500); PORTA=0XFF:; _delay_ms(500); PORTA=0X00: buz= } } } ISR(USART_RXC_vect) ( eliQ: usart_data=UDR; if(usart_dat ( for(inti=O;i<12;i++) { msg_receive[i]=usart_receive(): +) Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT 78 } msg_location=msg_receive[11]; Ied_command(0XCO); led_string(""); delay(5); usart_string("AT+CMGR="); usart_transmit(msg_location); delay(10); usart_transmit(0x0D):; usart_transmit(0x0A); while(usart_receive()!='R'); while(usart_receive()!='E'); while(usart_receive()!='9'); while(usart_receive()!='l'); while(usart_receive()!=0x0A); for(k=O;y[k-I]!='*';k++) ( y[(k]=usart_receive(); } y[k-1]='\0"; led_command(0XCO); led_string(y); buz=1; usart_string("AT+CMGD= delay(10); Government Polytechnic College, Neyyattinkara Bketronic & Communication PROJECT REPORT usart_transmit(msg_location); usart_transmit(0x0D); usart_transmit(Qx0A); } seiQ: } ISR(TIMERI_OVEF_vect) { cliO: second++4; if(second>59) ( second=0; minute++; flag++; } if(minute<5) ( hex_ascii(minute); led_command(0x85); led_string(con); led_data(': Government Polytechnic College, Neyyattinkara 78 Eketronic & Communication PROJECT REPORT hex_ascii(second); Ied_command(0x88); led_string(con); hex_ascii(flag); led_command(0x8E); led_string(con); } if(minute==5) ( second=0; minute=0; flag=1; Ied_command(0xc0); led_string(""); } TCNTIL=0xFF; TCNTIH=0x00; sei(); } void delay(intx) { inti,j; for(j=0:j

You might also like