Wednesday, 7 September 2016

Power Supply Unit

POWER SUPPLY:

The input to the circuit is applied from the regulated power supply. The a.c. input i.e., 230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any a.c components present even after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc voltage.





Transformer:

Usually, DC voltages are required to operate various electronic equipment and these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input available at the mains supply i.e., 230V is to be brought down to the required voltage level. This is done by a transformer. Thus, a step down transformer is employed to decrease the voltage to a required level.





Rectifier:


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 rectifier is used because of its merits like good stability and full wave rectification.




The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using both half cycles of the input ac voltage. The Bridge rectifier circuit is shown in the figure. The circuit has four diodes connected to form a bridge. The ac input voltage is applied to the diagonally opposite ends of the bridge. The load resistance is connected between the other two ends of the bridge.
For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the load resistance RL and hence the load current flows through RL.
For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load resistance RL and hence the current flows through RL in the same direction as in the previous half cycle. Thus a bi-directional wave is converted into a unidirectional wave.



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 load 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.

Voltage regulator:

            As the name itself implies, it regulates the input applied to it. A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. In this project, power supply of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812 voltage regulators are to be used. The first number 78 represents positive supply and the numbers 05, 12 represent the required output voltage levels. The L78xx series of three-terminal positive regulators is available in TO-220, TO-220FP, TO-3, D2PAK and DPAK packages and several fixed output voltages, making it useful in a wide range of applications. These regulators can provide local on-card regulation, eliminating the distribution problems associated with single point regulation. Each type employs internal current limiting, thermal shut-down and safe area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1 A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltage and currents.



Monday, 5 September 2016

How to Interface Peripherals to Microprocessors

 SWITCH AND LED INTERFACING WITH THE MICROCONTROLLER:

              Switches and LEDs are the most widely used input/output devices of the 8052.

 SWITCH INTERFACING:


              CPU accesses the switches through ports. Therefore these switches are connected to a microcontroller. This switch is connected between the supply and ground terminals. A single microcontroller (consisting of a microprocessor, RAM and EEPROM and several ports all on a single chip) takes care of hardware and software interfacing of the switch.

These switches are connected to an input port. When no switch is pressed, reading the input port will yield 1s since they are all connected to high (Vcc). But if any switch is pressed, one of the input port pins will have 0 since the switch pressed provides the path to ground. It is the function of the microcontroller to scan the switches continuously to detect and identify the switch pressed. The switches that we are using in our project are 4 leg micro switches of momentary type.
Thus now the two conditions are to be remembered:

1. When the switch is open, the total supply i.e., Vcc appears at the port pin P2.0
P2.0 = 1
When the switch is closed i.e., when it is pressed, the total supply path is provided to   ground. Thus the voltage value at the port pin P2.0 will be zero.
P2.0 = 0         
By reading the pin status, the microcontroller identifies whether the switch is pressed or not. When the switch is pressed, the corresponding related to this switch press written in the program will be executed.


LED INTERFACING:

LED stands for Light Emitting Diode.
Microcontroller port pins cannot drive these LEDs as these require high currents to switch on. Thus the positive terminal of LED is directly connected to Vcc, power supply and the negative terminal is connected to port pin through a current limiting resistor. This current limiting resistor is connected to protect the port pins from sudden flow of high currents from the power supply.
Thus in order to glow the LED, first there should be a current flow through the LED. In order to have a current flow, a voltage difference should exist between the LED terminals. To ensure the voltage difference between the terminals and as the positive terminal of LED is connected to power supply Vcc, the negative terminal has to be connected to ground. Thus this ground value is provided by the microcontroller port pin. This can be achieved by writing an instruction “CLR P1.0”. With this, the port pin P1.0 is initialized to zero and thus now a voltage difference is established between the LED terminals and accordingly, current flows and therefore the LED glows. LED and switches can be connected to any one of the four port pins.











Thursday, 1 September 2016

what is Wireless Communication



INTRODUCTION TO WIRELESS COMMUNICATION


In the world today, everything would be incredibly different if it were not for wireless communication devices. The fact that we can communicate with people in other parts of our own country and the world is amazing and has led to lots of changes in human history. There are various kinds of wireless communication tools and here we will look at a few different kinds as well as the benefits of having them.

Short Distances
Sometimes wireless communication does not happen across thousands of miles but only across a few feet. For instance, if you have a television with a remote control, there is communication happening between the two. The remote control tells the television what to do and this information is transferred without the use of any wires.
You could also use walkie talkies for this purpose. These are little devices that work like telephones except with different methods and will allow two people or a group of people to talk to each other from a small distance away, such as at a festival or celebration.

Benefits of Short Distance Wireless Communication
Having these short distance devices allows many things to happen. You do not have to get up to change the channel, for one thing. With walkie talkies you are able to communicate with a group of people, which means that people who need to work together such as police men or fire fighters or security guards can do so at special events without having to take the time to dial a phone number. This can save time and sometimes lives.

