0% found this document useful (0 votes)
96 views41 pages

Kabete Poly

This document outlines a project to design a microcontroller-based cold room with a fault alarm. It includes chapters on methodology, circuit design, study findings, and conclusions. The project aims to use a temperature sensor and microcontroller to monitor temperature in a cold room, control the cooling system if temperature rises above a set point, and raise an alarm for any prolonged faults. If temperature is not maintained, medicines could spoil, so the low-cost system aims to ensure drug quality over long periods.

Uploaded by

Wekesa Robinson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views41 pages

Kabete Poly

This document outlines a project to design a microcontroller-based cold room with a fault alarm. It includes chapters on methodology, circuit design, study findings, and conclusions. The project aims to use a temperature sensor and microcontroller to monitor temperature in a cold room, control the cooling system if temperature rises above a set point, and raise an alarm for any prolonged faults. If temperature is not maintained, medicines could spoil, so the low-cost system aims to ensure drug quality over long periods.

Uploaded by

Wekesa Robinson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 41

KABETE NATIONAL POLYTECHNIC

DEPARTMENT OF MEDICAL ENGINEERING AND

TECHNOLOGY

DIPLOMA IN MEDICAL ENGINEERING

TRADE PROJECT

MICROCONTROLLER BASED COLDROOM WITH A

FAULT ALARM
TABLE OF CONTENTS
DECLARATION..............................................................................................................................i
DEDICATION................................................................................................................................ii
TABLE OF CONTENTS...............................................................................................................iii
LIST OF FIGURES.........................................................................................................................v
LIST OF TABLES..........................................................................................................................vi
ACKNOWLEDGEMENT.............................................................................................................vii
LIST OF ABBREVIATIONS......................................................................................................viii
LIST OF SYMBOLS......................................................................................................................ix
OPERATIONAL DEFINITION......................................................................................................x
ABSTRACT...................................................................................................................................xi
CHAPTER ONE..............................................................................................................................1
1.1 INTRODUCTION.................................................................................................................1
1.2 PROBLEM STATEMENT...................................................................................................1
1.3 MAIN OBJECTIVE..............................................................................................................2
1.3.1 SPECIFIC OBJECTIVE.....................................................................................................2
1.4 JUSTIFICATION OF PROJECT..........................................................................................2
1.5 ASSUMPTIOPNS.................................................................................................................2
1.6 LIMITATIONS.....................................................................................................................2
CHAPTER TWO.............................................................................................................................3
2.1 LITERATURE REVIEW......................................................................................................3
CHAPTER THREE.........................................................................................................................7
3.0 METHODOLOGY................................................................................................................7
3.1 BLOCK DIAGRAM.............................................................................................................7
3.1.1 POWER SUPPLY..............................................................................................................7
3.1.2 MICROCONTROLLER UNIT .....................................................................................7
3.1.3TEMPERATURE SENSOR................................................................................................7
3.1.4 SWITCHING CIRCUIT.....................................................................................................8
3.2 SCOPE OF STUDY..............................................................................................................8
3.3 STUDY DESIGN..................................................................................................................8
3.3.1 POWER SUPPLY..............................................................................................................8
3.3.2 MICROCONTROLLER....................................................................................................9
3.3.3 TEMPERATURE SENSOR...............................................................................................9
3.3.4 SWITCHING CIRCUIT...................................................................................................10
3.4 CIRCUIT DIAGRAM.........................................................................................................11
3.4.1 CIRCUIT OPERATION..................................................................................................11
3.5 TABLE OF LIST OF COMPONENTS..............................................................................12
CHAPTER FOUR.........................................................................................................................13
4.1 STUDY FINDINGS............................................................................................................13
4.1.1 Table of Input and Expected results.................................................................................14
CHAPTER FIVE...........................................................................................................................15
5.1 DISCUSSION AND INTERPRETATIONS.......................................................................15
CHAPTER SIX..............................................................................................................................16
6.1 CONCLUSSIONS AND RECOMMENTATIONS............................................................16
6.1.1 CONCLUSSIONS............................................................................................................16
6.1.2 RECOMMENDATIONS.................................................................................................16
REFERENCES..............................................................................................................................17
APPENDIX....................................................................................................................................18
DECLARATION

Candidate Names: -----------------------------------------------------------------

Project Unit Code ________ Unit Title_______________________________________

THE CANDIDATE

I_____________________________________ of Reg. No. ______________________ declare


