You are on page 1of 10

Module 5

Designing a standalone Microcontroller system:


Typical system design examples (Block-Diagram level only)
Data acquisition system

Measurement of frequency
Temperature control.

Introduction to PLCs: Basic configuration of PLCs

DATA ACQUISITION (DATA LOGGING) :


Storing a series of measurements over time, usually from a sensor that
converts a physical quantity such as temperature, pressure, relative humidity, light,
resistance, current, power, speed, vibration into a voltage that is then converted by
a digital to analog converter (DAC) into a binary number. Data logging hardware
may have several DACs for multiple simultaneous measurements

1. TEMPERATURE & LIGHT MONITORING AND CONTROLLING

Description: Thisis used to measure the various parameters like Temperature and Light and display them
on a LCD. Temperature and light is sensed by respective sensors and sensor output is amplified and
given to ADC. Microcontroller controls these parameters and keeps them at some predefined levels
using relay interface. These relays can be connected to Fan/Heater. At the same time these values of
temperature and light to a computer through serial port.
It mainly consist of following blocks
1. Sensors: we are going to use temperature sensor and light sensor to sense temperature and light
respectively. These sensors sense the parameters and gives corresponding voltage output+
2. Amplifier: As the voltage output from the sensors is in miliVolts, it has to be increased
to 0 to 5 volts range. We are going to use linear amplifier for this purpose.
3. ADC: The main part of our project is microcontroller which reads only digital input (0V
& 5V) But the output of Amplifier is in analog form, so it has to be converted into digital
format, for this purpose we are going to use ADC to convert analog output from amplifier
into the digital output to be given tomicrocontroller

4. Microcontroller: This is the CPU (central processing unit) of our project. We are going to use
microcontroller of 8051 family. The various functions of microcontroller are like
I. Reading the digital input from ADC which is derived from Temperature and Light sensor. II. Sending
this data to LCD so that the person operating this project should read the values of temperature and
light. III. Controlling the parameters like Temperature, light be turning On/Off the respective relays IV.
Sending the values of temperature and light to the computer using serial port
5. Relay: We have used 2 relays in our project. First one will be turned on when the temperature falls
below the desired value. And the second relay will be turned on when temperature reaches above the
desired value. (e.g. if the desired value is 20 degree C, then Relay 1 will be turned on when temperature
is 19 or below and Relay 2 will be turned on when temperature is 21 or above)
6. PC Interfacing: We are going to use max 232 IC for pc interfacing, the values of temperature and
light will be sent to pc when the key is pressed

2. MICROCONTROLLER BASED DATA LOGGER


Block Diagram:

