Vous êtes sur la page 1sur 5

Working of Automatic Fan Speed Control System using PIC16F877A Microcontroller

The electric fan is one of the most essential electric devices of all time due to its benefits like cost
effectiveness, low power consumption, etc. The electrical fan is a basic building block of several
advanced technologies. These are essential devices in computers, large LED lights, the space station,
lasers, petrol and electric automobiles; countless other things. The fan is used in HVAC systems which let
human beings to build huge or underground constructions. It would be tough to visualize a world
without the electric fan!

What is Fan Speed Control System?

Nowadays, the demand of air freshening and temperature control has occupied many of industrial areas
such as automotive, process heat, industrial areas or workplace buildings where the air is controlled in
order to preserve relaxed surroundings for its occupant. One of the most significant concerns occupied
in heat area consists in the preferred temperature achievement and utilization optimization. The
controlling of the Fan can be done manually by pressing the switch. Apart from the usage change the fan
speed manually. The following system will give you an overview of automatic fan speed control system
using PIC16F877A microcontroller.

PIC16F877A Microcontroller

The PIC16F877A microcontroller is the heart of the entire system. It takes the inputs from the LM35
temperature sensor to measure the current room temperature, and then the microcontroller will
respond to control the required fan speed. LCD is used to show the room temperature and fan speed.
The Block diagram of fan speed control system using PIC16F877A Microcontroller is shown below.

PIC16F877A Microcontroller
This microcontroller could be used in controlling the fan speed according to the room temperature. Now
microcontrollers are changing electronic designs. As an alternative to connecting a number of logic gates
jointly to execute some function, we now employ programs to wire the gates electronically.

Regulated Power Supply

Generally, we start with a UPS (unregulated power supply) which ranges from 9v to 12v DC. To make a
5v power supply, a KA8705 voltage regulator IC has been used. This IC is simple to utilize by connecting
the positive terminal form unregulated DC power supply to the i/p pin, connect the negative terminal to
the general pin and then switch on the power, a 5v supply from the o/p pin will be gotten to
microcontroller run.

Regulated Power Supply

LM35 Temperature Sensor

LM35 Temperature Sensor

Brushless DC Motor
Brushless DC Motor

Liquid Crystal Display (LCD)

Liquid Crystal Display (LCD)

Fan Speed Control System using PIC16F877A Circuit

The proposed system gives an overview of how the fan speed is controlled using PIC16F877A
microcontroller, with the change in room temperature. The circuit diagram of the fan speed control
system is shown below.In the following circuit, the PIC16F877A microcontroller is used to control the fan
speed according to the change in room temperature. The LCD is used to measure and display the value
of temperature changes.
The fan speed can be controlled by PWM technique according to the temperature of the room. Analog
signals can be processed by ADC in the microcontroller which converts analog signals to digital signals.
The temperature sensor gives 10mv for every 1°c temperature change; this is analog value and it should
be changed to digital. Change in the temperature will be sent to the microcontroller through pin 2 in the
PORT-A. This microcontroller has inbuilt PWM module which is used for controlling the speed of the fan
by changing the duty cycle.

Fan Speed Control System using PIC16F877A Microcontroller

According to the temperature sensor readings, the duty cycle will be automatically changed for
controlling fan speed. The microcontroller will send the PWM signal through pin-RC2 in port-C to the
transistor which works as a control to the fan. A crystal oscillator is employed in between pin-13 and
pin-14 of PIC16F877A; those are pins if we want to give the exterior clock to the microcontroller. 0.1 μF
bypass capacitor used on the +5 V output pin of the voltage regulator to smooth out the voltage supply
to microcontroller and LCD. The output pin of the temperature sensor is connected to pin-RA2 which is
ADC0 of all the input pins of an ADC. Pin-3 of LCD is connected to GND via 1Kohm resistor to locate the
contrast of the LCD to display the temperature on LCD.

Pins from RB2-RB7 are connected to residual LCD pins used for data & control signals between LCD &
microcontroller. The o/p of the PWM is given to gate terminal of NPN KSP2222A Transistor from
microcontroller. Transistor switches on and off at PWM frequency and stops the voltage across the
motor. When the transistor is on, the motor starts to increase speed and off then motor loses speed.

Thus, this is all about the design and construction of fan speed control system to control the room
temperature using PIC16F877A Microcontroller. Furthermore, the fan speed will boost automatically if
the room temperature is raised. As a conclusion, the system which designed in this work was executed
very well, for any temperature variations and can be categorized as automatic control.