Kenya Medical Training College Department of Medical Engineering

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

KENYA MEDICAL TRAINING COLLEGE

DEPARTMENT OF MEDICAL ENGINEERING

NAME : ELACHI KASUDI FAITH

REG :D/UPMET/20001/004

PROJECT:

Design and construction of a digital weighing scale with data logger device for
dialysis patients.

Chapter three – Design methodology
3.1 Block diagram – Draw a well labeled block diagram

3.2 Explain each block

3.2.1 LOAD CELL


A load cell is a package with strain gauge elements and/or resistors in one housing, sealed and
encapsulated for protection. Load cells are designed to sense force or weight under a wide range
of adverse conditions. They are not only the most essential part of an electronic weighing
system, but also the most vulnerable. Load cell selection in the context of trouble-free operation
concerns itself primarily with the right capacity, accuracy class and environmental protection,
rather than with a particular measuring principle like bending, shear, compression or ring torsion.
While saying this, it should be recognized that a particular measuring principle might offer
distinct advantages in terms of overload capabilities or the ease of mounting [Usher, 1996]. The
sensing or spring element is the main structural component of the load cell. The element is
designed in such a way that it develops a strain, directly proportional to the load applied. Sensing
elements are normally made of high strength alloy steels (nickel plated for environmental
protection), precipitation-hardened stainless steels, heat-treated aluminum alloys, or beryllium
copper alloys.

Figure 3.1: A foil-type strain gauge

The gauge in this load cell is the foil type. This is simply a thin electrical conductor that is
looped back-and-forth and bonded securely to the piece of material to be strained. By bonding
strain gauges to a precisely machined element, the force applied can be identified in terms of
resistance change. The strain gauges, usually four or a multiple of four, are connected into a
Wheatstone bridge configuration in order to convert the very small change in resistance into a
usable electrical signal. Passive components such as resistors and temperature depending wires
are used to compensate and calibrate the bridge output signal [Kleitz, 2003].
3.2.2 Instrumentation amplifier

Many sensors exhibit a change in electrical resistance in response to the quantity they are trying
to measure. Some examples include force sensing resistors, which change their resistance when a
force is applied, thermistors, which change resistance as a function of temperature, and carbon
microphones, which alter their resistance in response to changing acoustical pressure. In all these
cases, one must be able to convert the resistance of the device into a usable voltage, which can be
read by an analog-to-digital converter (ADC). There are two ways to convert resistance of a
sensor to a voltage. The first, and the simplest way is to apply a voltage to a resistor divider
network composed of a reference resistor and the sensor as shown in figure 3.2.

The voltage that appears across the sensor (or the reference resistor) is then buffered before
being sent to the ADC. The output voltage is given by:
where Vex is excitation voltage, Rm is sensor resistance, Vm is the p.d. across the the sensor and
Rf is the reference resistance. The problem with this method of measuring resistance is that the
amplifier is amplifying the entire voltage measured across the sensor. It would be much better to
amplify only the change in the resistance of the sensor. This can be accomplished using a bridge
circuit and an instrumentation amplifier. + _ Vout Vref Rf Rm . . Figure 3.2: Resistance to
Voltage Conversion 27 A typical amplifier configuration is shown in figure 3.3. The four gauges
G1, G2, G3 and G4 are nominally identical, and of unstrained resistance R. They are connected
differentially, so that the equivalent circuit is as shown in figure 3.4.

Figure 3.3: Strain Gauge Amplifier


Figure 3.4 Equivalent Circuit for Strain Gauge Amplifier

The output is directly proportional to the strain since

3.2.3 LCD DISPLAY


In LCD 16×2, the term LCD stands for Liquid Crystal Display that uses a plane panel display
technology, used in screens of computer monitors & TVs, smartphones, tablets, mobile devices,
etc. Both the displays like LCD & CRTs look the same but their operation is different. Instead of
electrons diffraction at a glass display, a liquid crystal display has a backlight that provides light
to each pixel that is arranged in a rectangular network.
Every pixel includes a blue, red, green sub-pixel that can be switched ON/OFF. Once all these
pixels are deactivated, then it will appear black and when all the sub-pixels are activated then it
will appear white. By changing the levels of each light, different color combinations are
achievable. This article discusses an overview of LCD 16X2 & its working with applications.

An electronic device that is used to display data and the message is known as LCD 16×2. As the
name suggests, it includes 16 Columns & 2 Rows so it can display 32 characters (16×2=32) in
total & every character will be made with 5×8 (40) Pixel Dots. So the total pixels within this
LCD can be calculated as 32 x 40, otherwise 1280 pixels.

Figure 3.4 lcd 16x2

LCD displays mostly depend on multi-segment LEDs. There are different types of displays
available in the market with different combinations such as 8×2, 8×1, 16×1, and 10×2, however,
the LCD 16×2 is broadly used in devices, DIY circuits, electronic projects due to less cost,
programmable friendly & simple to access.