that: -

i) The Project named above was approved by the Departmental Academic Board and
supervised by
______________________________________
(Supervisor’s Name)

ii) I personally carried out the project whose report follows after this declaration.

iii) I received no undue help from unauthorized persons other than the normal guidance
from my supervisor.

iv) I wrote the project report unaided

v) The report submitted to the Department of medical engineering is the original work.

Signature of candidate ____________________________ Date ____________

SUPERVISOR
I _____________________________________ declare that I supervised the above candidate’s
project and the report contained here is the genuine work of the candidate.
Signature of supervisor: ______________________ Date __________________

DEDICATION
To my beloved parents and my entire family for their moral support and encouragement. Also
for their care and responsibility of bringing me up and for their great financial help. Special
thanks goes to my mother for continuous prayers and support. Above all to my lecturer who
used most of his time assisting me in this project.

ACKNOWLEDGEMENT

I gratefully acknowledge the contribution of numerous professionals in the field of technology


and engineering. I would also like to thank my parents for their moral and financial support that
they provided for the completion of my project .Thank you all very much and may God bless
you.

I also appreciate the department of medical engineering staff for the encouragement and
suggestions regarding the project.

Special thanks go to heavenly father whose unfailing love and everlasting blessings throughout
this project and make it successful.

ABSTRACT
In this thesis, we presented the design and development of an integrated device for measuring
temperature in drugs storage units. As wastage of spoilt drugs increases day by day due to unfavorable
temperatures the need for an accurate and affordable temperature monitoring devices is essential to
ensure quality of drugs for a long period of time. However, most temperature monitoring and
measuring devices are expensive. Our proposed temperature monitoring device is economical and user
friendly and uses optical technology to measure the temperature.

The goal of this thesis is design low-cost device which measures the temperature of a storage unit
using a temperature sensor called LM35 then sending a signal to the microcontroller which controls the
powering of the cooling system and also raises an alarm when the cold room falls out of range for a
prolonged period of time. The thesis explains how a single-chip microcontroller can be used to analyze
heart beat rate signals in real- time. The Hardware and software design are oriented towards a single-
chip microcontroller-based system, hence minimizing the size. It will be shown that the device meets
diverse and conflicting requirements, including reliability, minimum loading effects, and low battery
power consumption. Qualitative and quantitative performance evaluation of the device on real signals
shows accuracy in temperature monitoring system, even under intense of physical activity.

LIST OF ABBREVIATIONS
AC- Alternating Current

C- Capacitor.

D- Diode

DC- Direct Current

f- Frequency

HVD- High Voltage Disconnects

Hz- Hertz

IC- Integrated Circuit

K- Kilo-Ohms

kHz- Kilohertz

LVD- Low Voltage Disconnects

n- side/region- negative side/region

n-type- negative type

pF- Pico-farad

PIR- Passive Infrared

P-n- positive-negative

p-type- positive type

P-side/region- positive type/region

PV- Photovoltaic

R- Resistor

S- Switch
STC- Standard Test Conditions

SPK- Speaker

T- Transistor

UTT- Ultrasonic Transmitter Transducer

V- Voltage

VR- Variable Resistor

LIST OF SYMBOLS

Switch

battery

Earth

Resistor

Capacitor

Diode

NPN Bipolar Transistor


PNP Bipolar Transistor

Relay

OPERATIONAL DEFINITION

Microcontroller based cold room with a fault alarm – A device use to monitor the temperature
of a storage unit.

CHAPTER ONE
1.0 INTRODUCTION
Temperature is an important factor in determining the environment in which some products
like chemicals will be stored without getting damaged. When temperature is higher or lower
than the required one, the products will get spoilt. Most of the chemicals need to be stored at a
temperature range of 4˚C to 8˚C such includes drugs, blood banks and food among others. To
maintain this temperature, an electronic gadget is required to control the cooling machine.
Such units exist. However, in case they break down, no one will know till the stored products
get damaged. These cases of break down have occurred causing massive losses to the owners.
To prevent this, an effective method of controlling and reading the temperature in the freezer
needs to be devised.

Therefore, I came up with microcontroller based cold room control with fault alarm. When
temperature is higher than required, it powers the cooler to lower the cold room temperature
of the environment and when the temperature is lower than required it stop powering the
cooler. This ensures that temperature is maintained at the required level. If the temperature
falls outside the required range for some time, the system generates an audible alarm to alert
of a possible failure.

