Temperature controlled fan with remote control

DESCRIPTION

This project aims to achieve the purpose of efficient energy usage by providing an effective method of fan speed control as a function of instantaneous ambient temperature. Infra red remote control allows for manual override of the control fan speed. Users can use the remote to select any fan speed they desire.

Order Now

ABSTRACT

 

The world is developing everyday in every area of life. In the field of science and technology, the level of development grows at a fast and exponential rate. Most of this development mainly drives innovation; the desire to make things run better and more efficiently. In recent times, there has been need for technological device manufacturers to design and manufacture devices or products that consume lesser energy and also run more efficiently.

The project discussed here aims to achieve this purpose of efficient energy usage by providing an effective method of fan speed control as a function of instantaneous ambient temperature. There is absolutely no need of operating a fan at its maximum speed when the room temperature is low (200C). This not only wastes energy, but can inflict cold on anyone in the room. The project achieves this regulation by continuously monitoring the room ambient temperature and automatically adjusting the fan speed accordingly. The project incorporates a microcontroller as well as other devices including an Analog to digital converter, infra red remote control and TRIAC.

 

MODE OF OPERATION

temperature-controlled-fan-with-remote-control-block-diagram-main-unit

Block diagram of the main unit of the temperature controlled fan with remote control project

 

The listed modules in the above block diagram will be explained in sequence. In the course of the explanation of the modules, the mode of operation of the hardware will be fully understood. The circuit diagrams of the main hardware and remote are shown below.

 

circuit-diagram-of-the-temperature-controlled-fan-with-remote-control-block-diagram-main-unit

Circuit diagram of the main unit of the temperature controlled fan with remote control project

 

circuit-diagram-of-the-remote-controller-of-the-temperature-controlled-fan-with-remote-control-block-diagram-main-unit

Circuit diagram of the remote controller of the temperature controlled fan with remote control project

POWER SUPPLY

The power supply module is responsible for supplying the right power to every part of the circuitry. To understand the operation of the power supply circuit, please refer to the circuit diagram shown below:

power-supply-temperature-controlled-fan-with-remote-control

Power supply circuit diagram of the temperature controlled fan with remote control project

From the power supply circuit diagram, AC power from the public main enters the circuit through step-down transformer TR1. Transformer T1 is a center-tapped transformer rated 12V-0-12V, 1000mA. The 12V output from T1 which is still in alternating current form is fed through a bridge rectifier network comprising of diodes D1 – D4. The output from the rectifiers is a Direct Current voltage full of ripple that is at twice the public main voltage frequency. Capacitor C1 acts as a filter capacitor. It gets rid of the ripple present in the rectified AC voltage through a process known as filtering. Voltage regulator U1 regulates the filtered voltage to 5V which is used to power the Microcontroller, ADC, LM35, Infra-red Module and CD4017 Counter. Capacitor C2 further filters any ripple from the regulated DC voltage and also suppresses any voltage spike from any of the components being powered by the supply.

 

ANALOG TO DIGITAL CONVERTER (ADC)

Computer systems cannot work with analogue signals directly, hence the need for conversion of analog signals to digital digital data. Another reason for converting analogue signal to digital data can be seen in the imperfect nature of analogue systems, in that the output signals is never an exact replica of that which entered the systems. Also, digital systems are known to achieve a sufficient degree of freedom from error during operation. Hence, digital systems have been found to be more efficient, reliable, and more accurate or exact than their analogue counterparts. The project involves the control of a fan’s speed based on the value of an analogue parameter, which in this case is temperature. The ADC helps interface properly this analogue value of temperature to the digital system of the microcontroller. This allows for more flexibility in the processing and control signal output.

 

SEVEN SEGMENT DISPLAY

The project outputs information to the user such as temperature, fan power level, timer countdown and option menu. To accomplish this purpose, four seven-segment displays are used. Display of information of all four displays simultaneously is achieved through the process of multiplexing. Multiplexing allows fewer microcontroller port pins to be used as connecting all displays segments individually is not practical because of the excess pin connections required.

 