Specifications of LCD 16X2

The specifications of LCD 16X2 are discussed below.

● The operating voltage of this display ranges from 4.7V to 5.3V


● The display bezel is 72 x 25mm
● The operating current is 1mA without a backlight
● PCB size of the module is 80L x 36W x 10H mm
● HD47780 controller
● LED color for backlight is green or blue
● Number of columns – 16
● Number of rows – 2
● Number of LCD pins – 16
● Characters – 32
● It works in 4-bit and 8-bit modes
● Pixel box of each character is 5×8 pixel
● Font size of character is 0.125Width x 0.200height

LCD 16X2 Pin Configuration

The pin configuration of LCD 16 X 2 is discussed below so that LCD 16×2 connection can be
done easily with external devices.

16X2 LCD Pin Diagram


● Pin1 (Ground): This pin connects the ground terminal.
● Pin2 (+5 Volt): This pin provides a +5V supply to the LCD
● Pin3 (VE): This pin selects the contrast of the LCD.
● Pin4 (Register Select): This pin is used to connect a data pin of an MCU & gets either 1
or 0. Here, data mode = 0 and command mode =1.
● Pin5 (Read & Write): This pin is used to read/write data.
● Pin6 (Enable): This enables the pin to be high to perform the Read/Write procedure. This
pin is connected to the data pin of the microcontroller to be held high constantly.
● Pin7 (Data Pin): The data pins are from 0-7 which are connected through the
microcontroller for data transmission. The LCD module can also work on the 4-bit mode
through working on pins 1, 2, 3 & other pins.
● Pin8 – Data Pin 1
● Pin9 – Data Pin 2
● Pin10 – Data Pin 3
● Pin11 – Data Pin 4
● Pin12 – Data Pin 5
● Pin13 – Data Pin 6
● Pin14 – Data Pin 7
● Pin15 (LED Positive): This is a +Ve terminal of the backlight LED of the display & it is
connected to +5V to activate the LED backlight.
● Pin16 (LED Negative): This is a -Ve terminal of a backlight LED of the display & it is
connected to the GND terminal to activate the LED backlight.

LCD 16X2 Commands

The LCD 16×2 commands are discussed below.

● HexCode 1: This command will remove data displayed on the LCD screen of LCD.
● HexCode 2: It used to return home.
● HexCode 4: It is used to modify a cursor location to the left side.
● HexCode 6: It is used to change the cursor location to the right side.
● HexCode 5: It is used to shift the display to the right.
● HexCode 7: It used to shift the display to the left.
● HexCode 8: It is used to turn off the display & the cursor will be turned off.
● HexCode 0A: It is used to turn ON the cursor to turn off the display
● HexCode 0C: It is used to turn OFF the cursor & turn oON the display
● HexCode 0E: It is used to turn ON the display & blink the cursor.
● HexCode 0F: It is used to turn ON display & blink the cursor
● HexCode 10: It changes the cursor location to the left.
● HexCode 14: It changes the cursor location to right.
● HexCode 18: It changes the display location to the left side.
● HexCode 1C: It changes the display location to the right side.
● HexCode 80: It is used to shift the cursor to the primary line.
● HexCode C0: It moves the cursor to the beginning of the next line
● HexCode 38: 2- lines & 5×7 matrix
3.3 Circuit diagram

3.3.1 Operation
Am interfacing a 40 Kg load cell to the NodeMCU ESP8266 using the HX711 Load cell
amplifier module. HX711 is a precision 24-bit analog to digital converter (ADC) designed for
weighing scales and industrial control applications to interface directly with a bridge sensor. The
HX711 load cell amplifier is used to get measurable data out from a load cell and strain gauge.

The electronic weighing machine uses a load cell to measure the weight produced by the load,
here most load cells are following the method of a strain gauge, Which converts the pressure
(force) into an electrical signal, these load cells have four strain gauges that are hooked up in a
Wheatstone bridge formation. I will make a Weighing Scale Machine which can measure
weights up to higher-value like 40KG. I will have to calibrate the load cell and find the
calibration factor. Once the calibration is done, I will include that factor in my code. Thus this
will make the scale precise and accurate. The greater the mass the greater the error. So I will try
to remove the error from the weighing scale. I will finally display the measured weight in the
16x2 I2C LCD Display. I will send the obtained weight value on the IoT Cloud platform called
Blynk Application. Thus, weight can be monitored from any part of the world simply by
observation on the Blynk app dashboard. I will also send the data on another IoT platform called
Thingspeak. The graphical and numerical analysis of weight will be done in Thingspeak. The
various buttons will be used to differentiate the various patients in a dialysis center. Each patient
will have a tab from which nurses will be able review the history of the patient.

You might also like