Medium and Long Distances
Anything that can connect to the internet is capable of going through medium or long distances. Many forms of wireless communication such as cell phones and laptop computers can send information from ten feet to thousands of miles because they can connect to the internet. Wireless communication of this form has changed the world dramatically.
One of the most widely acknowledged benefits of long distance wireless communication is that people can perform their jobs at a distance. If they are trying to contact their boss or write a report, they can do so from almost any part of the globe without having to be physically present. This reduces travel costs and the impact of travel on the environment.
Another benefit of long distance wireless communication is that families can stay in touch with each other even if one of them is far away. It used to be that if someone was on a business trip, they would have to write a letter to communicate with their loved ones. Now they can communicate through video and show their family exactly where they are so that the family can connect about these experiences and maintain closer relationships with each other.
The types and forms of wireless communication are changing at a rapid pace to include ever more increasing advances in technology. The benefits of these devices are many and range from benefits that relate to our jobs to those that relate to our loving connection to our families. There is virtually no end to the amount that human kind can advance given the incredible leaps and bounds we are making with technology!

Applications of Wireless Data Communications:
Wireless data communications are an essential component of mobile computing. The various available technologies differ in local availability, coverage range and performance, and in some circumstances, users must be able to employ multiple connection types and switch between them. To simplify the experience for the user, connection manager software can be used, or a mobile VPN deployed to handle the multiple connections as a secure, single virtual network. Supporting technologies include:
Wi-Fi is a wireless local area network that enables portable computing devices to connect easily to the internet. Standardized as IEEE 802.11a,b,g,n, Wi-Fi approaches speeds of some types of wired Ethernet. Wi-Fi has become the de facto standard for access in private homes, within offices, and at public hotspots. Some businesses charge customers a monthly fee for service, while others have begun offering it for free in an effort to increase the sales of their goods.

Cellular data service offers coverage within a range of 10-15 miles from the nearest cellsite. Speeds have increased as technologies have evolved, from earlier technologies such as GSM,CDMA  and GPRS, to3G networks such as W-CDMA,EDGE or CDMA2000

Mobile Satellite Communications may be used where other wireless connections are unavailable, such as in largely rural areas or remote locations Satellite Communication are especially important for transportation, aviation, maritime and                                                         military.


Global System for Mobile:

Global System for Mobile (GSM) is a second generation cellular standard developed to cater voice services and data delivery using digital modulation.
Cellular is   one    of    the    fastest   growing and most demanding telecommunications applications. Cellular systems    using   a digital technology will become the universal method of tele-communications.


Global System for Mobile Communication (GSM) is a standard for digital communication.   GSM uses the Time Division Multiple Access (TDMA). The concept of cellular service is the use of low power transmitters where frequencies can be reused within a geographic area.

GSM Specifications:

GSM 900
    Mobile to Base Transceiver Station (uplink):    890-915 MHz
    Base Transceiver Station to Mobile (downlink):935-960 MHz
    Bandwidth: 2 * 25 MHz   


GSM-900 uses 890–915 MHz to send information from the mobile station to the base station (uplink) and 935–960 MHz for the other direction (downlink), providing 124 RF channels (channel numbers 1 to 124) spaced at 200 kHz. Duplex spacing of 45 MHz is used. Guard bands 100 kHz wide are placed at either end of the range of frequencies.


GSM 1800
    Mobile to Base Transceiver Station (uplink):   1710-1785 MHz
    Base Transceiver Station to Mobile (downlink) 1805-1880 MHz
    Bandwidth: 2 * 75 MHz

GSM-1800 uses 1710–1785 MHz to send information from the mobile station to the base transceiver station (uplink) and 1805–1880 MHz for the other direction (downlink), providing 374 channels (channel numbers 512 to 885). Duplex spacing is 95 MHz



 SMS in GSM Network:
Short message service is a mechanism of delivery of short messages over the mobile networks. It is a store and forward way of transmitting messages to and from mobiles.
 The message (text only) from the sending mobile is stored in a central short message center (SMS) which then forwards it to the destination mobile. This means that in the case that the recipient is not available, the short message is stored and can be sent later.
 Each short message can be no longer than 160 characters. These characters can be text (alphanumeric) or binary Non-Text Short messages. An interesting feature of SMS is return receipts. This means that the sender, if wishes, can get a small message notifying if the short message was delivered to the intended recipient.
Since SMS used signaling channel as opposed to dedicated channels, these messages can be sent/received simultaneously with the voice/data/fax service over a GSM network.
SMS supports national and international roaming. This means that you can send short messages to any other GSM mobile user around the world. With the PCS networks based on all the three technologies, GSM, CDMA and TDMA supporting SMS, SMS is more or less a universal mobile data service.

SMS working principle:
The Fig 3.26 below shows a typical organization of network elements in a GSM network supporting SMS.