LM35 TEMPERATURE SENSOR

The LM35 temperature sensor integrated circuit is responsible for accurate detection of ambient temperature levels in the project. Some of the features of the LM35 chip are as follows:

  • It is calibrated directly in degree Celsius.
  • It has a linear scale factor of + 10.0mV/0C
  • It has a guaranteed accuracy of about 0.50C (at +250C)
  • It is rated to operate within a –550C to 1500C temperature range.
  • It is suitable for remote applications
  • It can operate from 4 to 30 volts
  • It draws only about 60uA of current from its supply.
  • It has low impedance output of 0.1Ohm for a 1mA load

 

INFRARED RECEIVER MODULE

The infrared receiver module functions as a control interface between the remote control device and the main hardware device. The infrared receiver module used in the project is the TFMS5360. This device has a strict characteristic of the received infrared signal it can detect. First, it can only respond to infrared signals of 36 KHz, secondly, the infrared signal must not be shorter than 10 cycles or longer than 70cycles. This allows the device avoid detection of spurious infrared signals as much as possible. The use of an infrared control method requires that a certain protocol for communication be used. There are some protocols available such as the SONY SIRC, NEC, Phillips IRC, etc. These protocols ensure that every devices responds only when its programmed protocol is detected. For the project, a custom protocol was used. This protocol, though simple, yet highly effective.

 

PIC16F84A MICROCONTROLLER

The project boasts of being powered by a microcontroller. The microcontroller of choice for the project is no other but the low-cost PIC16F84A microcontroller developed by microchip. Below are the features of this chip

  • High-performance RISC CPU.
  • Only 35 instructions to learn.
  • All instructions single-cycle except branches.
  • DC to 20MHz operating speed.
  • Interrupt capability.
  • 8-level deep hardware stack.
  • Direct, indirect and relative addressing modes.
  • Power-saving sleep mode.
  • 1.75K bytes (1024 x 14-bit words) of Flash program memory.
  • 68 bytes of SRAM data memory.
  • 64 bytes of EEPROM data memory.
  • 13 I/O pins with individual direction control.
  • High current 25mA source/sink for direct LED drive.
  • 8-bit timer/counter.
  • In-circuit serial programming (ICSP) via two pins.
  • 5V operation.
  • Operating temperature range of-40°C to +85°C.
  • 18-pin DIP package.

 

The PIC microcontroller functions as a temperature monitoring device, display processor, infrared receiver module decoder and AC power level controller. It coordinates and controls the signals that are used by other circuit components in the unit. The actions of the PIC is carried out based on the assemble language program that has been stored into its program memory. It has been designed to perform the following functions: It receives analog signal from the temperature to voltage converter through the ADC module. The signals are the processed into decimal figures which are displayed on the seven segment display as a temperature value. It controls the action of the seven segment display by selecting the various segments and passing out individual data one at a time using time division multiplexing, also protocol decoding of the infrared control signal from the receiver module are decoded in real time. AC power control through phase control is achieved with the microcontroller.

 

OPTO TRIAC AC CONTROL SWITCH

This module is comprised of two main components: the MOC3022 OPTO-TRIAC pre-driver and the BT136 Power TRIAC. The MOC3022 provides an isolated control interface between the microcontroller and the BT136 power TRIAC. These two devices allow the microcontroller running on a minimal voltage level of 5V to control the fan load running on a high voltage level of 240V. With this arrangement, linear power control can be achieved through AC phase control. Thus by controlling the amount of power reaching the fan, the speed of rotation of the fan is effectively controlled as well.

 

ZERO-CROSSING DETECTOR

The zero-crossing detector module performs the main function utilized in AC power phase control. The zero-crossing detector tells the microcontroller exactly when the AC power waveform crosses the zero point. This is necessary since AC power phase control is performed on per phase basis. In the project, the zero-crossing detector produces a pulse at every zero crossing. This pulse is fed to the microcontroller. This allows the microcontroller decide on which point (Phase angle) of the AC power to trigger the TRIAC, Thus controlling the power level reaching the fan load.

 