1.1 PROBLEM STATEMENT


When temperature is higher or lower than the required one, the products will get spoilt. Most
of the chemicals need to be stored at a temperature range of 4˚c to 8˚C. Such includes drugs,
blood banks and food among others.
However, in case they break down, no one will know till the stored products get damaged.
These cases of break down have occurred causing massive losses to the owners.

1.2 PURPOSE OF STUDY


I. Find a way in the health industry to store drugs and medicine in a proper way. In which
that they will not be damaged by temperatures that do not favor their storage.
II. The device to work correctly.

1.3 BOARD OBJECTIVES


To design, construct and test microcontroller based cold room control with fault alarm.

1.4 SPECIFIC OBJECTIVES


I. To ensure proper storage of sensitive drugs, other chemicals and food stuff thereby
reducing spoiling and therefore wastage.
II. To generates an audible alarm when the cold room falls out of range for a prolonged
period of time.
III. To make use of temperature sensors to facilitate temperature monitoring.

1.5 JUSTIFICATION OF STUDY


Having considered the problem mentioned above, this device will therefore protect the drugs
from being damaged, by monitoring the temperature of the storage place where the drugs will
be stored.

It will also reduce the expenses caused by lose of damaged products due to unfavorable
temperatures.

1.6 SIGNIFICANCE OF STUDY


The following are the main importance of the study

I. Medicine and drugs for storage will be stored in their collect favorable temperature and
they will last long without getting damaged.
III. Gain more knowledge in research about electrical devices to improve the future of
medical technology.
1.7 LIMITATION OF STUDY
The following are the main challenges that were faced in my research:

I. In availability of some components from immediate town thus having to use equivalent

components of different specifications.

II. Lack of information and proper knowledge from the sellers of the components used in

the project.

III. Time required for the project was also used for performing of other duties therefore

creating time shortage.

1.8 ASSUMPTION
The results and findings of the study is to increase yield and save money.

CHAPER TWO
2.0 LITERATURE REVIEW
It is a summary that has been published about a particular subject. It provides a user with an idea
about the current situation in terms of what has been done about the project; sometimes it
indicates suggestions on what needs to be done to increase the knowledge and understanding of a
particular problem. In this chapter the designer analyses the blocks making up the project then
selects the most suitable unit to the project.

2.1 POWER SUPPLY

A  power supply  is an electronic device that supplies  electric energy  to an  electrical load.
The primary function of a power supply is to convert one form of electrical energy to
another and, as a result, power supplies are sometimes referred to as electric power
converters. Some power supplies are discrete, stand-alone devices, whereas others are built
into larger devices along with their loads. Examples of the latter include power supplies
found in  desktop computers  and  consumer electronics devices.

REGULATED DC POWER SUPPLY

It converts unregulated AC into a constant DC. With the help of a rectifier it converts AC supply
into DC. Its function is to supply a stable voltage (or less often current), to a circuit or device that
must be operated within certain power supply limits. The output from the regulated power supply
may be alternating or unidirectional, but is nearly always DC.

CIRCUIT OPERATION

A regulated power supply is used to provide the required amount of power at specific voltage
from a primary source which can be ac mains or a battery. A transformer changes the ac mains
(line) voltage to a required value by stepping the voltage up or down. A rectifier is then used to
convert the ac power into dc power using half wave rectifier, full wave rectifier using a
transformer with Centre-tapped secondary winding or a bridge rectifier. But the output of a
rectifier may be fluctuating. A filter circuit is used for smoothing out the ac variations from the
rectified voltage. The four types of filters may be used: 1) Capacitor filter, 2) Inductor filter, 3)
L-C filter and 4) R-C filter.
A voltage regulator is necessary to maintain a constant output dc voltage by providing line
regulation and load regulation. A Zener -regulator, transistorized regulator or three terminal IC
regulators can be used for this purpose.
CIRCUIT DIAGRAM

Fig 2.2 Regulated power supply

COMPONENTS OF REGULATED POWER SUPPLY

Fig 2.3 block diagram of regulated power supply

A power supply can by broken down into a series of blocks, each of which performs a particular
function.
Fig1.1

Each of the blocks is described in more detail below:

 Transformer - steps down high voltage AC mains to low voltage AC.

 Rectifier - converts AC to DC, but the DC output is varying.

 Smoothing - smooth’s the DC from varying greatly to a small ripple.

 Regulator - eliminates ripple by setting DC output to a fixed voltage.