The SMC (Short Message Center) is the entity which does the job of store and forward of messages to and from the mobile station. The SME (Short Message Entity) which can be located in the fixed network or a mobile station, receives and sends short messages.
The SMS GMSC (SMS gateway MSC) is a gateway MSC that can also receive short messages. The gateway MSC is a mobile network’s point of contact with other networks. On receiving the short message from the short message center, GMSC uses the SS7 network to interrogate the current position of the mobile station form the HLR, the home location register.
HLR is the main database in a mobile network. It holds information of the subscription profile of the mobile and also about the routing information for the subscriber, i.e. the area (covered by a MSC) where the mobile is currently situated. The GMSC is thus able to pass on the message to the correct MSC.
MSC (Mobile Switching Center) is the entity in a GSM network which does the job of switching connections between mobile stations or between mobile stations and the fixed network.

A VLR (Visitor Location Register) corresponds to each MSC and contains temporary information about the mobile, information like mobile identification and the cell (or a group of cells) where the mobile is currently situated. Using information from the VLR the MSC is able to switch the information (short message) to the corresponding BSS (Base Station System, BSC + BTSs), which transmits the short message to the mobile.
 The BSS consists of transceivers, which send and receive information over the air interface, to and from the mobile station. This information is passed over the signaling channels so the mobile can receive messages even if a voice or data call is going on.

Communication between the GSM modem and the Microcontroller

Fig 4.7 illustrates the main blocks of a wireless communication system. It also shows the communication principles of the system. The MS (mobile station) represents the gsm modem plus SIM card.
 The modem excluding SIM card, is known as the ME (mobile equipment). The TE (terminal equipment) is a micro-controller and is a part of the application.
The end-to-end communication path to be established between the external telemetry/telematics application and a remote terminal or host, via the GSM network is done through the serial communication. Serial data with flow control according to the RS232 signaling protocol operates between the modem and the external application.

AT commands:
AT commands are used to operate the modem and have a broad range of Functions including:
 Configuring general parameters of the modem
  • Setting up and controlling communications to and from the GSM Network
  • Configuring the modem to communicate across the RS232 serial interface
  • Obtaining GSM network status information.
The modem also supports the Voice, Data, Fax services but since these are not required for the current application, they are not taken into consideration as of now.


The AT command set is the fundamental interface with the modem. An AT command is simply a string of characters preceded by the AT prefix that is sent to the modem. The commands typically instruct the modem to perform some action or set some characteristic within the modem.
The modem has two states: command state and on-line state. In command state, the modem will accept and respond to AT commands. In the on-line state, the modem will transmit data, but ignore AT commands. Typically the modem is in the on-line state after dialing.
AT commands has the following format:
  • The command is prefixed with AT (Attention)
  • The command is terminated by a carriage return <CR> (except the A/ command and escape sequence).
  • The commands can be entered in upper case or lower case.
  • The AT prefix can be in upper case or lower case, but both the A and the T must be the same case.
  • Characters that precede the AT prefix are ignored.
  • Multiple commands can be strung together on a single line and spaces may be included between commands but are not necessary.
The command line interpretation begins upon receipt of the carriage return. These commands are used for request information about the current configuration or operational status of the mobile phone/modem and test availability and request the range of valid parameters, when applicable, for an AT command.

General Syntax of AT-Commands:

Basic                                                   AT<command> [=] [<parameter>]
Extended                                            AT+<command>= [<parameter>]
AT*<command>= [<parameter>]
Read command                                   AT+<command>?
AT*<command>?
AT<command>?

Test command                                     AT+<command>=?
AT*<command>=?
Response command                            AT+<command> : <parameter >
AT*<command> : <parameter>

 Important AT command used to Test and Design:
1) ATD  to dial a voice call from the modem.
2) AT+IPR  to set the baud rate for the modem ( here for our application the baud rate is
Set as 9600)
3) ATA  to answer an incoming call.

4) AT+CHUP to hang up the initiated call.
5) AT+CFUN to set the phone functionality. Set to 0 to deactivate the modem.
6) AT+CLIP to identify caller number this command is set to 1
7) AT+CLIR for calling line Identification Restriction.
8) AT+CNUM to identify the subscriber number.
9) AT+CMGR to read the message at particular location .The location number is given
as index.
10) AT+CMGD to delete the received message
11) AT+CMGS to send the message.
12) AT+CMGF to change the message format to PDU or Text mode.
13) AT+CMGL to see all the list of messages.
14) ATE to enable and disable command echo.

SMS Applications
Exchanging small messages like "See you at 8.30 tonight at xyz". SMS is particularly suited for these kinds of short messages because SMS is much cheaper than calling someone and giving the same message. Calling someone to give the same message would invariably take more time and hence more cost.

Many operators offer e-mail service over SMS. Every user is assigned an e-mail address at signup and any message delivered to that email is converted to short messages and delivered to the mobile.
It is possible to send e-mail messages (less than 160 characters) from a mobile phone to any e-mail address via SMS.
Information services like news, weather, entertainment and stock prices etc. can be availed just by sending a keyword like NEWS, WEATH etc to the short message center number.
SMS can be used by the network operators to provide services like balance enquiry in case of prepaid cards using SMS. Mobile chatting is one more hot application of SMS. SMS can be used to notify users that they have received new voice-mail or fax messages. It provides an alternative to alphanumeric paging services. Downloading new ring tones.