Description: Thisis a fine combination of analog and digital electronics. This project is designed so as to
fulfill the requirements of the industry applications, home applications. The project consists of
parameters monitoring, parameter storage. PC interface is one of the main features of the project in
which various data like value of parameters, date and time are sent to the PC.
We have used Microcontroller as a main component of the project. Now a Microcontroller has become
a main component of many of the electronic circuits. Also Liquid Crystal Display (LCD) and
EEPROM is used on major basis for the display and storage purpose. This project which will consist of
two basis modules. First is “Data Monitoring” & other is “Data Storage”
A display unit will show the value of parameters. This will help for the person to know the values, for
this purpose we are going to use various sensors, which will be connected to ADC.
The other module is named as parameter storage. It can be used to store the parameter values in the
memory. We are going to use EEPROM memory IC. These values can later seen using a keypad
provided on the front panel. This system is useful as many times its difficult to measure the parameter
values manually and also this module is more accurate than the domestic system.
1) SENSOR ONE: This is first sensor which uses to sense parameter one. This can be temperature
sensor, say LM35. The sensor will be placed on the front panel. One can use LCD display to read the
temperature.
2) SENSOR TWO: This is second sensor which uses to sense parameter two. This can be Humidity
sensor, say LDR. The sensor will be placed on the front panel.
3) AMPLIFIER: We are going to use LM324 which is having 4 inbuilt amplifiers. Since we have two
sensors, we have used this Amplifier.
4) ADC: We are going to use ADC 0808 which is 8 bit and 8 channel ADC. Since we have two inputs
for ADC, we have used this ADC.
5) LCD:Liquid Crystal Display which is commonly known as LCD is an Alphanumeric Display it
means that it can display Alphabets, Numbers as well as special symbols thus LCD is a user friendly
Display device which can be used for displaying various messages unlike seven segment display which
can display only numbers and some of the alphabets. The only disadvantage of LCD over seven
segment is that seven segment is robust display and be visualized from a longer distance as compared
to LCD. Here WE have used 16 x 2 Alphanumeric Display which means on this display WE can
display two lines with maximum of 16 characters in one line.
6) EEPROM: We need to store the parameter values in some device. We have chosen EEPROM for
this purpose as since it is a non-volatile memory and can hold data after power-off. We can use
AT24C02/ AT24C04/ AT24C08/ AT24C16 depending on the memory size requirement.
7) Keypad: We need to display the previous records. So we are going to use a Keypad for this purpose.
This keypad can perform various actions like.
a) Display previous records
b) Erase previous records
c) Set periodic interval time
d) Send data to PC
e) Set date and time
8) PC Interfacing: We are going to use MAX 232 for the purpose of PC interfacing, using this
module, we can send various data like temperature, Humidity if the water to the PC.
9) MICRO-CONTROLLER (89S51): This is the most important segment of the project, i.e. the
microcontroller 8052. The controller is responsible for detection and polling of the peripherals status. It
is responsible for making. It is responsible for prioritizing all the devices attached to it.
WE have used the ATMEL 89s51 microcontroller. The AT89S51 is a low-power, high-performance
CMOS 4-bit microcontroller with 8K bytes of in-system programmable Flash memory. It has got 32
I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, six-vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator, and a clock circuitry.
It is the major part of the system which controls all the operation of the circuit such as LCD interfacing,
square wave generation. It also decides the messages to be displayed on the LCD along with the time
duration for which they should be displayed on the LCD. Microcontroller also decides the frequency of
square wave output.
Applications:
This electronic circuit can be used for the following application:
1) To calculate and store the temperature and humidity of a boiler in the industry.
2) To store flow of the water flowing from the dam or a canal
3) To monitor / display the level of the liquid inside the container
4) Also this system communicates with a PC and sends various data like level of humidity, liquid flow,
and temperature of water.

3.PICK AND PLACE ROBOT


Block Diagram:
INTRODUCTION: In this highly developing society; time and man power are critical constrains for
completion of task in large scales. the automation is playing important role to save human efforts in
most of the regular and frequently carried works e.g. most of the industrial jobs like welding, painting,
assembly, container filling etc. one of the major and most commonly performed work is picking and
placing of jobs from source to destination. For this purpose, ‘pick and place robot ‘maybe used.
The pick and place robot is a microcontroller based mechatronic system that detects the object,
picks that object from source location and places at desired location. For detection of object, infrared
sensors are used which detect presence of object as the transmitter to receiver path for infrared sensor is
interrupted by placed object. As soon as robot senses presence of object, it moves towards object, picks
it with end effectors, and moves along way gantry and finally place it on destination. If another object
causes interrupt, it again does the same job. Whole process is controlled by micro controller.
DESIGN SPECIFICATIONS:
ADC Interface ---- 4 channel (expandable) to detect object position.
Supply Voltage ---- 230V (AC).

8 bit microcontroller – P89V51RD2.


Motor interface – 3 motors : 2 motors in parallel.
MECHANICAL DESIGN:

This pick and place robot has two main mechanical components:
A] Robotic arm and end-effectors.
B] Gantry for moving the arm.
OPERATION OF ROBOT :
1. Initially we will assume the rest position of entire system, i.e. state when no object is placed.
2. At this stage, photo detector is having its output high, since receiver of sensor can receive photons
from transmitter as no object I in its path to interrupt.
3. As soon as object is placed at the picking platform, the sensor gets interrupted and outputs low. This
signal is sent to the microcontroller which is burnt with program which tells what
operation is to be performed at this stage.
4. For understanding operation, let us rename the two motors used here. Let the name of gantry motor
be M1 and that for end effecter motor is M2.

