In many applications data collected from multiple sensors is transmitted to PC for display or further analysis. The conversion of data from analog to digital form is done using an ADC. The digital data from the ADC is transferred to the computer using serial port. This circuit demonstrates the principle and operation of interfacing an ADC0808 with serial port of PC using the microcontroller AT89C51. The circuit is divided into three parts: ADC, controller and serial port. This circuit can be used as an intermediate circuit in many applications.ADC0808 which is an 8-bit resolution ADC has eight input channels i.e., it can take a maximum of eight analog inputs. The circuit uses the first analog input pin to take the analog input signals from the preset. To provide clock input to the ADC, Timer0 is used in interrupt enabled mode to generate a clock of frequency 500 KHz. To enable the Timer0 in interrupt enable mode, the register IE is loaded with the value 0x82. Every time the timer completes the counting, pin P1.2 toggles its state.
ADC is an electronic device which converts analog signals into its corresponding digital signal. This article demonstrates the principle, operation and interfacing of 8-bit serial ADC0831 with 8051 microcontroller.ADC0831 is an 8 pin IC with 8-bit serial data output (for more detail about ADC0831 refer to Interfacing ADC0831 with ATmega16). To receive the output from ADC high to low pulse is given at CS (chip select) pin of ADC form controller. ADC requires delay of two clock pulses before starting data conversion. At the second clock cycle, ADC sends a ‘0’ bit to the controller which indicates that the upcoming bits are the data bits.ADC needs eight clock pulses to send 8-bit digital output. This digital data is received bit by bit and stored in a variable. The data is converted to its corresponding ASCII value and sent to LCD for display. The connections of LCD with microcontroller are shown in circuit diagram. The analog signals are generated by at a variable resistance (preset) which is connected to input pin of ADC0831.
The commonly used 16×2 LCD can also display custom made characters besides numbers, alphabets & special characters. Any character can be made to appear on a 5×8 pixel matrix element without knowledge of its ASCII value. The idea explained here demonstrates the principle and operation of a simple LCD custom character display using 8051 microcontroller (AT89C51). When the ASCII code for any character, say ‘A’, is sent to be displayed on LCD module, the module’s controller looks up the appropriate 5×8-pixel pattern in ROM (read-only memory) and displays that pattern on the LCD. There are 8 symbol locations where a custom character can be stored as shown in the following right table. These locations will have a particular bitmap layout corresponding to the custom character. To display an arrow sign, the bitmap values are mapped to a base address location, say 64 (ASCII code 0).
Stepper motor is a variable reluctance DC motor. When correct input sequence of signal is given to the motor, it starts rotation in steps. (For more detail refer Unipolar Stepper motor interfacing with microcontroller AT89C51). ULN2003 is high voltage, high current Darlington arrays each containing seven open collector Darlington pairs with common emitters. Here it…
Stepper motor is one of the commonly used motors for precise angular movement. The advantage of using a stepper motor is that the angular position of the motor [[wysiwyg_imageupload::]]shaft can be controlled without any feedback mechanism. Stepper motors are widely used in industrial and commercial applications. They are also commonly used as in drive systems of autonomous robots.This article explains the unipolar stepper motor interfacing with AT89C51 microcontroller. The microcontroller is programmed to rotate the stepper in wave drive and half drive stepping modes. For basic concepts and working of a stepper motor, refer the article on Stepper Motors. A Unipolar Stepper Motor is rotated by energizing the stator coils in a sequence. In unipolar stepper, the direction of current in stator coils is not required to be controlled by the driving circuit. Just applying the voltage signals across the motor coils or motor leads in a sequence is sufficient to drive the motor.
The Graphics LCD as the name suggests is a type of LCD which can display graphics. The graphical representation of any data presents good understanding thanjust characters. More user friendly applications can be designed by using the graphical LCDs. The graphical LCD can be used for advertisement boards or information boards and so on. This article explains the method of displaying image on a 128×64 graphical LCD using AT89C52. For basic operations and working, refer Graphics LCD interfacing with 8051. Microcontroller AT89C52 has been used to control the operations of the graphical LCD. The Graphics LCD used here is JHD12864E. This LCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into rows and columns. For basic instructions and programming procedure, refer to interfacing Graphics LCD with 8051. Also see displaying text on Graphics LCD. Read more to make interesting graphics on this florescent piece of display.
Simple operations with graphics LCD have been explained in the previous article. This article demonstrates the functionality of graphics LCD to display strings of [[wysiwyg_imageupload::]]different fonts. It explains the program to display strings in 8×8 and 5×7 fonts and also to scroll them vertically.The Graphics LCD used here is JHD12864E. This LCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into rows and columns. For basic instructions and programming procedure, refer to interfacing Graphics LCD with 8051.To display different font types, corresponding header files have been created. These header files contain the bitmap information of all alphabetic, numeric characters and symbols of a particular font. These header files are included into the main program. (The header file declarations are given in Code2).
The graphical LCD used here is JHD12864E. This LCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into [[wysiwyg_imageupload::]]rows and columns.User friendly visual displays are used nowadays to keep track of working of any device. Such a visual display can be anything ranging from old Analog meters to new and smart Digital meters. In digital world to keep track of devices, LCDs are very commonly used. LCDs are easy to program and prove to be a better display unit as compared to other devices like seven segments and LED display units.The graphics LCDs are preferred over the character LCDs for those applications where both character and graphical representation are required. This article explains the basics of a 128×64 Graphics LCD and how it can be interfaced with AT89C52 to display basic shapes. The graphical LCD used here is JHD12864E. This LCD is divided into two parts which are controlled by two different controllers. Each of these parts is divided into rows and columns.To interface this LCD with microcontroller, two registers (Input and Output register) are provided in the LCD. These registers are selected by the combination of RS and RW signals.
GPS has become an efficient tool in the field of scientific use, commerce, surveillance and tracking. This project presents a small application based onGlobal [[wysiwyg_imageupload::]]Positioning System. It depicts the use of GPS module/receiver to find latitude and longitude of its location. The data obtained from GPS receiver (GPGGA sentence) is processed by the microcontroller to extract its latitude and longitude values.The GPS Module has been interfaced with AT89C51 and the location values are displayed on a 16×2 LCD interface. The GPS module continuously transmits serial data (RS232 protocol) in the form of sentences according to NMEA standards. The latitude and longitude values of the location are contained in the GPGGA sentence (refer NMEA format). In this program, these values are extracted from the GPGGA sentence and are displayed on LCD.The serial data is taken from the GPS module through MAX232 into the SBUF register of 8051 controller (refer serial interfacing with 8051). The serial data from the GPS receiver is taken by using the Serial Interrupt of the controller.
This project is an extension to interfacing GPS with 8051. Here the microcontroller interfaced with GPS module is used to obtain latitude, longitude, time, date and [[wysiwyg_imageupload::]]speed of the receiver. These received values are displayed on a 16×2 character LCD.The GPS module continuously transmits serial data (RS232 protocol) in the form of sentences according to NMEA standards. The latitude, longitude, time, date and speed values of the receiver are contained in the GPRMC sentence as given in the following example (also refer NMEA format for other sentences). In this project, these values are extracted from the GPRMC sentence and are displayed on LCD.Example : $GPRMC,132455.970,A,2651.0145,N,07547.7051,E,0.50,342.76,301010,,,A*64The serial data is taken from the GPS module through MAX232 into the SBUF register of 8051 controller (refer serial interfacing with 8051). The serial data from the GPS receiver is taken by using the Serial Interrupt of the controller. This data consists of a sequence of NMEA sentences from which GPRMC sentence is identified and processed.
Humidity sensor works on the principle of relative humidity and gives the output in the form of voltage. This analog voltage provides the information about the percentage relative humidity present in the environment. The relative humidity is defined as: The analog output of sensor is connected to ADC to get its corresponding digital value.…
The basic operations of servo motor control have been discussed in interfacing servo with 8051. This project allows the servo motor to move to an angle specified [[wysiwyg_imageupload::]]by the user. The pulse train required to rotate the servo is produced by AT89C51 microcontroller. The desired angle of rotation is provided through a 4×3 keypad interfaced to the microcontroller. A 16×2 LCD is also connected with the microcontroller to display the angle of rotation entered by the user. For basic operations and control of servo motor, refer interfacing servo with 8051. The first pin of port P1 (P1^0) of AT89C51 microcontroller is set as the output pin to provide control signal to the servo motor. Ports P0 and P2 are used to interface keypad and data pins of LCD, respectively. Ports P1^3, P1^4 and P1^5 are connected to RS, RW and EN pins of LCD, respectively. Before connecting to the control wire of servo, the output from the microcontroller (P1^0) is fed through a comparator IC (LM324) so that the signal is protected from any loss due to overloading.
This project demonstrates the operation of a servo motor. The control signals for the rotation of the motor are provided by 8051 microcontroller (AT89C51). Here, [[wysiwyg_imageupload::]]the servo arm is rotated by 5° from the previous position, starting from 0 °as initial position. As the servo reaches a limit, the arm comes back to the initial position (0°). For basic concepts and know-how of a servo motor, refer to the article Servo Motor.The servo motor is controlled by feeding pulse width modulated (PWM) signal at the control wire of the servo motor. In addition a 4.8V (ideally 5V) DC supply is provided to the red lead of the servo. The black lead of the servo is connected to Ground. The first pin of port P1 (P1^0) of AT89C51 microcontroller is set as the output pin to provide control signal to the servo motor. Before connecting to the control wire of servo, the output from the microcontroller is fed through a comparator IC (LM324) so that the signal is protected from any loss due to overloading.
GSM is widely used mobile communication architecture used in most of the countries. This project demonstrates the interfacing of [[wysiwyg_imageupload::]]microcontroller AT89C51 with HyperTerminal and GSM module. It aims to familiarize with the syntax of AT Commands and their Information Response and Result Codes. The ASCII values of characters in the Information Response, Result Codes and their syntax can be monitored by an LED array. For the basic concepts, working and operation of AT commands and GSM module refer GSM/GPRS Module. The project explains interfacing of the AT89C51 microcontroller with the GSM module and the HyperTerminal. HyperTerminal is a Windows application. TheAT commands are sent by the HyperTerminal to the GSM module. The Information Response and/or Result Codes are received at the microcontroller and retransmitted to the HyperTerminal by the controller. Read on to understand how does this circuit work and how its microcontroller can be programmed.
This project is an extension of interfacing microcontroller with hyperterminal and GSM module. The previous project explained a way to interface a GSM [[wysiwyg_imageupload::]]module with 8051 microcontroller where the information response and result codes received by the controller were sent back to computer to display them at HyperTerminal. In this project, the same output is displayed on a 16×2 LCD interface. This project is first step towards making and independent system using the GSM module and a microcontroller. Here the HyperTerminal (computer) has been replaced with LCD at the output end. In the next project (MC076), the AT Commands will be transmitted to the GSM module by the microcontroller itself thus avoiding the need of using HyperTerminal entirely. This project adds a feature to display the information response and result codes on a 16×2 LCD in response to the AT commands sent through the HyperTerminal of computer. The characters typed at HyperTerminal get transmitted serially through the transmit pin (Tx) of RS232 interface.
This project presents a way to interface GSM module with microcontroller AT89C51 without making use of computer to send AT commands to the module. This is [[wysiwyg_imageupload::]]an improvement over the previous projects (see MC074 & MC075). Instead of using HyperTerminal or any other PC interface, the controller itself sends a fixed AT command to the GSM/GPRS module. The information response and result codes are received and displayed on a 16×2 LCD. Instead of sending commands from the HyperTerminal, AT commands are sent to the GSM/GPRS module by the microcontroller itself. In this case, the receive (Rx) and transmit (Tx) pin of the GSM module’s RS232 port are connected to the transmit (Tx) and receive (Rx) pin of AT89C51’s serial port, respectively. This eliminated the role of computer and just the controller’s circuit provides a complete user interface for the module. Read more to reveal the connections and the working of this 8051 based electronic project.
AT24C02 is two-wire serially programmable EEPROM. This means that for programming, the data and control signals are provided serially along with clock signals from the other wire. The read-write operations are accomplished by sending a set of control signals including the address and/or data bits from a microcontroller. This project demonstrates the memory reset operation of a 24C02 IC by using AT89C51. For basic operations of AT24C02, refer interfacing serial EEPROM with 8051. It writes & reads a byte to/from the EEPROM displaying it on a 16×2 LCD, and then resets the memory. The results can be monitored on the LCD display.AT24C02 is a two-wire serial EEPROM from Atmel. 24C02 is an 8 pin IC and reads 8 bit data serially. Its memory size is 2KB. Pins 1- 3 are address pins which are connected to ground. Pin 4 is GND; Pin 5 is SDA (serial data); and pin 6 is SCL (serial clock input). Pin 7 is WP (write protect) pin and is connected to GND. Pin 8 is Vcc for providing power supply.
EEPROM stands for electrically erasable programmable read only memory. It is a secondary storage device that once written (programmed) can hold data even [[wysiwyg_imageupload::]]when the power is removed. The EEPROM is a class of read only memory that can be electrically erased and reprogrammed.AT24C02 is a two wire 2Kbits serial EEPROM by Atmel. The memory is organized in 256 words of single byte each arranged in 32 pages of 8 bytes each. The addressing of memory locations requires eight bit addresses.AT24C02 is two-wire serially programmable i.e., for programming, the data and control signals are provided serially along with clock signals from the other wire. The read-write operations are accomplished by sending a set of control signals including the address and/or data bits. The control signals must be accompanied with proper clock signals.The AT24C02 has hard wire addressing of 3 bit length. This facilitates interfacing of a maximum of eight (23) 24C02 devices to a system thereby, incorporating a maximum 16Kbits memory. Multiple 24C02 devices can be connected to a microcontroller/microprocessor based system using I2C interface.
This topic is an extension to Simple toll plaza system. The toll amount is charged based on the category of the vehicle driving through the plaza. The vehicle categories taken here are two-wheeler & four-wheeler. When a user scans his ID at the toll plaza, some amount is charged from his account depending upon his vehicle category. User also has the facility to recharge his account.The project has been developed by interfacing RFID with AT89C51. The relevant messages are also displayed on a 16×2 LCD. The free source code for the program is available in C.Simple toll plaza system charges the toll tax from the user irrespective of the type of his vehicle. This project also considers the vehicle type while charging the toll amount. The RFID tag is used as a unique identity for account of a particular user. When a vehicle drives through the toll plaza, its driver is prompted to scan his RFID tag. If the identity (serial number of the tag, i.e., 12 byte data) is matched with the one already stored in the system, the toll amount is deducted from his account. After this, the vehicle gets immediate access to drive through. All the features of the Simple toll plaza system are also provided in this project by interfacing RFID with AT89C51.
Electronic/automated toll collection systems are very popular these days. They do not require manual collection and operation of toll barriers. The details about [[wysiwyg_imageupload::]]the vehicles and payment are stored in an RFID based system.This article explains the working of a simple toll plaza system interfaced with RFID. Each user holds a unique ID for his vehicle. When the user scans his tag while passing through the plaza, a certain amount is deducted from his account. A user may also recharge his account in case of insufficient balance. The project has been developed by interfacing RFID with AT89C51. The relevant messages are also displayed on a 16×2 LCD. The free source code for the program is available in C.Low frequency RFID work at 125 KHz frequency with radio waves. There is a coil inside the RFID tag and when it is influenced by a magnetic field, it sends a 12 byte identity code to RFID reader for further processing. The RFID tag is used as a unique identity for account of a particular user. When a vehicle drives through the toll plaza, its driver is prompted to scan his RFID tag. If the identity (serial number of the tag, i.e., 12 byte data) is matched with the one already stored in the system, the toll amount is deducted from his account. After this, the vehicle gets immediate access to drive through.