Batch Weighing Machine: A Report On
Batch Weighing Machine: A Report On
A
Report On
Prepared for:
Dr. K. R. Anupama
INSTRUCTOR IN CHARGE
MICROPROCESSORS PROGRAMMING AND INTERFACING
Prepared By:
Batch 35
April 23,2016
2
ACKNOWLEDGEMENT
We express our sincere gratitude to Dr. K. R. Anupama, for giving us this opportunity to work on
such an amazing project. Such an application has helped us gain knowledge of the principles of
microprocessor interfacing and hardware programming, which has been applied at various stages
of development of this project.We would also like to thank Mr. Vikas for guiding us at various
stages in this project.
We are also indebted to other instructors involved in this course for guiding us during the whole
project. The project has given us a great insight into the depths of Microprocessor Programming
and Interfacing. It helped us in practically applying the major principles of interfacing viz. memory
interfacing, and I/O interfacing.
Finally we extend our thanks to friends for their continuous support and encouragement.
PROBLEM STATEMENT
A microprocessor system is to be designed as a batch weighing machine. The system is interfaced
to three load cells by means of an 8 bit A/D converter. The conditioned output of the load cells is
given by the equation: Vout = 0.025 x weight (Kgs.) The system monitors the output of the load
cells and finds out the total weight by taking the average of the three values that are sensed by
each load cell. This value is displayed on a seven-segment display. When this value exceeds 99 kgs,
an output port, which is connected to a relay, is switched on to sound an alarm. Design the
necessary hardware and software for implementing the above-mentioned task. Once the objects
are placed on the load cell user presses a switch labelled weigh.
SYSTEM DESIGN
The Aim of the design assignment is to design a Microprocessor based electronic Batch Weighing
system.
We have used 3 load cells used to measure the load. When the switch is pressed the load cells feed
amplified analog voltage through an Instrumentational amplifier to Analog to Digital Converter
(ADC-0808) whose clock of 1 MHz is provided by 8254 operating in mode 3 .The ADC is then
Interfaced to the 8086 Microprocessor using 8255 and the microprocessor is also Interfaced to
seven segment displays and a buzzer through another 8255.The seven segment displays the
average of the weight and the Buzzer starts whenever the average weight crosses the limit of 99 kg.
Memory is also interfaced to the 8086 Microprocessor. The ALP is written and tested on an
emulator and simulated on proteus. The switch raises a Non maskable Interrupt to the 8086
processor.
COMPONENTS USED
Sr.no Components Used Quantity Purpose
1 8086 Microprocessor 1 Central Processor
2 8255 Programmable 2 PPI for I/O
Peripheral Interface
3 Analog to Digital Converter 1 ADC 8 channel 8 bit
(0808)
4 Load Cell 3 Weight sensor
5 Relay 1 Ouptut Interface
6 Buzzer 1 Output status
7 Seven Segment Display 5 Output status
8 6116 (2kb) RAM 2 RAM for the memory
9 2732 (4kb) ROM 4 EPROM
10 74LS138 (3 to 8 Line 3 Address Decoder
Decoder)
11 74LS373 (Latch) 3 Latchng the bus
12 74LS245 (Buffer) 2 BI-Directional Buffer
13 74LS244 (Buffer) 1 Buffer(Control signals)
14 Clock Generator (8284) 1 Clock
15 Crystal Clock
16 8254 1 Clock
17 DPST SWITCH 1 Weigh(input)
18 Instrumentational Amplifier 3 Amplifiers
Assumptions
The user must flip the weigh switch to store the weight on each load cell into memory i.e user
flips the weigh switch three times to store the weight at three different memory locations.
The resolution of the ADC 0808 is taken as 0.025 V by using a voltage reference of 6.4 V. So the
conversion factor is 0.996.
12
Device Specifications
Load cell
Note: This needs to be amplified to 6.4 V as input to ADC, thus an amplifier is used.
Amplifier
The input voltage is 20mV and require output voltage is 6.4V. This leads to an amplifaction
of 6.4V/20mV = 320.
The variable gain of this amplifier is given by
G = 1 + (200k/RG)
Calculating RG = 626.96 ohms
INTERFACING
8255 INTERFACING
The addresses used are 00-06H ,08H-0EH, 10H-16H for 8255(1), 8255(2) and 8254 respectively.
The RESET is connected to RESET of 8086. A1, A0 are connected to A2, A1 of the address bus. Two
8255 and 8254 are selected using a decoding circuit and incremental addressing
MEMORY INTERFACING
ROM1: 00000H - 01FFFH (size-8k)
ROM2: FE000H - FFFFFH (size-8k)
RAM1: 02000H - 02FFFFH (size-4k)
ROM1 (8k) is divided into ROM1 even (4k) and ROM1 odd (4k). Similarly ROM2 (8k) is
divided into ROM2 even (4k) and ROM2 odd (4k). RAM1 (4k) is divided into RAM1 even (2k)
and RAM1 odd (2k). So a total of four 2732 (4k ROM chips) and two 6116 (2k RAM chips) are
required. The ROM2 is used because when the microprocessor starts, it starts from the address
FFFF0H. Even and odd banks are distinguished using two decoders. Incremental addressing is
used for sending chip select signals to the chips used.
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://uk.rs-online.com/web/p/load-cells/4140865/
Buzzer
https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=w
eb&cd=7&ved=0ahUKEwigosD_tqPMAhUUBY4KHZEaBIgQFg
gwMAY&url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.euroworker.no%2Findex.p
hp%3Fdispatch%3Dattachments.getfile%26attachment_id%3D
1203&usg=AFQjCNHJj_CiNIwWSOEPqkUU4jR8nlX7Mw&sig2
=qp8JNDXA5BjcNvubtabSUg&bvm=bv.119745492,d.c2E&cad
=rja
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
Amplifier
http://cds.linear.com/docs/en/datasheet/1789fc.pdf