5. Now as microcontroller detects that object is placed, it moves motor M1 in say


clockwise direction for a fixed time due to which whole arm moves towards picking platform.
6. As it reaches there, M1 stops and now motor M2 is started in say clockwise direction to hold the
object by closing jaw. This motor also, is on for particular fixed time instant.
7. As M2 gets off, motor M1 is moved again in opposite (here anticlockwise) direction till the time it
reaches the placing platform.
8. As it reaches placing platform, the motor M1 stops and M2 is switched ON in opposite (here
anticlockwise) direction till it releases object properly on desired place.
9. If after this no object is detected, the robot is in rest position. Otherwise if another object is detected,
steps from 3 are repeated till step 8.

BLOCK DIAGRAM DESCRIPTION:


I] ADC:
1. We are using an 8 bit ADC PCF 8591, which uses an I2C bus protocol. It has 4 analog input channels
AIN1, AIN2, AIN3 & 1 analog output channel AOUT. > Pin no. 1 i.e. channel 1 is connected IR sensor.

2. Except for the micro controller AT 89V51RD2, there is no other peripheral device
connected to the ADC. Hence the hardware address lines (A0, Al & A2) are grounded.
3. Pin no. 9 and 10 are serial data line (SDA) and serial clock line (SCL) respectively. Both lines must
be connected to a positive supply through a pull-up resistor. These pins are connected to the P1.6 &

P1.7 of the micro controller.


4. Here we are not feeding the OSC (pin no. 11) with an external clock Signal, but using the ON chip
oscillator. Hence the EXT pin (pin no.12) is directly grounded.
5. Vref (pin no. 14) is connected to the 5 V regulated supply.

II] Microcontroller:

1. PORT 0: (PIN NO. 39- PIN NO. 32): P0.0— P0.7 of the micro controller is connected
to the motor driver circuit.
2. Pin no. 9 is RESET pin, which is connected to the reset circuit.
3. Pin no. 9 and 10 of ADC are serial data line (SDA) and serial clock line (SCL) respectively. Both are
connected to a positive supply through a pull-up resistor. These pins are connected to the P1.6 & P1.7 of

the micro controller.


III] DRIVER CIRCUIT:
1. The L293 and L293D are quadruple high-current drivers.TheL293is designed to provide bidirectional
drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed to provide
bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed
to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-
current/high-voltage loads in positive-supply applications.
2. All inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with a Darlington
transistor sink and a pseudo-Darlington source. Drivers are enabled in pairs, with drivers 1 and 2
enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN.
3. When an enable input is high, the associated drivers are enabled and their outputs are active and in
phase with their inputs. When the enable input is low, those drivers are disabled and their outputs are off
and in the high-impedance state. With the proper data inputs, each pair of drivers forms a full-H (or
bridge) reversible drive suitable for solenoid or motor applications.
4. A Vcc1 terminal, separate from Vcc2, is provided for the logic inputs to minimize device power
dissipation.

4.LEVEL COMPUTING AND STORAGE DEVICE

