Digital Patient Queue
Digital Patient Queue
TRADE PROJECT
TRADE PROJECT
COLLEGE NO : D/MET/17001/029
2
TABLE OF CONTENT
CERTIFICATE i
ACKNOWLEDGEMENT ii
DEDICATION iii
ABSTRACT iv
CHAPTER ONE 1
1.1 INTRODUCTION 1
1.2 PROBLEM STATEMENT 1
1.3 OBJECTIVES 1
CHAPTER TWO 3
2.0 POWER SUPPLY 3
2.0.1. Block Diagram of a Regulated Power Supply 3
2.0.2. Transformer 4
2.3 RECTIFIER 6
2.4 FILTERS 7
2.5 VOLTAGE REGULATOR 7
2.6 RESISTORS 7
2.4.1. Types of resistors 7
2.7 CAPACITORS 8
2.5.1. Types of capacitor 8
2.8 OPERATIONAL AMPLIFIER 9
Types of Operational Amplifiers 9
a) Inverting operational amplifier 9
b) Non inverting operational amplifier 9
c) Summing amplifier 9
d) Subtracter amplifier 9
a) Inverting amplifier 10
b) Non Inverting Amplifier 10
c) Summing Amplifier 10
d) Subtractor Amplifier 10
2.9 MULTI-VIBRATORS 11
2.7.1. Types of Multi-Vibrators 11
2.7.2. Uses of Multi-Vibrators 11
2.10 555 TIMER OSCILLATOR 11
2.11 COUNTERS 11
2.9.1 Types of Counters 11
2.9.2 Binary to Decimal Decoder 16
2.9.3 Binary to Seven-Segment Decoders 17
There are two types of displays: 17
2.9.4 Digital Display 17
CHAPTER THREE 19
3.0 SPECIFIC CONCLUSION 19
3.1 POWER SUPPLY 19
3.2 TRIGGERING CIRCUIT 21
3
3.3 THE COUNTERS 21
3.4 BINARY TO SEVEN SEGMENT DECODER 22
3.5 OSCILLATOR 22
3.6 CIRCUIT DIAGRAM 24
3.7 24
3.8 CIRCUIT OPERATION 25
3.9 COSTING 26
3.10 TEST AND MEASUREMENTS 27
3.11 RECOMMENDATION 27
3.12 CONCLUSION 27
3.13 LIMITATION AND SCOPE 27
3.14 ABBREVIATION 27
4
CERTIFICATE
I hereby declare that this is my original work. Nobody is allowed whatsoever to publish or
duplicate the same unless arrangements are made in advance with the author. It has been
approved and accepted by the MTC examination board for the partial fulfillment of the award of
diploma in Medical Engineering Technology.
NAME OF AUTHOR:
SIGNATURE: DATE
NAME OF SUPERVISOR
SIGNATURE: DATE
5
ACKNOWLEDGEMENT
I thank the almighty God for giving me strength and care during challenging periods of this
project writing. As a matter of fact, project writing is demanding and requires patience and
prayers. I am grateful to those who contributed to the completion of this project. Special thanks
go to Ms. Langat for being the project supervisor and her tireless efforts of guidance, advice and
supervision during the period.
Thanks also to biomedical students my colleagues (September 2016 class) for their support may
God bless you all.
6
DEDICATION
I dedicate this project to my sister, brother and mum Lucy.
7
ABSTRACT
8
ABBREVIATION
9
CHAPTER ONE
1.1: INTRODUCTION
Being disorganized is a trait not recommended in the hospital or life in general. So by use of
communication either verbal or non- verbal and being straight forward in your wants,
organization and order should be made no matter the area one is at. In hospitals,
communication is needed to control patient queues. This may force the doctor to go from his
room to call in the next patient once he is through with one patient. This is cumbersome and
time-consuming.
Some hospitals give their patients cards with numbers as they enter through the hospital door
just for the purpose of queuing, secondly to know the number of patients to be served and lastly
to serve them on the basis of first come first serve. By the introduction of the digital patient
queue controller, the patients served with the card numbers won't be able to skip the next
patient as the patients will be orderly called into the doctor's room with the number as displayed
in both their cards and outside the doctor’s door.
According to Bain and Company net, a global management consulting firm, “A customer is four
times more likely to defect to a competitor if the problem is service-related than price or product-
related” (https://www.slideshare.net/retail360/customer-service-manifesto-39453929) Moreover,
Lee Resources International net, a general business consulting stated that, “For every
customer complaint there are 26 other unhappy customers who have remained silent.”
(http://leeresources.com/)
Thus it’s necessary for public hospitals to provide good services in order to attract more patients
to attain sustainability doing business. Digital patient queue controller is definitely good since
more patients in the public hospitals get to be attended to and the doctors get to save more
energy than they would use to go in and out of their office to call in the next patient. But since
the digital patient queue controller displays the next patient's number, this makes the patient line
move smoothly. This works once the doctor presses the push button incrementing the reading
and a sound alert is generated making the next patient aware of his or her call to the doctor’s
room.
1.3: OBJECTIVES
GENERAL OBJECTIVE
1. Design, construct and test digital patient queue controller.
SPECIFIC OBJECTIVES
1. Make use of BCD counters to achieve digital display.
2. Design a power supply that will make the unit operate with 240 AC.
3. Make use of seven segment display to give a legible output.
1.4: JUSTIFICATION
Patient queue controller in public hospital makes it easy for all patients to be attended to with
ease and ensures the satisfaction of all patients since there will be a reduction in queue
offences. There will be an implementation of the first come first serve principle.
1.5: LIMITATION
1.6 :ASSUMPTIONS
1. Model design and construction will be successful and all specifications of power supply
240 VAC, operating voltage of 12Vdc and operating current of 1 Ampere are achieved.
2. The design will add value to public hospitals in Kenya.
CHAPTER TWO
INTRODUCTION
A queue management system is the organization of queues of people within a retail or public
sector department. It could be either reactive through a system that can organize the existing
queue or proactive through queue controller statistics gathering system, so that the trends can be
identified and anticipated.
There are two types of queues, which are structured and unstructured queues. Structured queues
are in a fixed form and people that included are in predictable positions. Examples are found in
supermarket paying counter, banks or even hospitals. Structured queues enable a stress free
waiting. Unstructured queues are where people form a queue in an unpredictable and varying
locations and directions, example is in taxis queues, ATMs and at a period of high demand in
many areas.
The digital queue management system structure consists of the following
1. Power supply
2. Amplifier
3. 555 timer
4. BCD/Binary counter
5. Seven segment display
A
The ammeter is usually arranged to give full scale deflection with 5A, and the ratio of the
primary to secondary turns must be such that full scale ammeter reading is obtained with full-
load primary current in the primary. For example, if the primary has four turns and the full load
primary current is 50A, the full load primary ampere turn is 200; consequently, to circulate 5A in
the secondary, the number of secondary turns must be 2000/5 i.e. 40
iii) Air Core Transformers
Consist of two concentric coils which have nothing but air within the coils. It has the advantage
that the magnetizing current has exactly the same waveforms as the voltage to which it is related.
Disadvantage
e) It is difficult to produce the necessary magnetic flux to generate the appropriate EMF
f) With a ferromagnetic core the flux linking the winding is largely contained within the
core
g) Air core transformers should/ have to be contained in ferromagnetic shields which limits
the effects of stray field from causing distortion in electronic circuits
2.4 RECTIFIER
Rectifier is used to convert the ac voltage into pulsating voltage (dc). A rectifier circuit consists
of a transformer-rectifier and a rectifier stack as shown below
2.5 FILTERS
The function of filter is to remove ripples from the rectifier voltage. There are different types of
filters, these are: -
i) Capacitor filter
ii) Chocked input filter
iii) Capacitor input filter or p -filter
2.7 RESISTORS
Resistance: they are conductors which normally oppose current flow to certain extent. This
conductors are called resistance with ohms ( W ) as its SI unit
Symbol or
Types of resistors
Wire wound resistors
Wire wound resistors use wires of malgamin or other alloys, so the change of resistance with
temperature is minimal.
Carbon composition types
They are made up of finely divided carbon mixed with powdered insulating material in suitable
proportion.
Variable Resistors
They are resistors whose values can change between zero and certain maximum value. They can
be wire or carbon types.
Uses of resistors in a circuit
i. It limits current
ii. Reduce voltage to desired value
iii. Potential divider
iv. Timing or delay circuit
2.8 CAPACITORS
Capacitor is a device used to store electric charge. It consists of two conducting plates separated
by insulating medium called dielectric. Dielectric could be air, mica, ceramic, paper, polythene
or polycarbonate plastics.
Capacitor has the following functions
i. Store charge
ii. Oppose any change in voltage in a circuit
iii. Block the passage of direct through it Dielectric
plates
2.5.1. Types of capacitor
Capacitor may be divided into two classes: -
i. Fixed capacitors
ii. Variable capacitors
Symbol
a) Inverting amplifier
b) Non Inverting Amplifier
c) Summing Amplifier
d) Subtractor Amplifier
2.10 MULTI-VIBRATORS
Are two stage amplifiers with positive feedback from the output of an amplifier to the input of
the other. The signal is supplied in such a manner that one transistor is driven to saturation and
the other to cut off.
2.9.1: Types of Multi-Vibrators
- Astable multi-vibrators
- Monostable multi-vibrators
- Bistable multi-vibrators
a) Frequency divider
b) As square wave and pulse generators
c) As saw tooth generator
d) As standard frequency source when synchronized by an external crystal oscillator
e) For many specialized use in radar and TV
f) A memory element in computer
Cycle Q1 Qo (Qi=Qo)Dec
0 0 0 0
1 0 1 1
2 1 0 2
3 1 1 3
4 0 0 0
You can continue adding flip flops, always inverting the output to its own input and using the
output from the previous flip flops as the clock signal. The result is called ripple counter which
can count to 2n-1 where n is the number of bits (flip flop stage) in the counter
NB
Ripple counters suffered from unstable outputs as the overflows “ripple” from stage to stage but
they do find application as dividers for clock signals where instantaneous count is unimportant
but the division ratio overall is.
ii. Synchronous Counter
A simple way of implementing the logic for each bit of an ascending counter is for each bit to
toggle when all of its less significant bits are at a logic high state. For example, bit 1 toggles
when 0 is logic high. Bit 2 toggles when both bit 1 and bit 0 are logic high. Bit 3 toggles when
bit 2, bit 1 and bit 0 are all high and so on. Synchronous counters can also be implemented with
hardware which are more complex but allow for smoother, more stable transition.
iii. Ring counter
A ring counter is a shift register with the output of the last one connected to the input of the first
i.e. in ring. Typically, a pattern consisting of a single 1 bit is circulated so the state repeats every
n clock in n flip flops are used. It can be used as cycle counters on n state
iv. Johnson Counter
A Johnson counter (or switch tail – ring counter, twisted-ring counter, walking-ring counter, or
moebius counter) is a modified rig counter where the output from the last stage is inverted and
fed back as input to the first stage. A pattern of bits equal in length to twice the length of the shift
register thus circulates indefinitely. This counter find specialist applications, including those
similar to the decade counter, digital to analogue inversion etc.
v. Decade Counter/ Mode Counter
Is a counter that counts in decimal digits rather than binary. A decimal counter may have each
digit binary encoded (i.e. it may count in binary coded decimal) or other binary encodings.
Alternatively, it may have a fully decoded, or one-hot output code in which each output goes
high in turn. This circuit find applications in multiplexers and demultiplexors or wherever a
scanning type of behavior is useful
vi. Up-Down Counter
Is a counter that can change state in either direction. Under control an up-down selector input, is
known as an up-down counter. When selector is in up state, the counter increments its value;
when the selector is down state the counter decrements the count.
If the count up is taken at lock 1 level, the AND gate A and D are enabled connecting the Q
outputs of flip flops A and B to the clock input of the following flip flops. The circuit than
operate as an up counter having a count of 8.
Truth Table
Decimal number Inputs Outputs
displayed D C BA abcdefg
0 0000 1111110
1 0001 0110000
2 0010 1101101
3 0011 1111001
4 0100 0110011
5 0101 1011011
6 0110 0011111
7 0111 1110000
8 1000 1111111
9 1001 1110011
From the truth table above a number of segment maps can be obtained each of which maps the
input which must be high for segments to be illuminated. Thus segment a is on when the input
decimal numbers are 0,2,3,5,7,8 or 9. Hence from truth table
AB 00 01 11 10
CD
00 1 1 1 0
01 1 X X 1
11 X X X X
10 0 0 1 1
(a)
From the map above
A decoder converts a binary input to a decimal output. Frequently for display purposes e.g. on
seven a segment display suppose a two-bit binary decoder is required which will produce a logic
1 output at just one of for outputs, the other three remaining at logic 0
Truth Table
B A F0 F1 F2 F3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Where F0, F1 F2 F3 representing the decimal outputs of 0, 1, 2 and 3 respectively while A and B
are binary inputs causing the appropriate decimal go high from the truth table
F0 is 1 when A= 0 and B=0
F1 is 1 when A=1 and B=0
F2 is 1 when A=0 and B=1
F3 is 1 when A=1 and B=1
Am encoder converts from decimal into binary and works on similar principle using logic gates
encoders and decoders also called cod converters
Symbol
Charge carrier recombination takes place when electron recombine with the holes from the p-
side. During this recombination some energy difference is given up in the form of heat and light
(photons) from silicon and germanium more energy is given as heat. A greater percentage of
energy released is given out in the form of light. The color of the light depends on the type of
material used
Construction
N-type layer is grown on a substrate and p-type layer is deposited on it by diffusion. The anode
connection is made at the outer edges of the p-layer. A metal film is applied at the bottom of a
substrate for reflecting as much light as possible to the surface. LEDs operate from low voltages
and currents. To operate from high voltage a series resistance must be used.
V -Vf
� �
R = �s ohms
�
� I �
� f �
Where Vs=voltage supply
Vf=forward voltage
If=forward current of LED
Seven segment displays are generally employed as indicators of decimal numbers and consist of
a number of LEDs arranged in seven segment as shown below. If indicated any number between
0 to 0 by lighting the appropriate segments- seven segment displays can be of two types
depending on the common connection for example, we have common anode and common
cathode.
Each of the seven LEDs in a 7segment has a positive terminal which is called anode and a
negative terminal which is called cathode. This means that there could be as many as 14
connections to be made. This number is reduced to 8, either the cathodes or the anodes are
connected together or common as shown bellow
x. Liquid Crystal Display
This is a liquid crystal which flows like a liquid at room temperature but whose molecular
structure has some properties normally associated with solids. The molecules are oriented in a
definite crystal pattern
CHAPTER THREE
3.0: BLOCK DIAGRAM ANALYSIS
3.1: POWER SUPPLY
This block provides the required regulated dc voltage of 12 v to all the cct components in other
block. The circuitry in this block should be effective in the following ways;
· Should be able to supply the rated maximum current of 1A and 12v to all cct without the
supply falling outside specified +/- tolerance.
· Should be able to maintain the supply of voltage constant within specified limits the load
changes main supply input voltage varies or the ambient temperature changes.
This block consists of a step down Tx ,a full wave bridge rectifier, a shunt capacitor for filtering
and voltage regulator to keep the dc output constant.
3.2: AMPLIFIER
This block compares the signal and feeds it to the circuit when switch is pressed to increment the
reading i.e. BCD codes and to activate timer
3.3 BINARY COUNTER
Converts the number of times the button is pressed into BCD codes. when the selector m is
upstate the counter increases the reading and when the selector m is downstate counter, it
decreases the reading. ABCD 4029 up/down counter ic is used.
3 Filter circuit
Shunt capacitor filter is used. This method offers the best smoothing where large currents are
consumed by the cct. Its also economical since only a capacitor is required.
Value of capacitor used can be calculated as,
C (smoothing capacitor) = (5. Io)/(vs .f)
Where C =smoothing capacitor in farads
Io= Output supply from the supply in amps
Vs= Supply voltage in volts ,this the peak value of ripple dc volts
F= frequency in (Hz)
Io= 1A , vs =12v ,F =50Hz
C = (5.1)/ (12.50)
= 8.33mf or 8330microfarads
The ripple content depends on the size of the capacitor. The bigger the size the more time it
takes to charge and discharge.
The ripple factor depends on the capacitor , if the load and frequency are constant related by the
following equation
Ripple factor = 1/(2 root 3FCRL)
3.6.2: OPERATIONAL AMPLIFIER
The amplifier stage/ triggering stage consist of a comparator divider, switch,a voltage divider at
the base of the comparator 741 to ensure that the voltage at the non-inverting terminal is 3v
Eg. V(non inverting) =VCC by R2/(R1 +R2)
Where VCC = voltage supply
R1 =15K
R2 =5K
Therefore , V = 12 by (5K/(15+5)K)
=60/20
=3V
3.6.3: COUNTERS
It is the number of output pulse from the trigger comparator 741 which correspond to the number
of times the switch S2 is pressed. The data latch passes this number to the decoder for conversion
to decimal before it reaches the display where its held until the next count enters the latch , thus
CD 4029 updown counter are used since they are cascaded to give counts more than 9 times.
3.6.4: BINARY TO SEVEN SEGMENT COUNTER
This is where data from the counter is converted to decimal before it reaches the display where
it’s held until the next count enters the latch. A four bit binary signal is applied to four inputs
D(msb) C,B,A (lsb) and is converted into seven output a,b,c,d,e,f.g, by the decoder (CMOS
4511) each output are connected via a suitable limiting current resistance of 600 to the anode of
one segment of the seven segment LED display which is driven when high. The cathode of all
seven LEDs in display are connected to 0V.
A common cathode display are used to display the number of times the switch is pressed by the
doctor.
Example: suppose D=0 ,C= 0, B= 1, A= 1, the binary input will be 0011 ( 3 in decimal) , that
means there will be five outputs which are a,b,c,d,g needed to light the five LED segment
making a 3.
3.6.5: OSCILLATOR
Oscillators are used to provide or generate pulse to run the buzzer hence a 555 timer is used.
The IC is a monostable mode and is powered from 12v dc. When push button is pressed the
output of IC goes high for a time period determined by the resistance of R1 and R2 and capacitor
of 0.1microfarads
Time period = 1.1 by R1C1
1.1 by 47K by 0.1microfarads
=5.17micro sec
F = 1/T
1/5.17microsec
=193.42Hz or 0.193KHz
Therefore frequency of oscillator is 0.193 KHz of the buzzer.
Buzzer is used to give audible sounds to alert the next patient on the queue to enter thus a 12v dc
buzzer is used.
LM 7812 1 50 50
620 RESISTOR 14 5 70
15K RESISTOR 1 10 10
5K RESISTOR 2 10 20
MICRO SWITCH 1 10 10
SOLDER WIRE 8 10 80
JUMPER 6 20 120
TOTAL 2360/=
CHAPTER 4
5.1: RECOMMENDATION
This design is used to display counts up to 99. The improvement to the design are welcomed,
even to design with a display that will shows both the patients name and number to be attended
to next on the queue to avoid confusion.