2.1.1 TRANSFORMER

A transformer is a static device that transfers electrical energy from one circuit to another

through inductively coupled conductors—the transformer's coils. A varying current in the first or

primary winding creates a varying magnetic flux in the transformer's core and thus a varying

magnetic field through the secondary winding. This varying magnetic field induces a varying

electromotive force (EMF) or "voltage" in the secondary winding. This effect is called mutual

induction.

If a load is connected to the secondary, an electric current will flow in the secondary winding

and electrical energy will be transferred from the primary circuit through the transformer to the

load. In an ideal transformer, the input power (P p) equals the output power (Ps).

Pp=Ps
Power (P) = voltage (V) X current (I)

P=VI

Therefore,

VsIs=VpIp

This ratio is called transformation ratio (a). Therefore,

Below is a symbol of transformer.

Fig1.2

2.1.2 RECTIFICATION

This is the process of converting ac to dc. This is required because the electronic circuits

operate with dc while the mains supply is ac. Also the battery requires to be charged with dc

power.
There are three typical methods of rectification:

1. Half wave rectification

2. Center tapped full wave rectification

3. Bridge rectification.

(I) HALF WAVE RECTIFICATION

Fig 1.3

In this method of rectification, a single diode is used with a transformer as shown above. The

rectified output waveform is also shown above. This gives an output voltage of half the

transformer output. For example a 12 volts transformer gives an output of 6 volts. The output is

not smooth even after smoothening. Therefore it is not used.

(II) CENTRE TAPPED FULL WAVE RECTIFICATION


Fig1.4

A center tapped transformer makes it possible to use two diodes to have all the advantages of a

bridge rectifier. The peak inverse voltage of the diodes must exceed the peak voltage of the

transformer secondary coil. Even though this method gives the required full wave rectification,

the transformer is uneconomically used. Therefore it is uneconomical to use.

(III) BRIDGE RECTIFICATION

Fig 1.5
This is made up of four diodes connected in a bridge circuit. The diodes guide the ac voltage

pulse alternatively through the load. Two diodes conduct for each half cycle. The peak inverse

voltage of the diodes only needs to exceed half the peak-to-peak voltage of the ac.

2.1.3 FILTER CIRCUIT

A power supply unit for electronic circuit must provide a dc voltage of minimum ripple

waveform. The output of a bridge rectifier is still not constant as it rises and falls to zero 100

times in a second. To reduce the ripple voltage to tolerable level, a smoothing circuit is needed.

This consists of a capacitor connected in parallel to the load.

Smoothing is performed by a large value electrolytic capacitor connected across the DC supply

to act as a reservoir, supplying current to the output when the varying DC voltage from the

rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the

smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and

then discharges as it supplies current to the output.

fig 1.6

Note that smoothing significantly increases the average DC voltage to almost the peak value

(1.4 × RMS value). For example 6V RMS AC is rectified to full wave DC of about 4.6V RMS (1.4V
is lost in the bridge rectifier), with smoothing this increases to almost the peak value giving

1.4 × 4.6 = 6.4V smooth DC.

Smoothing is not perfect due to the capacitor voltage falling a little as it discharges, giving a

small ripple voltage. For many circuits a ripple which is 10% of the supply voltage is satisfactory

and the equation below gives the required value for the smoothing capacitor. A larger capacitor

will give less ripple. The capacitor value must be doubled when smoothing half-wave DC.

5 × Io   
 Smoothing capacitor for 10% ripple, C =
Vs × f

C = smoothing capacitance in farads (F)

Io  = output current from the supply in amps (A)

Vs = supply voltage in volts (V), this is the peak value of the unsmoothed DC

f    = frequency of the AC supply in hertz (Hz), 50Hz in the UK

2.1.4 VOLTAGE REGULATOR

Circuits require dc power supply that can maintain a fixed voltage while supplying enough

current to drive a load.

A filter network is used to flatten out the rectified signal into a nearly flat (rippled) dc voltage

pattern.

When the power supply is unregulated, sudden changes within the ac input voltage (spikes,

dips, etc) will be expressed at the supply’s output. Sensitive circuits like digital circuits can not
be run on such. This is because the circuit can operate improperly due to false triggering among

others. Unregulated power supply cannot maintain a constant output voltage as the load

resistance changes.