Description: Thisis used to measure the water level in a dam, after a particular time interval and to store
them it into a memory IC for the sake of records. Later a person can access the memory using this
project and see the previous records using a keypad and LCD. This data can be sent to a computer
through serial port.
Description in detail: It mainly consist of following blocks
1. Potentiometer and pulley arrangement: We have to measure the water level, for this purpose we
are going to use a pulley-float/potentiometer arrangement. Pulley will be hanged above the water and a
float will be resting on the water surface using a rope. And potentiometer will be fixed at the center of
the pulley. So as the water level goes up and down, respectively pulley and potentiometer will rotate.
So eventually water level is converted into resistance of potentiometer. A constant current source is
used to pass current through this potentiometer, so as to get a voltage drop. This voltage is given to
amplifier.
2. Amplifier: As the voltage output across the potentiometer is less, it has to be increased to 0 to 5
volts range. We are going to use linear amplifier for this purpose.
3. Voltage to frequency converter: The main part of our project is microcontroller (89s51) which
reads only digital input (0V & 5V) But the output of Amplifier is in analog form, so it has to be
converted into digital format, for this purpose we are going to useVoltage to Frequency converter to
convert analog output from amplifier into the digital output to be given to microcontroller
4. Microcontroller: This is the CPU (central processing unit) of our project. We are going to use
89s51, because it belongs to the 8051 family. The various functions of microcontroller are like
I. Reading the digital input from Volt to Freq converter which is derived from Potentiometer and pulley
arrangement II. Sending this data to LCD so that the person operating this project should read the
values of Water level. III. Storing the data into EEPROM memory and display it later using keypad IV.
Sending the values of temperature and light to the computer using serial port
5. EEPROM: We are going to use AT12c02 as a EEPROM memory, it is Electrically erasable
programmable read only memory. It stores the data even if power supply is disconnected. This is used
to store thewater level along with date and time when it is recorded.
6. LCD: We are going to use 16x2 alphanumeric Liquid Crystal Display (LCD) which means it can
display alphabets along with numbers on 2 lines each containing 16 characters.
7. PC Interfacing: We are going to use max 232 IC for pc interfacing, the values of temperature and
light will be sent to pc when the key is pressed
8. Keypad: Various operations of keypad are as following,
I. Display current level II. Display current flow III. Display previous records IV. Erase previous
records V. Send data to Computer VI. Set logging time VII. Set current time

5. PERSON COUNTER AND PASSWORD DETECTOR

Description: Main concept behind this project is to measure and display the number of
persons entering in any room like seminar hall, conference room. LCD display placed outside the room

displays this value. And when number of persons inside the room are

zero, power supply inside the room can be cut using a relay interface. Second part of
project serves the functionality of a door-latch opening using a password entered through keypad. As
well as sending this data to a computer through serial port. This module also turn on buzzer if 3 wrong
passowords are entered consequently. User can change this password anytime he/she wish using a
keypad.
Description in detail: It mainly consist of following blocks
1. Transmitter: We are going to implement the Person counter module using a 2 transmitters and 2
receivers. We are going to use Infra-Red transmitters because infrared beams are not visible to human
eyes. Transmitter used are IR LEDs
2. Receiver: We are going to use a Infrared receiver. It is a active low device which means it gives low
output when it receives the Infrared rays.

3. Microcontroller: This is the CPU (central processing unit) of our project. We are
going to use a microcontroller of 8051 family. The various functions of microcontroller are like

I. Reading the digital input from two infrared receivers and calculate the number of

persons from them. II. Sending this data to LCD so that the person operating this project

should read the number of persons inside the room. III. Sensing the
password using keypad and to check whether it is a correct password or a wrong password and rotate
the stepper motor if the password entered is a correct password. IV. Sending the data to the computer

using serial port. This data consist of number of persons inside the room
and the status of entered password (Correct/wrong)
4. LCD: We are going to use 16x2 alphanumeric Liquid Crystal Display (LCD) which means it can
display alphabets along with numbers on 2 lines each containing 16 characters.
5. PC Interfacing: We are going to use max 232 IC for pc interfacing, the values of number of

persons inside the room and the status of entered password


(Correct/wrong) will be sent to pc.
6. Keypad: User will enter the password using the keypad. Various keys of keypad are
as following,
I. 0 to 9 II. Enter III. Escape
1. TXDI, RXDI, SBUFI
2. SADDRI, SADENI, BGCON
3. Micro controller based system(essay)
4. Character transmission using time delay
5. Memory address decoding for EPROM
6. Memory address decoding for EPROM
7. Large time delay using timers.
8. Even or odd pgm
9. Pgm to generate a Stair step ramp using DAC
10.Model times operation of 8051
11.Stepper motor interfacing
12.DC Motor speed control
13.Row scanning of matrix keyboard

You might also like