A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
Digital Weight Scale
1. IUB, EEE
Independent University, Bangladesh
Project title
“Microcontroller based Digital Weighing Machine”
Course Title: Embedded Systems(EEE418)
Submitted By:
1. Harunnur Rasid
ID: 1220883
2. Suraiya Akter
ID: 1120415
3. Mahajabin Ara Muna
ID: 1120416
Submitted to:
Dr. Khoshru Mohammad Salim
School of Engineering and Computer Science
Submissiondate:03-12-2015
2. IUB, EEE
Digital Weighing Machine
Weighing machine is very useful product. It helps us in checking our weight as well
as other product’s weight. Moreover, Weighing machine are used in many industrial
and commercial applications. Without a weight machine it is not possible to know the exact
mass of anything. There are two types of weighing measuring system called analog
weighing machine and digital weighing machine. The analog weighing system is very erroneous.
In digital weighing machine, we don’t have to face any problem. Only viewing the display we
come to know the exact weight of the product. In digital weighing machine, we interface with the
digital world. In our project, we come to know the basic principle of digital weighing
machine and know how to make a digital weight machine easily and cheaply. This project
basically helps us to compete with Manufacturer Company of digital weighing machine in future.
Component used in our project
To do the project we had to collect some components. They are given below-
Load Cell
Stand of iron to set up Load Cell
Microcontroller (PIC16F877A)
Op-Amp (AD620 )
Bread Board, Printed circuit Board(PCB)
LCD 16*2 display
Two power supply
Concomitant: Resistors, Connecting Wires.
Brief descriptions of important usable components
• Load cell :
Load cell is used as force measuring component. We collected a load cell of
5KG(Phidgets 3133_0 - Micro Load Cell (0-5kg) - CZL635)As a result in our project we only
3. IUB, EEE
could measure till 5 KG. There are four or two strain gauges in load cell depending on the
capacity of load cell. It works like a whetstone bridge
When we don’t give any load to it, it remains balanced; there is no flowing of current as
well as corresponding voltage.
Whenever we hang on a load on to it, imbalance situation is occurred. Stress
is caused by external force. Strain gauge converts the deformatio n to
electrica l signals. The electrical signal output is typically in the order of a few mill
volts.
Fig: Load Cell
• Op-amp AD620:
It is an instrumentation amplifier which is a type of differential amplifier. They
are mainly used to amplify very small differential signals from strain gauges.
It has got very low DC offset, low drift, low noise, very high gain. We made
our gain 100 using AD620. We could also used op-amp LM358 to amplify our
AD620 output further more.
Fig: Op-Amp AD620
4. IUB, EEE
• Bre ad board:
Breadboard is a c o ns t r uc t io n b a s e fo r a o ne - o f- a - k ind electronic.
It’s the solder less breadboard which does not require soldering.
Moreover is reusable.
Fig: Bread Board
• Microcontroller (PIC16F877A):
P I C 1 6 F 8 7 7 A i s a s m a l l p i e c e o f semiconductor
integrated circuits. The package type of these integrated c ir c uit s is
D I P p a c k a ge . W e c o uld us e a no t he r mic r o c o nt r o l l e r .
But P I C 1 6 F 8 7 7 A ha s s o me a d va nt a ge s . . This p a c k a ge is ve r y
e a s y t o b e soldered onto the strip board. PIC16F877A is very cheap.
Moreover, it is a l s o v e r y e a s y t o b e a s s e m b l e d . S o w e u s e
t h i s c h i p . T h i s I C c a n b e reprogrammed and erased up to 10,000
times .Therefore it is very good for new product development phase.
Fig: PIC16F877A Micro Controller Chip
5. IUB, EEE
• Printe d circuit board:
A p r i n t e d c i r c u i t b o a r d o r P C B i s u s e d t o
mechanically support and electrically connect electronic components using conductive
pathways, tracks or signal traces etched from copper sheets laminated on
to a non-conductive substrate. We set up our microcontroller in the PCB.
Fig: PCB Circuit board
Power Source:
Components that we need to make our IC (PIC16F877A) work are just a 5V p o w e r
s up p ly a d a p t e r .
Fig: DC power source
6. IUB, EEE
LCD 16*2:
We have used a 16*2 LCD display to display our output.
Fig: LCD Display
Project description
Hardware Description:
Hardware part is done in a breadboard. We constructed our circuit
diagram on bread board. Isolate four wires are coming out of the load cell. Two wires are
used as input in our amplifier and other two are used as and Ground. We connected it with
the AD620; supplied (+ve) 7.5 volt and (–ve) 7.5 volt separately using two power supply
in the AD620 op amp. We measured the change in voltage as the weight flexes via
the green and white wires. We measured across a resistor of 100ohm as we’ve wanted to gain
1000.
8. IUB, EEE
Fig: Proteus Simulation
Pro g ra m mi ng s o f t wa re :
W e d id o ur c o d e us ing CCS for PIC software. We’ve done our project with c code.
As our input was analog and we wanted to show it on a digital form. The analog to digital
conversion was completely done in our code. This part was little bit difficult to as we had to
check the code many times. Port A is used as out input of the analog input. We used port B of
microcontroller for the 7-segmentdisplay and used port D for the data selector. We
converted the input from binary to 10-bit BCD which displayed in LCD 16*2 in a
corresponding decimal value. As we use 10 bit, we could show from 0-1023.We burn the
code into microcontroller using a burner and then set up the chip in printed circuit board.
C C o de :
#include <16F877A.h>
#device adc=10;
#include <math.h>
#fuses XT,HS,NOWDT,NOLVP
#use delay(clock=4000000)
#include "flex.c"
void main()
{
float offset=0;
float value=0;
RA0/AN0
2
RA1/AN1
3
RA2/AN2/VREF-/CVREF
4
RA4/T0CKI/C1OUT
6
RA5/AN4/SS/C2OUT
7
RE0/AN5/RD
8
RE1/AN6/WR
9
RE2/AN7/CS
10
OSC1/CLKIN
13
OSC2/CLKOUT
14
RC1/T1OSI/CCP2
16
RC2/CCP1
17
RC3/SCK/SCL
18
RD0/PSP0
19
RD1/PSP1
20
RB7/PGD
40
RB6/PGC
39
RB5
38
RB4
37
RB3/PGM
36
RB2
35
RB1
34
RB0/INT
33
RD7/PSP7
30
RD6/PSP6
29
RD5/PSP5
28
RD4/PSP4
27
RD3/PSP3
22
RD2/PSP2
21
RC7/RX/DT
26
RC6/TX/CK
25
RC5/SDO
24
RC4/SDI/SDA
23
RA3/AN3/VREF+
5
RC0/T1OSO/T1CKI
15
MCLR/Vpp/THV
1
PIC16F877A
D7
14
D6
13
D5
12
D4
11
D3
10
D2
9
D1
8
D0
7
E
6
RW
5
RS
4
VSS
1
VDD
2
VEE
3
LCD1
LM016L
5V
100%
RV?
1k
9. IUB, EEE
float weight=0;
lcd_init();
setup_adc_ports(ALL_ANALOG);
setup_adc(ADC_CLOCK_INTERNAL);
while(1)
{
value=read_adc();
offset=290;
weight=(value-offset)/146.6; //weight=k*(measured voltage - zero weight offset)
lcd_gotoxy(1,1);
printf(LCD_PUTC,"weight in kg");
lcd_gotoxy(1,2);
printf(LCD_PUTC,"%f",weight);
}
}
After that we connected the PCB board with the LCD display. When we don’t give any
load, the display was showing an offset value. For 1/2 kg it was showing us decimal 588
and for one kg it was 1023.
We burn this code into the PIC16F877A microcontroller and setup the circuit.
Problem faced during doing our project
Mainly we faced problem in hardware part.
By checking the load cell wires again and again we had to find out which of the two are
inputs.
Making of stand of iron was also very difficult part.
Moreover we could not make sub tractor circuit for avoiding the leakage
voltage only because of time shortness.
As because PIC16F877A is very sensitive we have to very careful of its use.
Further Improvements can be done in following ways
10. IUB, EEE
O ur w e ight ma c hi ne w a s givi n g us a huge o ffs e t va lue w hic h
is r e a lly undesirable. So to avoid that offset value we could make a sub tractor circuit
which would peter out the offset almost.
If we want than we can develop this weighing machine by many ways such as we can use
keypad like if we keep any product on the machine than it will show the cost, weight and
total cost of that product on the display. For doing this we also have to develop the code.
Conclusion
Weighing machine is very useful for us. Without weighing machine it is
not possible to know exact mass of anything. It becomes a part of our daily life.
The o r igina l c o s t o f a w e igh i n g ma c hine is ve r y high b ut o ur
inve nt e d w e igh i n g machine is very low cost. We spend almost 1500 taka for
this weighing machine but the original price of weighing machine is approximately 4000-
5000 taka. D o i n g t h i s p r o j e c t w a s v e r y i n t e r e s t i n g . F r o m t h i s
p r o j e c t a c q u i r e l o t s o f knowledge and come to learn many new things.