THE REMOTE CONTROL HARDWARE

This can be described as the mobile unit of the project. The remote control was designed to be small, portable and handy. Below is the block diagram of the remote controller.

block-diagram-of-the-remote-control-of-the-temperature-controlled-fan-with-remote-control-block-diagram-main-unit

Block diagram of the remote controller

 

From the above block diagram, the main components of the remote controller used in the project are shown. These include:

VOLTAGE REGULATOR

The voltage regulator maintains the voltage level used to power the circuit of the remote control. An LM7805 fixed voltage regulator integrated circuit mans this section. The remote control is powered off a 9 volts battery. Connecting this directly will cause damage to the circuitry of the remote control. Thus the voltage regulator helps bring down the voltage to 5 volts which is within the recommended voltage limits of the components in the remote control circuit.

 

PUSH BUTTON INPUTS

The push buttons are the inputs of the remote controller. There are just three push buttons in the design; S1 (Up), S2 (Down) and S3 (OK). Each of the push buttons is connected to certain I/O (input / Output) pins of the microcontroller. This helps to tell the microcontroller exactly which button was pressed.

 

MICROCONTROLLER (PIC16F84A)

A microcontroller is used in the remote control for the purpose of stability and circuit simplicity. The microcontroller is responsible for generating the necessary signal pulses used to implement the communication protocol adapted for the project. Also, since the microcontroller is clocked from a crystal oscillator, the timing of the pulses generated by microcontroller is stable and precise. Stability and precision in the pulses are paramount because the infrared receiver module on the main hardware requires that infrared signals of 38 kHz be transmitted. The microcontroller scans the push buttons at a regular interval. Once a button is pressed by the user, the microcontroller detects the button that was pressed and then sends a unique code pattern identifying the particular key pressed, to the infrared light emitting diode for transmission.

 

INFRA RED LIGHT EMITTING DIODE

The infrared light emitting diode is the transmitting component of the remote controller. This component outputs infrared light when current flows through it. The pulse code sequence generated by the microcontroller for any push button pressed is fed to the infrared light emitting diode, which in turn sends it out as a series of pulsed infrared beams.

 

INFRA RED CONTROL PROTOCOL

For any remote control setup using wireless control principles, there is always a control protocol used to identify when individual keys of the remote control have been pressed. The project remote control is not an exception. A protocol was devised to allow for easy recognition of button pressed at the receiver end. Every of the three push buttons (S1 (Up), S2 (Down), S3 (OK)) when pressed, has a corresponding unique pulse code sequence generated by the microcontroller and transmitted by the infrared light emitting diode. Below is an illustration of this protocol.

remote-control-protocol-of-the-temperature-controlled-fan-with-remote-control-block-diagram-main-unit

Remote control transmission protocol of the project

The transmission protocol shown is used to encode, transmit and identify each key pressed on the remote controller. The first signal burst (Burst 1) is comprised of fifteen cycles of 38 kHz pulses. The bursts are encoded this was to enable easy reception by the infrared receiver module on the main hardware. After burst 1 has been transmitted, there is a delay; this is the button delay identifier. It is used to identify each of the buttons. After this delay, the second burst is transmitted. The microcontroller then waits for a fixed delay time of fifty (50) milliseconds before transmitting the final burst. This is the valid signal identifier used to tell the receiver that the signal received is that from the remote controller.

The button delay identifier is different with every key. The delay is assigned to each key as follows:

  • S1 (Up) ——————–327 microseconds
  • S2 (Down)—————–567 microseconds
  • S3 (OK)——————–780 microseconds

The microcontroller precisely produces these timings due to the 8 MHz crystal used as its clock.

 

SUMMARY OF OPERATION

Please refer to the circuit diagram for this explanation.

