Anda di halaman 1dari 23

Microprocessors and Interfacing

Project-Question no.9

Flour Packing Machine


Batch B92

Submitted By: Submitted To:

Kaustubh Gondhalekar (2012A7PS116G)

Anuj Khandelwal (2012A7PS117G) Prof. K.R.Anupama

Hardik Chawla (2012A3PS142G)

Kartik Singhvi (2012A3PS175G)

An assignment submitted in partial fulfillment of the course


requirements for

Microprocessor Programming and Interfacing


BITS Pilani K. K. Birla Goa Campus, Goa – 403726
Problem Statement:

Design a Micro Processor based flour packing machine. You have flour
contained in the silo. The user keys in the required amount of flour per
packet. The system should take the input and pack the specified amount of
flour upon press of a START key. It is also required to monitor the
temperature of the floor where packing is going on. This temperature range
can be user settable and also should be displayed. Display the number of
packets packed in every hour. An alarm for any malfunctioning of the system
should be provided.
Design Specifications

Temperature Sensor
Calibrated in degree Celsius

Linear + 10mV/degree Celsius scale factor

Operating voltage: 4-20 Volt

Output range: 2 – 150 degree Celsius

Accuracy: +- 0.2 degree Celsius

Weight Sensor

Calibrated in pounds

Linear 10mV/ pound scale factor

Output Range: 0-500 pounds


Assumptions:

 User inputs the temperature in ° C


 Four temperature sensors ( LM 35) are sufficient to monitor the
packaging area
 Minimum temperature entered is 2°C
 Maximum temperature entered is 99°C
 Minimum temperature range is less than maximum temperature
range
 Weigh per packet is entered in lbs and is less than 99lbs.
 All user inputs should be whole numbers.
SYSTEM DESIGN

When the system is turned on the user is expected to select a mode


tempSetLower/ tempSetUpper/weightSet/Start on pressing the respective
key.
If start is pressed the default values are loaded and the system starts
packing. A valid input is expected from the user on selecting any of the
above modes other than Start.
On pressing the start key the temperature values entered by the user are
displayed. The system checks if the average temperature is within the
range specified by the user. If it isn’t the flour flow is stopped and alarm
is raised. The user has to acknowledge this alarm by press of any key.
After acknowledge the system restarts. The weight of the flour packed is
also constantly checked. If this is greater than or equal to the specified
value the conveyer motor moves forward and flour is packed into the
new packet. The number of packets packed is displayed after every hour.
While setting the temperature or weight the user is expected to enter the
tens place value and then the units place value respectively.
Components Used

Sr. No. Components Used Quantity Purpose

1. 8086 1 Central Processor

2. 8255 3 PPI for I/O

3. 8253 1 Programmable interval timer

4. 6116 RAM 1 RAM for the Memory

5. 2732 ROM 1 EPROM

6. 74LS138 1 Address Decoder

7. 74LS373 11 Latching the Bus

8. 74LS245 2 Bi-Directional Buffer

9. L293D 1 Motor Driver

10. ADC0808 1 ADC 8 channel 8 bit

11. 7447 7 BCD to Seven segment Display

12. Load Cell 1 Weight sensor

13. LM35 4 Temperature sensor

14. OR Gate 6

15. Keypad 1 16 Key Matrix


7-Segment common
16. 6 O/p Display
anode Display
7-Segment common
17. 1 O/p Display
anode Multiplexed
18. LED 3 Output Status
Hardware Design
CLOCK GENERATOR

15 MHz

AD [0…15]

X1 X2
AD [16…19]
EPI CLK CLK
F/C’
Reset RESET
AEN1

AEN2 Ready READY


CSYNC 8284 BHE’ BHE’

Clock Generator 8086

RD’
NMI RD’

RES’ HOLD WR’ WR’

M/IO’
PCLK GND M/IO’

RDY1 RDY2
I/O DECODING

A3 A O0 8255 (1)
A4 B O1 8253
A5 C O2 8255 (2)
O3 8255 (3)
74LS138

5V G1

A6 G2A’

M/IO’ G2B’

KEYPAD INTERFACING

D0- PA0-
D0-D7
D7 PA3 16 KEY MATRIX
KEYPAD
RD’ PB0-
RD’
PB3
WR’ WR’ 8255 (1)
A1 A0 PA0-PA3
A2 A1
RESET’ from PC0- A a 7 SEG

8284 RESET’ 7SEG


PC3 C COMMON

D 7447 COMMON ANODE


Y1 CS’ ANODE
PC6-PC7 LT g
RBO
RBI
5V
TIMER

100Hz
10KHz
CLK0 OUT0

Count 100d

5V GATE0