Therefore, a voltage regulator circuit is needed. This eliminates the spikes and maintains a

constant output voltage with load variation.

A voltage regulator is designed to automatically adjust the amount of current flowing through

the load so as to maintain a constant output voltage by comparing the supply’s dc output with a

fixed or programmed internal reference voltage. A simple regulator consists of a sampling

circuit, an error amplifier, a conduction element and a voltage reference element. This is

illustrated below.

Fig1.6

There are different types of regulator ICs in the market. Some are designed to output a fixed

voltage, others to give a negative voltage while others are designed to be adjustable.

POSITIVE VOLTAGE REGULATOR ICs (78XX SERIES)


Fig 1.7

The digit XX represents the output voltage. E.g. 7805 is a 5 volt output regulator. This devices

can handle up to 1.5 A in properly heat sunk. To remove unwanted input or output

spikes/noise, capacitors can be attached to the regulator‘s input and output terminals.

NEGATIVE VOLTAGE REGULATOR ICs (79XX SERIES)

Fig 1.8

XX represent the negative output voltage. These likewise can handle a maximum output of

1.5A. The following diagram show how it is connected.


2.2 TEMPERATURE SENSOR

LM 35 sensor

LM35 is a 3 pin temperature sensor which requires a VCC and GND and in return the remaining
third pin gives us an analog output. This output is then provided to the ADCs present in At Mega
328P IC which according to a formula calculate the temperature in °C format. The LM35 series
are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional
to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear
temperature sensors calibrated in ° Kelvin.

Pin Number Pin Name Description


1 Vcc Input voltage is +5V for typical applications
There will be increase in 10mV for raise of every 1°C. Can
2 Analog Out
range from -1V(-55°C) to 6V(150°C)
3 Ground Connected to ground of circuit

Features

I. Calibrated directly in ° Celsius (Centigrade)


II. Linear + 10.0 mV/°C scale factor
III. 5°C accuracy guarantee able (at +25°C)
IV. Rated for full −55° to +150°C range
V. Operates from 4 to 30 volts (in this project its working on 5 V)
VI. Low self-heating, 0.08°C in still air

2.3 CONTROL UNIT (MICROCONTROLLER)

. A microcontroller is a self-contained system with peripherals, memory and a processor that can
be used as an embedded system. Most programmable microcontrollers that are used are
embedded in other consumer products or machinery including phones, peripherals, automobiles
and household appliances for computer systems.

There are several different kinds of programmable microcontrollers which can be categorized by
several parameters including Bits, Flash size, RAM size, instruction set, and number of
input/output lines, packaging type, architecture, supply voltage and speed.

The bits in microcontroller are 8-bits, 16-bits and 32-bits microcontroller.