Power enters into the circuit through step-down transformer TR1. This transformer steps down the 220volts AC public mains supply to 12 volts AC. The resulting 12volt AC is passed through a diode bridge rectifier network formed by diodes D1 – D4. The rectified voltage is filtered by electrolytic capacitor C1. This filtered voltage is fed into integrated circuit U1 (LM7805). This IC is a fixed voltage regulator and outputs a regulated 5volts power which is further filtered by C2 and used to power the other circuit components of the project. Once power has been established, the rest of the circuit kicks into operation.

Ambient temperature is sensed accurately by U2 (LM35). This integrated circuit chip is an analog temperature chip capable of sensing temperatures within the range of -55oC to 150oC. Its output is 10mV for 1oC. Thus for a room temperature of 25oC, the output of the LM35 IC will be 250mV 0r 0.25V. If noticed, the output of the LM35 is in analogue form and needs to be converted to digital format to enable further processing flexibility. U4 (ADC0804CN) is an 8-bit successive approximation register (SAR) type analogue to digital (ADC) converter. U4 has been configured to function in free-running mode. In this mode, any analog input voltage to the ADC is immediately converted to its 8-bit digital equivalent and made available on the data pins of the ADC. Resistor R4 and capacitor C4 set the frequency of conversion of the ADC. Resistors R2 and R3 form a potential divider used to set the reference voltage of the ADC. Finally, capacitor C3, resistor R1 and NPN transistor Q1 enable a power-on Kick start required to initialize the ADC in free-running mode. The data outputs of the ADC are directly connected to the microcontroller U5 (PIC16F84A) through current limiting resistors formed by R7 through R14. The microcontroller U5, is an 8-bit microcontroller which performs the following functions:

  • Reading temperature data from the ADC and displaying it appropriately on the “multiplexed” common cathode seven-segment displays (DISP1).
  • Decoding the infrared data signals received by the infrared receiver module U2 (TFMS5360) and also performing the appropriate function required of received and decoded data.
  • Mains Voltage zero-crossing detection to allow precise switching and controlled AC phase power control of the BT136 (Q5) TRIAC through optocoupler TRIAC predriver.
  • Seven-segment display multiplexing through Johnson-counter U6 (CD4017).

 

The microcontroller U5 has 13 input/output (IO) pins grouped into PORT A and PORT B. all port pins are used. PORT B has 8 pins while PORT A has 5 pins. The whole of PORT B pins (RB0 – RB7) are connected to the ADC to read temperature data, and also connected to the seven-segment displays to output display information or data. PORT A pins (RA0 – RA4) are used for the following:

  • RA0 and RA1: clock and reset connections to allow individual addressing of the each of the three seven-segment displays through U6 (CD4017)
  • RA2: Connected to the output of the infrared receiver module U2, to allow data decoding of infrared signal data from the remote transmitter.
  • RA3: Precise switching and phase power control through U7 (MOC3022)
  • RA4: Zero Crossing Detection for appropriate phase power control.

Multiplexing is a method of individually accessing multiple devices through a single control source or channel. For instance, through multiplexing, the microcontroller is able to display information on the three seven segment displays through a single data output connection on the PORT B pins. To do this, the microcontroller accesses each of the display one at a time at a fast and precise rate that all three seven segment displays appear to be showing information at the same time.

 

 

 

I am an Electical and Electronics Engineer / web designer and developer based in Nigeria. ProjectGICS was conceived out of my passion for Electronic Circuits and anything Computer related. I believe there are many out there that share this passion and would love to take it to greater heights. ProjectGICS is dedicated to students, designers and hobbyists in the field of Electronics and Computer who are eager to learn electronics and computer designs. ProjectGICS is all about circuit designs, programming and construction of things that can be fun, lucrative and can help solve a problem. The Electronic Components and Kits Store allows you shop items for your projects; Allowing you bring your project ideas to life without limitations. I can't wait to hear from you on the successes you have achieved through ProjectGICS.

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*