5Hz
OUT1 CLK1
Count 20

5V GATE1

1 Hour
CLK2 OUT2
hr

Count 36000d
5V
GATE2
ADC INTERFACING

D0- D0-D7 OUT8- CLOCK 1.048MHz


D7 OUT0

ADD A
Through 74LS373 with
RD’ RD’ ADD B
PB7 as LE ADD C
WR’ EOC
WR’ 8255(2) OE
SOC
A1 A0 Vref(+) 2.56V
A2 5V ALE
Vref (-) GND
RESET’ from
RESET’ LT0
8284 ADC0808
PC5 LT1 EOC_Check
Y2 CS’ PC6 LT2
PC7 LT3

TEMPERATURE SENSOR AND MOTOR INTERFACING

Load GND FLOUR


Vs=5V LT1 D0 O0
LT2 D1 01
IN1 LM35 D2 74LS373
LT3
ALARM
IN2
ADC0808 LM35 LT0 O2
OE’
IN3 LM35 EN1 OUT1
5V IN1
IN4 LM35 L293D CONVEYOR
GND IN2 DC MOTOR

OUT2

GND 5V
DISPLAY INTERFACING

D0-D7 D0-D7 PA0

PA3 Output
RD’ RD’
RBO 7447A to G Display

WR RBI
WR’

A1 LT
A0 8255(3)
PB0- Latch
A2 A1 PB5 Enable
5V
RESET’ from 8284
RESET’
Y3 CS’ PC0 EOC_Check

PC1 hr
Actuator interfacing

Temperature sensor

ADC 0808

Load cell
MEMORY INTERFACING

RAM (min 2k chip) : 4k


ROM (min 4k chip) : 8k
ROM1 : 00000h -01FFFh
RAM1 :02000h-02FFFh
8255
SYSTEM BUS OF 8086
Address

AD16-AD19 LS373
A16-A19

S6-S3

8086
G OE’

ALE

BHE’/S7
BHE’

LS373
AD8-AD15 A8-A15
G OE’

LS373
AD0-AD7 A0-A7
G OE’

MN/MX’ 5V
SYSTEM BUS 8086
Data control

RD’

WR’

IO’/M

8086

LS245

AD8-AD15 D8-D15

DT/R’ DIR OE’

DEN’

LS245

AD0-AD7
D0-D7
DIR OE’

MN/M
MN/MX’ 5V
XXXXXX
XXXXXX
’X’
Flow Charts

System Start

Top

Wait for Key Press

Start Temp Temp Weight Stop


Set Set Set
(Lower) (Upper)
Alarm Temp set lower Temp set upper

Stop flour motor and conveyor Take temperature input Take temperature input
motor

Jump to Top Jump to Top


Start Alarm

Wait for Acknowledge

Weight Set

Jump To Top

Take Weight input

Jump to Top
Start

Display

Take avg. temperature from ADC

Compare with Stored Value

Temperature No
within range Alarm

Yes

Take weight input

Compare Weight

YES
Motor Forward If Required
Weight Filled

NO
DISPLAY

Display min and max temperature

Check if one NO
hour Over

YES

Display no. of packets

END
KEYBRD

Zero to all rows

Read Columns

All Keys
Open ?

Yes

Read Columns

No
Key
Pressed ?

Yes

Wait

Read Columns

No
Key
Pressed ?

Yes

Output zero
to one row

Read Columns

No
Key
Found ?

Convert To HEX

Return
APPENDIX

The appendix contains the list of all datasheets of all the chips used.
8086
http://www.datasheet-pdf.com/datasheetdownload.php?id=544568

8255
http://www.alldatasheet.com/datasheet-
pdf/pdf/66100/INTEL/8255A.html

8259
http://www.alldatasheet.com/datasheet-
pdf/pdf/66107/INTEL/8259A.html

8253
http://www.alldatasheet.com/datasheet-
pdf/pdf/66098/INTEL/8253.html

ADC0808
http://html.alldatasheet.com/html-
pdf/8097/NSC/ADC0808/38/1/ADC0808.html

Load Cell
http://www.velamed.com/englisch/products/electromyography/noraxon
- sensors/noraxon-sensors.html
LS138
http://www.alldatasheet.com/datasheet-pdf/pdf/46206/SLS/LS138.html

74373
http://www.alldatasheet.com/datasheet-pdf/pdf/192081/TI/LS373.html

74245
http://www.alldatasheet.com/datasheet-
pdf/pdf/44472/SIEMENS/BF245.html

L293D
http://www.ti.com/lit/ds/symlink/l293d.pdf

LM 35
http://www.ti.com/lit/ds/symlink/lm35.pdf

Anda mungkin juga menyukai