`8-bit Microcontrollers are the most popular and widely used microcontroller. The 8-bit
microcontroller has 8-bitinternal bus and the ALU performs all the arithmetic and logical
operations on a byte instruction. The well-known 8-bit microcontroller is 8051.

Microcontroller basics

1. CPU- Microcontrollers brain is named as CPU. CPU is the device which is employed to fetch
data, decode it and at the end complete the assigned task successfully. With the help of CPU all
the components of microcontroller is connected into a single system. Instruction fetched by the
programmable memory is decoded by the CPU.

2. Memory – In a microcontroller memory chip works same as microprocessor. Memory chip


stores all programs & data. Microcontrollers are built with certain amount of ROM or RAM
(EPROM, EEPROM) or flash memory for the storage of program source codes.

3. Input/output ports – I/O ports are basically employed to interface or drive different
appliances such as- printers, LCD’s, LED’s etc.

. 4. Serial Ports – These ports give serial interfaces amid microcontroller & various other
peripherals such as parallel port.

5. Timers – A microcontroller may be in-built with one or more timer or counters. The timers &
counters control all counting & timing operations within a microcontroller. Timers are employed
to count external pulses. The main operations performed by timers are- pulse generations, clock
functions, frequency measuring, modulations, making oscillations, etc.
6. ADC (Analog to digital converter) – ADC is employed to convert analog signals to digital
ones. The input signals need to be analog for ADC. The digital signal production can be
employed for different digital applications (such as- measurement gadgets).

7. DAC (digital to analog converter) – this converter executes opposite functions that ADC
perform. This device is generally employed to supervise analog appliances like- DC motors, etc.

8. Interpret Control- This controller is employed for giving delayed control for a working
program. The interpret can be internal or external

9. Special Functioning Block – Some special microcontrollers manufactured for special


appliances like- space systems, robots, etc. comprise of this special function block. This special
block has additional ports so as to carry out some special operations.

ATmega328P

Parameter Value
CPU type 8-bit AVR
Performance 20 MIPS at 20 MHz[2]
Flash memory 32 Kb
SRAM 2 kB
EEPROM 1 kB
28-pin PDIP, MLF, 32-pin
Pin count
TQFP, MLF[2]
Maximum operating frequency 20 MHz
Number of touch channels 16
Hardware QTouch Acquisition No
Maximum I/O pins 23
External interrupts 2
USB Interface No
USB Speed –

Fig 2.19 diagram of atmega328

2.4 SWITCHING DEVICES

A switch is an electrical component that can break an electrical circuit, interrupting the current or
diverting it from one conductor to another. The mechanism of a switch may be operated directly
by a human operator to control a circuit, or by a moving object such as a door-operated switch,
or may be operated by some sensing element.

A relay is a switching circuit that is operated by electricity. Switches are made to handle a wide
range of voltages and currents.

SWITCHING CIRCUIT
MOSFET AS A SWITCH

2.4.6. MOSFET as a switch:

Due to very high input (Gate) resistance we can parallel together many different MOSFET's until
we achieve the current handling limit required. While connecting together various MOSFET's
may enable us to switch high current or high voltage loads.

To overcome this problem Power Field Effect Transistors or Power FET's where developed.

By applying a suitable drive voltage to the Gate of an FET the resistance of the Drain-Source
channel can be varied from an "OFF-resistance" of many hundreds of kΩ's, effectively an open
circuit, to an "ON-resistance" of less than 1Ω, effectively a short circuit. We can also drive the
MOSFET to turn "ON" fast or slow, or to pass high currents or low currents. This ability to turn
the power MOSFET "ON" and "OFF" allows the device to be used as a very efficient switch
with switching speeds much faster than standard bipolar junction transistors.

2.5 ALARM

A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or


piezoelectric. A piezoelectric element may be driven by an oscillating electronic circuit or other
audio signal source, driven with a piezoelectric audio amplifier. Sounds commonly used to
indicate that a button has been pressed are a click, a ring or a beep. Below is the piezzo buzzer
internal structure.
 
Fig 2.4

FAN (COOLER)
This is the part of the system which generates the cooling when powered. In this case I have
used a fun to represent the cooling system. This is because of the expenses of using a whole
refrigeration system. When the fun is powered it cools the storage area, and when the storage
area is at a temperature required the fan will then shut down to stop the cooling.

CHAPTER THREE
3.0 BLOCK DIAGRAM

Power Supply

Temperature Switching Circuit Fan (Cooler)

Sensor

Control Circuit

Fault Alarm
3.0.0 POWER SUPPLY

It steps down voltage from 240V AC to stable 5V DC to power the electronic circuit.

3.0.1 TEMPERATURE SENSOR CIRCUIT

Senses temperature variation and converts it to an electrical analog signal.

3.0.2 CONTROL CIRCUIT

This is the brain of the system. This monitors the temperature level, operates the cooler as well
as driving the display.

3.0.3 SWITCHING CIRCUIT

Supply power to the freezer on receiving a signal from the control circuit.

3.0.4 FAN (COOLER)

This cools the cold room once it is powered.

3.0.5 FAULT ALARM

This generates an audible alarm when the cold room falls out of range for a prolonged period of
time.

3.5 SCOPE
The scope of this project is to design a temperature monitoring device that will control the
temperature of a storage unit where drugs will be stored. It will keep the storage unit at the set
temperature.
3.6 STUDY DESIGN

3.2.1 POWER SUPPLY

3.2.1.0 TRANSFORMER

Fig 3.1 diagram of Transformer

Vp Is Tp
= = = =a
Vs Ip Ts

From here we can get

Vp Is
= = =a
Vs Ip

Vp= 240V

Vs= 6V

Is= 1A

Therefore,

240 1
= =
12 Ip

Is which is the input current to the transformer can be calculated as follows.

Ip=0.025A

The power rating of the transformer can be calculated as follow.


P= voltage x current

P= 240 X 0.025

P= 6VA

3.2.1.1 RECTIFICATION

Full wave four diode bridge rectifier is used here.

A=h*l =2πh

H =A÷ 2π

Area under curve

π 2π

=∫ sin ∅ d ∅ +∫ sinθdθ
0 π

V=Vmaxsin θ

Va=vmax/2π∫ sin ∅ dθ

Va=vmax/2π (-cos ∅ /π )

Va=vmax/2π(−cos π +cos ∝)

Va= vmax/2π( 1+cos ∝ )

When ∝=0
Va= vmax/2π( 1+cos 0 )

Va =Vmax/2π( 2 )

Va =Vmax /π

Va= 0.318

Va=0.318 x2

=0.636Vmax

But Vmax 6

3.2.1.3 SMOOTHING

5 × Io
Smoothing capacitor for 10% ripple C¿
Vs× f

C = smoothing capacitance in farads (F)


Io  = output current from the supply in amps (A)
Vs = supply voltage in volts (V), this is the peak value of the unsmoothed DC
f    = frequency of the AC supply in hertz (Hz), 50Hz in the UK

5 ×1
C=
6 ×50
C=0.01666667F

C= 1666.667µF

Therefore the standard capacitor from the catalogue book is 2200 µf

3.2.1.4 VOLTAGE REGULATOR


Fig3.2 diagram of regulator

A 7805 regulator IC is used here since we require 5V dc to power the circuit.

Technical specifications

Output voltage = 5v

Current =1A

Fig3.3 diagram of the power supply

3.2.2 TEMPERATURE SENSOR LM35

If the temperature is 0°C, then the output voltage will also be 0V. There will be rise of 0.01V
(10mV) for every degree Celsius rise in temperature.  The voltage can converted into
temperature using the below formulae.
3.2.3 CONTROL UNIT (MICROCONTROLLER)

DEVICE FLASH EEPROM RAM INTERRUPT VECTRO SIZE


ATmega48A 4Kbyte 256Byte 5Byte 1 instruction word/vector
ATmega48PA 4Kbyte 256Byte 5Byte 1 instruction word/vector
ATmega88A 8Kbyte 512Byte 1Byte 1 instruction word/vector
ATmega88PA 8Kbyte 512Byte 1Byte 1instruction word/vector
ATmega168A 16Kbyte 512Byte 1Byte 2 instruction word/vector
ATmega168P 16Kbyte 512Byte 1Byte 2 instruction word/vector
A
ATmega328P; 32Kbyte 1Kbyte 2Byte 2 instruction word/vector
ATmega328A 32Kbyte 1Kbyte 2Byte 2 instruction word/vector

KEY PARAMETERS

PARAMETERS VALUE
Flash 32 Kbytes
RAM 2 Kbytes
Pin Count 28
Max. Operating Frequency 20 MHz
CPU 8-bit AVR
# of Touch Channels 16
Hardware No
Max I/O Pins 26
Ext Interrupts 24
USB Interface No
No
USB Speed

Fig 3.5 diagram of AT MEGA 328

3.2.4 CRYSTAL OSCILLATOR

Fig 3.6 diagram of a crystal oscillator


3.3 CIRCUIT DIAGRAM

3.4 CIRCUIT OPERATION


The transformer steps down high voltage 240V AC to a low voltage 6V AC. The rectifier converts
AC to DC but the DC output is varying. A smoothing capacitor smooth’s the DC from varying
greatly to a small ripple. Then the regulator eliminates the ripple by setting DC output to a fixed
voltage. This power supply is used to power the microcontroller. The microcontroller is an
integrated circuit that is set to perform a required task. It is programed by software called the
Arduino software to control the whole device. The temperature sensor LM35 gets the
temperature from the storage unit then sends a signal to the microcontroller ATmega328P.
According to the program or instructions in the microcontroller. The microcontroller send a
signal to the switching circuit which powers the fan (cooler) only when the temperature at the
cooling unit is above the required temperature 8˚C and when the temperature is below 8˚C the
microcontroller sends a signal to the switching circuit to shut down the fan (cooler). If there is a
problem where the storage unit stays out of the required temperature for a long time a signal is
send from the microcontroller to the buzzer which raises an alarm.

3.5 LIST OF COMPONENTS

COMPONENTS TYPE

Microcontroller ATmega328P

Capacitor 2200uF, 1uF

Regulator LM 7805
4 Diodes IN400I

Transistor, Mosfet IRF 3710

Temperature Sensor LM35

Buzzer

Transformer 6V Output

Fan

CHAPTER FOUR
4.0 STUDY FINDINGS
1. The designer was able to use at mega 328P microcontroller to process and execute

data/information fed to it from input and output sources.

2. The designer managed to make use of LM35 temperature sensor to control the

temperature of drugs to be stored.

Temperature sensor LM35

If the temperature is 0°C, then the output voltage will also be 0V. There will be rise of 0.01V
(10mV) for every degree Celsius rise in temperature.  The voltage can converted into
temperature using the below formulae.
4.1 Test points

TEST POINTS EXPECTED VALUE ACTUAL VALUE

1.Smoothing 1 .Before 6V 5.8V


2.After 6V 6.4V
2.Regulator 5V 5.1V

3.microcontroller( output) 5V

4.microcontroller( input) 5V

Table 4.0 test results

CHAPTER FIVE
5.0 DISCUSSION AND INTERPRETATION

LM35 is a precession Integrated circuit Temperature sensor, whose output voltage varies, based
on the temperature around it. It is a small and cheap IC which can be used to measure
temperature anywhere between -55°C to 150°C. It can easily be interfaced with any
Microcontroller that has ADC function.

Power the IC by applying a regulated voltage like +5V (VS) to the input pin and connected the
ground pin to the ground of the circuit. Now, you can measure the temperate in form of voltage
as shown below.

The output of the LM35 sensor is connected to the microcontroller ADC. The microcontroller is
programed in its language which it understands. It works under the instructions given to it. The
microcontroller is powered by power supply unit where, the transformer steps down 240 AC V
to 6V AC. . The rectifier converts AC to DC but the DC output is varying. A smoothing capacitor
smooth’s the DC from varying greatly to a small ripple. Then the regulator eliminates the ripple
by setting DC output to a fixed voltage.

The microcontroller sends a signal to the switching circuit which contains a transistor (MOSFET)
as a switch, which closes the connection of power to the fan (cooler). When the temperature
required at the storage unit is achieved the sensor again sends a signal to the microcontroller
which sends a signal to the switching circuit to switch off the fan (cooler).

CHAPTER SIX
6.0 RECOMENDITION

After a thorough research, the project was tested and it worked. However, there is room for

improvement. I would recommend that in the future, the time selection and temperature control

should be digitized to ensure easier selection and precise control of temperature.

6.1 CONCLUSION

All these objectives were met. However the project was not accurate in the set temperature and

the time due to in availability of the exact calculated resistors and capacitors as well as the

temperature sensor.

In general, the specific objectives of the project were met. However, they were not met with the

required accuracy. The deviation however is not a major one but within the acceptable error.

6.2 REFERENCE
1. Sensor ,Nanoscience biomedical engineering instrument edited by Richard c.durf 3 rd

edition

2. Electronic circuit and system Owen Bishop 4th edition pg 11-19

3. Hughes ,electrical and electronic technology 11th edition revised by John Hiley ,keith

brown and ian mc kenzie smith pg 912-919

4. B.L. Theraja, A.K. Theraja (2005): A Textbook of Electrical Technology, Volume I,

Basic Electrical Engineering in S.I. Units pg 1116,2632,2364

5. Digital elactronics principles,devices and application by .Anil k Maini pg 375,367,368

6. Principles of electronics (v.k.mehta) pg 288

7. Scherz, P. (2000) Practical Electronics for Inventors. United States of America. The

MacGraw –Hill Companies: Pg 220,

8. Boylestad, R and Nashelsky, L. (2008) Electronic Devices and Circuit Theory. 7 th Edition

New Jersey Prentice Hall: Pg180-184, Chapter 4.

9. Horowitz, P. (1980) The Art of Electronics. 2nd Edition. England Cambridge University

Press: Pg 63

10. ,. http/www.wikipedia.com

6.3 APPEDIX
No Components Specification Quantity Price in Ksh

1 Transformer 12V Output 1 500

2 Microcontroller ATmega328P 1 350

3 Temperature LM35 1 700


Sensor

4 Diodes IN4001 4 60

5 Capacitor 2200uF, 1uF 50

6 Voltage LM7805 1 100

Regulator

7 Casing 1 750

8 Buzzer 1 150

9 Strip Board 1 100

10 LED

11 Solder Wire 3 Meters 90

12 Connecting 3 Meters 60

Wires

13 Typing and

Printing

14 Transistor 250

MOSFET

TOTAL 3160

You might also like