Nikki Project
Nikki Project
On
SK.ANEESHA 21263-EC-003
CH.ASHALATHA 21263-EC-005
S.NAVYA 21263-EC-022
M.SWAPNA 21263-EC-039
S.SWATHI 21263-EC-040
Submitted to the State Board of Technical Education & Training, Andhra Pradesh
in partial fulfillment of the requirement for the award of degree of
DIPLOMA
in
ELECTRONICS AND COMMUNICATION ENGINEERING
OCT – 2023
GOKULA KRISHNA COLLEGE OF ENGINEERING
2nd Shift Polytechnic-263
(Affiliated to JNTUA, Ananthapuramu and Approved by AICTE, New Delhi) Sullurupeta,
Tirupati District, A.P. – 524121
BONAFIDE CERTIFICATE
This is to certify that the Project Report entitled “ TEMPERATURE BASED FAN SPEED
CONTROLLER USING IOT ” being submitted by
SK.ANEESHA 21263-EC-003
CH.ASHALATHA 21263-EC-004
S.NAVYA 21263-EC-022
M.SWAPNA 21263-EC-039
S.SWATHI 21263-EC-040
in the partial fulfillment of the requirements of the award of the Diploma in the
department of Electronics and Communication Engineering is a record of bonafide work
carried out under our guidance during the academic year 2023-24.
External Examiner
DECLARATON
Pradesh, is a record of bonafide work carried out by us under the guidance of Mr. K.
of Engineering, Sullurpet.
Place:
Date:
ABSTRACT
The portable measuring device can measure the heart rate and body
temperature. The device uses Arduino board that connects to the heartbeat
and temperature sensor. It shows the heartbeat and temperature readings on
LCD display and at the same time sends them to ThingSpeak IoT platform
in real-time via Wi-Fi.
1
CONTENTS
1. INTRODUCTION
……………………………………..………...……..,…………,… ............. 1
2.2.4 MICROCONTROLLER
AT89S52…................................................................................................ 10
3. FEATURES......................................................................................... 11
5. RESULT ............................................................................................... 17
8. APENDIX… ....................................................................................... 19
CHAPTER -1
INTRODUCTION
INTRODUCTION
This project explains about a simple low cost circuit which can be mainly used in large scale
industries to detect the high temperature and take immediate measures. This circuit is used to sense
the temperature at a place. It indicates the temperature on the LCD with the help of microcontroller.
This circuit makes use of LM35 which is a 3 pin centigrade temperature sensor IC. It directly senses
the temperature and sends the data to the controller.
The block diagram of temperature monitoring system consists of temperature sensor, ADC,
microcontroller and LCD. LM35 is used as temperature sensor it senses the temperature. The output
of Temperature sensor is in the form of analog signal. ADC0804 is used to convert this analog
signal to digital. The output of ADC is given to the Microcontroller. The output of controller will
be displayed on the LCD
The complete project is built around the 8051 micro controller. PCB Wizard Schematic generation
software is employed to prepare the schematic for development of project. Hardware is built
according to schematic prepared by soldering each component on the general purpose PCB. Source
code is developed using Keil micro vision software. µVision is an IDE (Integrated Development
Environment) that helps you write, compile, and debug embedded programs. The written source
code is dumped into the microcontroller IC using a Programmer. To dump the code into
microcontroller micro C Flash software is used.
3
CHAPTER -2
BLOCK DIAGRAM
2. BLOCK DIAGRAM
TEMPERATURE SENSOR
8051
ADC0804
2.1 HARDWARE DESCRIPTION
A variable regulated power supply, also called a variable bench power supply, is one where
you can continuously adjust the output voltage to your requirements. Varying the output
of the power supply is the recommended way to test a project after having double checked
parts placement against circuit drawings and the parts placement guide.
This type of regulation is ideal for having a simple variable bench power supply. Actually
this is quite important because one of the first projects a hobbyist should undertake is the
construction of a variable regulated power supply. While a dedicated supply is quite
handy e.g. 5V or 12V, it's much handier to have a variable supply on hand, especially for
testing
Most digital logic circuits and processors need a 5 volt power supply. To use these parts
we need to build a regulated 5 volt source. Usually you start with an unregulated power
supply ranging from 9 volts to 24 volts DC (A 12 volt power supply is included with the
Beginner Kit and the Microcontroller Beginner Kit.). To make a 5 volt power supply, we
use a LM7805 voltage regulator IC (Integrated Circuit). The IC is shown below
CIRCUIT FEATURES
Brief description of operation: Gives out well regulated +5V output, output current
capability of 100 mA
Circuit protection: Built-in overheating protection shuts down output when regulator IC
gets too hot
Circuit complexity: Very simple and easy to build
Availability of components: Easy to get, uses only very common basic components
Design testing: Based on datasheet example circuit, I have used this circuit successfully as
part of many electronics projects
Component costs: Few dollars for the electronics components + the input transformer cost
The principal advantage of a bridge rectifier is you do not need a centre tap on the
secondary of the transformer. A further but significant advantage is that the ripple
frequency at the output is twice the line frequency (i.e. 50 Hz or 60 Hz) and makes filtering
somewhat easier.
As a design example consider we wanted a small unregulated bench supply for our
projects. Here we will go for a voltage of about 12 - 13V at a maximum output current (IL)
of 500ma (0.5A). Maximum ripple will be 2.5% and load regulation is 5%.
Now the RMS secondary voltage (primary is whatever is consistent with your area) for
our power transformer T1 must be our desired output Vo PLUS the voltage drops across
D2 and D4 (2 * 0.7V) divided by 1.414.
This means that Vsec = [13V + 1.4V] / 1.414 which equals about 10.2V. Depending on the
VA rating of your transformer, the secondary voltage will vary considerably in accordance
with the applied load. The secondary voltage on a transformer advertised as say 20VA will
be much greater if the secondary is only lightly loaded.
If we accept the 2.5% ripple as adequate for our purposes then at 13V this becomes 13 *
0.025 = 0.325 Vrms. The peak to peak value is 2.828 times this value. Vrip = 0.325V X
2.828 = 0.92 V and this value is required to calculate the value of C1. Also required for
this calculation is the time interval for charging pulses. If you are on a 60Hz system it it
1/ (2 * 60) = 0.008333 which is 8.33 milliseconds. For a 50Hz system it is 0.01 sec or 10
milliseconds.
Remember the tolerance of the type of capacitor used here is very loose. The important
thing to be aware of is the voltage rating should be at least 13V X 1.414 or 18.33. Here you
would use at least the standard 25V or higher (absolutely not 16V).With our rectifier
diodes or bridge they should have a PIV rating of 2.828 times the Vsec or at least 29V.
Don't search for this rating because it doesn't exist. Use the next highest standard or even
higher. The current rating should be at least twice the load current maximum i.e. 2 X 0.5A
or 1A. A good type to use would be 1N4004, 1N4006 or 1N4008 types.
These are rated 1 Amp at 400PIV, 600PIV and 1000PIV respectively. Always be on the
lookout for the higher voltage ones when they are on special.
2.1.2 LM7805
The LM7804 series of three terminal positive regulators are available in the TO-220/D-
PAK package and with several fixed output voltages, making them useful in a wide range
of applications. Each type employs internal current limiting, thermal shut down and safe
operating area protection, making it essentially indestructible. If adequate heat sinking is
provided, they can deliver over 1A output current. Although designed primarily as fixed
voltage regulators, these devices can be used with external components to obtain
adjustable voltages and currents.
WORKING:
Voltage regulator limits the voltage that passes through it. Each regulator has a voltage
rating; For example, the 7805 IC (these regulators are often considered to be ICs) is a 5-
volt voltage regulator. What that means is that no matter how many volts you put into it,
it will output only 5 volts. This means that you can connect a 9-volt battery, a 12-volt
power supply, or virtually anything else that's over 5 volts, and have the 7805 give you a
nice supply of 5 volts out. There are also 7812 (12-volt) and 7815 (15-volt) three-pin
regulators in common use.
The pin-out for a three pin voltage regulator is as follows:
1.Voltage-in
2.Ground
3. Voltage out
For example, with a 9-volt battery, you'd connect the positive end to pin 1 and the
negative (or ground) end to pin 2. A 7805 would then give you +5 volts on pin
3.Voltage regulators are simple and useful. There are only two important
drawbacks to them: First, the input voltage must be higher than the output voltage.
For example, you cannot give a 7805 only 2 or 3 volts and expect it to give you 5
volts in return. Generally, the input voltage must be at least 2 volts higher than the
desired output voltage, so a 7805 would require about 7 volts to work properly. The
other problem: The excess voltage is dissipated as heat. At low voltages (such as
using a 9-volt battery with a 7805), this is not a problem. At higher voltages,
however, it becomes a very real problem and you must have some way of controlling
the temperature so you don't melt your regulator. This is why most voltage
regulators have a metal plate with a hole in it; That plate is intended for attaching a
heat sink to-Do not confuse three-pin voltage regulators with a device known as a
TRIAC (short for triode AC switch). It is easy to associate them with each other,
since they look similar (both have three pins) and they both regulate power.
LED's are special diodes that emit light when connected in a circuit. They are frequently
used as "pilot" lights in electronic appliances to indicate whether the circuit is closed or
not. A clear (or often colored) epoxy case enclosed the heart of an LED, the semi-conductor
chip.
Figure 2.5 LED View
LED’s must be connected the correct way round, the diagram may be labeled a or + for
anode and k or - for cathode. The negative side of an LED lead is indicated in two ways:
If you can see inside the LED the cathode is the larger electrode (but this is not an official
identification method). The negative lead should be connected to the negative terminal of
a battery. LED's operate at relative low voltages between about 1 and 4 volts, and draw
currents between about 10 and 40 mille amperes. Voltages and currents substantially
about these values can melt a LED chip. The most important part of light emitting diode
(LED) is the semi-conductor chip located in the center of the bulb as shown below. The
chip has two regions separated by a junction. The p region is dominated by positive
electric charges, and the n region is dominated by negative electric charges. The junction
acts as a barrier to the flow of electrons between the p and n regions. Only when sufficient
voltage is applied to the semi-conductor chip, can the current flow and the electron cross
the junction into the p region? In the absence of the large enough electric potential
difference (voltage) across the LED leads, the junction presents an electric potential
barrier to the flow of electrons.
The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and
interrupt system to continue functioning. The Power-down mode saves the RAM con-
tents but freezes the oscillator, disabling all other chip functions until the next interrupt
or hardware reset.
3. FEATURES:
• PRODUCTS
• WATCHDOG TIMER
• POWER-OFF FLAG
4. SOFTWARE DESCRIPTION :
Check the power supply connections Insert smart card in to the smart card reader Check
LEDs Check Microcontroller minimum requirements Welcome message will be printed
on LCD Consumed units and available units are displayed on LCD.A message will be
displayed if there is no smart card
µVision3 adds many new features to the Editor like Text Templates, Quick Function
Navigation, Syntax Coloring with brace highlighting Configuration Wizard for dialog
based startup and debugger setup. µVision3 is fully compatible to µVision2 and can be
used in parallel with µVision2.
What is µVision3?
µVision3 is an IDE (Integrated Development Environment) that helps you write, compile,
and debug embedded programs. It encapsulates the following components:
• A project manager.
• A make facility.
• Tool configuration.
• Editor.
• A powerful debugger.
To help you get started, several example programs (located in the \C51\Examples,
\C251\Examples, \C166\Examples, and
• HELLO is a simple program that prints the string "Hello World" using the Serial
Interface.
• TRAFFIC is a traffic light controller with the RTX Tiny operating system.
Additional example programs not listed here are provided for each device architecture.
3. Select Project - Select Device and select an 8051, 251, or C16x/ST10 device from the
Device Database™.
5. Select Project - Targets, Groups, Files. Add/Files, select Source Group1, and add the
source files to the project.
6. Select Project - Options and set the tool options. Note when you select the target device
from the Device Database™ all special options are set automatically. You typically only
need to configure the memory map of your target hardware. Default memory model
settings are optimal for most applications.
2. Use the Step toolbar buttons to single-step through your program. You may enter G,
main in the Output Window to execute to the main C function.
3. Open the Serial Window using the Serial #1 button on the toolbar.
Debug your program using standard options like Step, Go, Break, and so on.
µVision2 is a standard Windows application and started by clicking on the program icon.
To create a new project file select from the µVision2 menu
Project – New Project…. This opens a standard Windows dialog that asks you
We suggest that you use a separate folder for each project. You can simply use the icon
Create New Folder in this dialog to get a new empty folder. Then select this folder and
enter the file name for the new project, i.e. Project1.
µVision2 creates a new project file with the name PROJECT1.UV2 which contains a
default target and file group name. You can see these names in the Project
Window – Files.
Now use from the menu Project – Select Device for Target and select a CPU for your
project. The Select Device dialog box shows the µVision2 device database. Just select the
microcontroller you use. We are using for our examples the Philips 80C51RD+ CPU. This
selection sets necessary tool options for the 80C51RD+ device and simplifies in this way
the tool Configuration
Typical, the tool settings under Options – Target are all you need to start a new
application. You may translate all source files and line the application with a click on the
Build Target toolbar icon. When you build an application with syntax errors, µVision2
will display errors and warning messages in the Output Window – Build page. A double
click on a message line opens the source file on the correct location in a µVision2 editor
window. Once you have successfully generated your application you can start debugging.
After you have tested your application, it is required to create an Intel HEX file to
download the software into an EPROM programmer or simulator. µVision2 creates HEX
files with each build process when Create HEX file under Options for Target – Output is
enabled. You may start your PROM programming utility after the make process when
you specify the program under the option Run User Program #1.
CPU Simulation:
µVision2 simulates up to 16 Mbytes of memory from which areas can be mapped for read,
write, or code execution access. The µVision2 simulator traps and reports illegal memory
accesses. In addition to memory mapping, the simulator also provides support for the
integrated peripherals of the various 8051 derivatives. The on-chip peripherals of the
CPU you have selected are configured from the Device
Database selection:
You have made when you create your project target. Refer to page 58 for km more
information about selecting a device. You may select and display the on-chip peripheral
components using the Debug menu. You can also change the aspects of each peripheral
using the controls in the dialog boxes.
Start Debugging:
You start the debug mode of µVision2 with the Debug – Start/Stop Debug Session
command. Depending on the Options for Target – Debug configuration, µVision2 will
load the application program and run the startup code µVision2 saves the editor screen
layout and restores the screen layout of the last debug session. If the program execution
stops, µVision2 opens an editor window with the source text or shows CPU instructions
in the disassembly window. The next executable statement is marked with a yellow arrow.
During debugging, most editor features are still available.
For example, you can use the find command or correct program errors. Program source
text of your application is shown in the same windows. The µVision2 debug mode differs
from the edit mode in the following aspects:
The “Debug Menu and Debug Commands” described on page 28 are available. The
additional debug windows are discussed in the following.
The project structure or tool parameters cannot be modified. All build commands are
disabled.
Disassembly Window:
The Disassembly window shows your target program as mixed source and assembly
program or just assembly code. A trace history of previously executed instructions may
be displayed with Debug – View Trace Records. To enable the trace history, set Debug –
Enable/Disable Trace Recording.
If you select the Disassembly Window as the active window all program step commands
work on CPU instruction level rather than program source lines. You can select a text line
and set or modify code breakpoints using toolbar buttons or the context menu commands.
5.0 RESULT:
In the temperature monitoring system we have used four blocks those are temperature
sensor,ADC0804,AT89s52microcontroller,LCD.In this system the first block temperature
sensor senses the temperature in the atmosphere in analogue form and then sends this
analogue signal to ADC to convert into digital signal.This digital signal is fed to
microcontroller through data lines.
By using the microcontroller process the data and send it to LCD in the form of
ASCIIcode.Finally LCD displays the external temperature in the atmosphere.
6.0 CONCLUSION AND FUTURE SCOPE:
CONCLUSION:
This project explains about a simple low cost circuit which can be mainly used in large
scale industries to detect the high temperature and take immediate measures. This circuit
is used to sense the temperature at a place. It indicates the temperature on the LCD with
the help of microcontroller.
This circuit makes use of LM35 which is a 3 pin centigrade temperature sensor IC. It
directly senses the temperature and sends the data to the controller. This has been
successfully completed under the guidance.
FUTURE SCOPE:
7. REFERENCE:
Books:
1. Muhammad Ali Mazidi, The 8051 Microcontroller and Embedded systems, 2nd
Edition.
Websites:
1. www.futurlec.com
2. www.wikipedia.org/ADC 0804/Analog-to-digita.htm
3. http://www.electronicsforu.com/efyhome/cover/home.htm
4. http://en.wikipedia.org/wiki/Diode_bridge#column-one
5. http://www.allaboutcircuits.com/vol_6/chpt_5/index.html
6. http://www.beyondlogic.org/serial/serial.htm#1
7. http://geocities.com/SiliconValley/2072/electron.htm
8. http://www.national.com/opf/LM/LM7805C.html#Datasheet
8. APENDIX:
#include<reg51.h>
void delay(int k)
int l;
while(k)
k--;
LCD_DT = value;
LCD_RS = 0;
LCD_RW = 0;
LCD_CS = 1;
delay(10);
LCD_CS = 0;
delay(10);
LCD_DT = value;
LCD_RS = 1;
LCD_RW = 0;
LCD_CS = 1;
delay(10);
LCD_CS = 0;
delay(10);
void Initialise_Lcd()
command_Lcd(0x38);
delay(10);
command_Lcd(0x01);
delay(10);
command_Lcd(0x0e);
delay(10);
command_Lcd(0x06);
delay(10);
command_Lcd(0x84);
delay(10);
int i;
display_lcd(p[i]);
int adVal;
P1 = 0xff;
READ = 1;
WRITE = 1;
INTR = 1;
WRITE = 0;
delay(2);
WRITE = 1;
while( INTR == 1 );
READ = 0;
adVal = P1;
READ = 1;
return(adVal);
command_Lcd(0x84);
delay(10);
//change this prompt according to your choice Example Temp:--------> Watch//
printl("Temp:");
display_lcd(T3+0x30);
display_lcd(T2+0x30);
display_lcd(T1+0x30);
delay(100);
void main()
Initialise_Lcd();
printl("WEL COME");
delay(3000);
/* command_Lcd(0xC2);
delay(10);
printl("HELLO WORLD");
delay(3000); */
command_Lcd(0x01);
delay(10);
command_Lcd(0x82);
delay(10);
printl("RANJITH REDDY");
command_Lcd(0xC3);
delay(10);
printl("06S41A0437");
delay(3000);
command_Lcd(0x01);
delay(10);
command_Lcd(0x83);
delay(10);
printl("RAVI TEJA");
command_Lcd(0xC3);
delay(10);
printl("06S41A0411");
delay(3000);
command_Lcd(0x01);
delay(10);
command_Lcd(0x82);
delay(10);
printl("HARI KRISHNA");
command_Lcd(0xC3);
delay(10);
printl("06S41A0417");
delay(3000);
command_Lcd(0x01);
delay(10);
command_Lcd(0x84);
delay(10);
printl("SRIDHAR");
command_Lcd(0xC3);
delay(10);
printl("06S41A0445");
delay(3000);
command_Lcd(0x01);
delay(10);
while(1) Process(readadc());}