Automatic Fan Speed using Temperature (LM35) and PIR sensor

Works done? Proud of it? Show off here! Let's see what you've built can help inspire others.

Automatic Fan Speed using Temperature (LM35) and PIR sensor

Postby prembond » Thu Apr 26, 2012 2:09 pm

PROJECT NAME : Automatic Fan Speed using Temperature (LM35) and PIR sensor.
DESIGNER : Premkumar S/O Selamani.

Block diagram.JPG

Block diagram for Project

PROJECT DESCRIPTION:

This project concept can be used for single room where only one person can enter and leave the room. If the person enters the room, the PIR sensor placed beside the door will detect and send signal to microcontroller 8051. PIR sensor signal will ON the fan and operates at automatic speed level selected by microcontroller logic operation based on temperature detected using LM35 temp sensor. 5V DC Relay is used for fan speed switching. LCD display will display the fan speed level and temp value. When the person going out of room, the PIR sensor will detect again and this time the fan will OFF and LCD display will display "FAN OFF".

Schematic diagram.JPG

Schematic diagram for Project

Fan speed  vs temp value.JPG



EQUIPMENTS/COMPONENTS USED:

PIR Sensor, Temperature sensor LM35, Analog to Digital Converter 0804, Microcontroller 8051 Project Board, LCD Display Module, 12'' AC table fan, 5V DC SPDT Relay, ULN2803 Relay Driver, few resistors and capacitors.

PROGRAMMING LANGUAGE : 8051 Assembly language

PROGRAMMING METHODS USED:

1. External hardware interrupt function for PIR sensor output monitoring.
2. Analog to digital conversion program to convert analog temp values detected by LM35 to digital for Microcontroller logic operation.
3. Subtraction using compare instruction method for fan speed switching program.
4. Decimal to ASCII conversion to display fan speed level and temp values in LCD display.
Attachments
Pictures of all circuits in project.rar
(894.96 KiB) Downloaded 582 times
Source code and other details.rar
(1010.51 KiB) Downloaded 589 times
prembond
Newbie
 
Posts: 10
Joined: Thu Sep 15, 2011 3:06 pm

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby ABSF » Sat Apr 28, 2012 6:57 am

I like 8051 and have some ADC0808 & ULN2003 leftover from my previous project. After seeing the circuit I'd like to try it out first on my simulator. I read the source code and was unable to print or copy/paste it onto the 8051 assembler. Would you please unprotect it so we here can try out the project? Or you are making commercial products from this design then just ignore what I'd said...

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby prembond » Sat Apr 28, 2012 5:20 pm

Hi allen, i really appreciate your interest in trying my project. For your information, my project is not really hard if you understand 8051 and basic electrical and electronics. I am so sorry to say that i will not allow anybody to use/copy my programs. You may try to understand my program and then create your own assembly program because different people can do different style of programming. I want to encourage you to do it on your own, so that you can enjoy programming.

Another thing i would like to remind you that i used AC Table fan instead of DC fan because playing with AC is more challenging. My project's control circuit which includes microcontroller is DC but Output is AC(table fan). My project is in concept DC controlling AC device. I would like to know what is your education level?, are you engineering student?, if yes what engineering course? maybe we can be friends.

Good luck and sorry again.
prembond
Newbie
 
Posts: 10
Joined: Thu Sep 15, 2011 3:06 pm

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby ganicus » Tue May 08, 2012 6:19 am

Hi,

I am trying to do something like your project. Here is the idea.

I want to control the hot air blower which will in effect increase the temperature of surrounding small area. And a temperature sensor which will monitor
the temperature and depending on that the hot air blower should reduce the flow of hot air.

Can you help me in this project. I have no idea where to start. I am computer science major, not much background in this stuff.

Thanks
ganicus
Greenhorn
 
Posts: 2
Joined: Tue May 08, 2012 6:02 am

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby ABSF » Tue May 08, 2012 9:39 am

ganicus WROTE: I have no idea where to start. I am computer science major, not much background in this stuff.


Does computer science students know how to solder and microcontroller hardwares? I thought they are mostly programmers working on PC or mainframe platforms.

In that case you'd really have a lot to fun learning microcontroller if you treat it as a hobby like me. The project presented in this post used the INTEL 8051 uC and was programmed in assembly language. Of course you may use C and I know there was one for 8051 family if you visit www.8052.com and I supposed it was free.

Or you can use PIC 16F877A as a start and it has assembler, C compiler and a nice IDE called MPLAB which are all free. With your computer science background, it shouldnt be too difficult for you to pick up the language. There are plenty of App Notes on microchip website too.... Sorry I may be drifted too far....

As for your project, you may follow the example on this project or buy the cytron PR11 here

PR11 - Temperature Control System Using LM35
http://www.cytron.com.my/viewProduct.ph ... 8s=&store=

In this project the software sample and hardware schematics are all there in the useful documents and you can change the PC fan to something that runs faster or more powerful with proper interfacing.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby Brian Griffin » Tue May 08, 2012 9:59 am

There are quite a number of comp.sci majors who can program microcontrollers very well.

To learn some electronic fundamentals, you are advised to read the Floyd's "Electric Circuit Fundamentals". Read from the simpler V=IR to the op-amps.

You can start with Arduino or by the hard way. All can be experimented.
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby prembond » Thu May 10, 2012 12:29 pm

hi ganicus, im glad to see you interested in learning microcontroller. Hmm...currently i am pursuing diploma in electrical engineering. I would like to know that you got learn any microcontroller subject or not?. It will be easier for me to guide you if you know microcontroller programming.
prembond
Newbie
 
Posts: 10
Joined: Thu Sep 15, 2011 3:06 pm

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby takao21203 » Thu May 10, 2012 6:36 pm

Admireable design/piece of work.

If it is relieable, well could be used for industrial application, were circuit size/cost is not so much a matter (in relation to the system cost of the installation).

For application where the space does not exist, or where this solution would be far more expensive than the system itself, single chip controller could be used.
User avatar
takao21203
Discoverer
 
Posts: 111
Joined: Mon Mar 19, 2012 7:52 pm
Location: Ireland, Europe

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby ABSF » Thu May 10, 2012 9:38 pm

takao21203 WROTE:For application where the space does not exist, or where this solution would be far more expensive than the system itself, single chip controller could be used.


Yes, I agree. This project is good for learning 8051 assembly lang. and demo purpose. For practical use and compactness, one could redesign it using a 16f886 or 16f876A which would save the cost of ADC and using 3 transistors for the ULN2803. This will reduce the board size as 8051 doesnt have ADC built-in and is a 40 pin DIP.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: Automatic Fan Speed using Temperature (LM35) and PIR sen

Postby takao21203 » Sat May 26, 2012 3:58 am

Well it could be used like that for industrial installation, maybe the board has multi-purpose not just specialized for fan control.
Seems to be a prototype however.

Sometimes maintainability is important, or if you still can use it somehow, when it is partially broken, and spare parts are not available immediately.
User avatar
takao21203
Discoverer
 
Posts: 111
Joined: Mon Mar 19, 2012 7:52 pm
Location: Ireland, Europe

Next

Return to Project Showcase

Who is online

Users browsing this forum: No registered users and 4 guests