Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8051 Project | Temperature Control System using LM35

Status
Not open for further replies.

d3ck

Newbie level 6
Joined
Aug 14, 2011
Messages
13
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,375
Hye,
In doing 8051 project Temperature Control System using LM35 in ASM
I already try to draw schematic by using Proteus and write some ASM by referring to books and website
Please help me check the connection and code that i try
Both file in attachment

View attachment Code.rar
View attachment Schematic.PDF

My project requirement :
  • Temperature sensor able to sense environment temperature
  • DC fan will spin according to current temperature, Low, Medium, High
  • LCD to display current temperature and fan speed
  • User able to control fan speed using push putton

Note about schematic :
  • I should use TIP102 for interfacing to DC Fan but since Proteus didn't have TIP102 in library then i use #2 TIP122 to replace it.
  • SW1 is toggle button to control ON/OFF circuit

THIS IS NONE WORKING PROJECT, I ALREADY TRY IT USING PROTEUS
I need help to complete this
Thank you so much
 

I think you should connect LM35 directly to the ADC or through unity gain buffer.
In this case, the voltage fed to the ADC doesnt reflect exact temperature shown by LM35.
 
  • Like
Reactions: d3ck

    d3ck

    Points: 2
    Helpful Answer Positive Rating
you dont need any buffer or amplifier for LM35 and ADC... there are many post already about this project in this forum... you can search for that LM35 and 8051 in this forum.......
 
  • Like
Reactions: d3ck

    d3ck

    Points: 2
    Helpful Answer Positive Rating
Hi,

I dont see any clock generating circuit associated with ADC.. usually we use 555 timer IC to generate clock to ADC IC..

---------- Post added at 21:47 ---------- Previous post was at 21:23 ----------

**broken link removed**
**broken link removed**
 
  • Like
Reactions: d3ck

    d3ck

    Points: 2
    Helpful Answer Positive Rating
I dont see any clock generating circuit associated with ADC.. usually we use 555 timer IC to generate clock to ADC IC
Apparently, the circuit wants to use the internal clock oscillator, but there's a drawing error in the schematic. R7 has to be connected to CLKR.

Also the LM35 output isn't connected to the ADC.
 
I just do some rev to the circuit, it is ok now ?
 

Attachments

  • DesignSource-1.PDF
    48.2 KB · Views: 240

The said issues are resolved now. You possibly would want to reduce Vref of the ADC to increase the resolution according to the temperature range. E.g. supply Vref/2 of 0.5V for a 0 to 100°C range. Vref/2 should have a bypass capacitor and LM35 connected to Vin+ through a RC filter for lowest noise, refer to the ADC80x datasheet suggestions.
 
  • Like
Reactions: d3ck

    d3ck

    Points: 2
    Helpful Answer Positive Rating
So i've done the schematic part, how about coding part ?
 
Sorry i cant get what u mean ckshivaram, i already check both link, and still cant get what u mean
 

Oh my, i didn't learn C programming yet
But nvrmd, will ask someone who know C and try to convert to ASM and post it here
Thanks ckshivaram
 

I need in ASM, i never learn C yet
And this is sample code that my group mate try to write
 

Can anyone convert this to ASM 8051,
#include<reg52.h>

#define input P1

sbit output = P3^1;

sbitwr= P3^3;
sbitrd= P3^4;
sbitintr= P3^5;

voidpwm(int i);

void delay(unsigned int n )
{
int i ,j ;
for(i=0;i<n;i++)
for(j=0; j<350; j++);
}


void main()
{
int temp
Input =0xff;
wr=0;

rd=0;
intr=1;

while(1)
{
rd=1;
wr=0;
delay(2);
wr=1;
while(intr==1);
rd=0;
temp=input;
intr=1;



if(temp>0&&temp<10)
{
while(temp >0&&temp <10)
outs=0;
}

else if(temp>15&&temp<30)

{ while(temp >10&&temp <30)
pwm(5);
}
else
{
while(temp >30)
pwm(10);
}
}
}


voidpwm(int i)

{
intj,k;
outs=1;
for(j=0;j<i;j++)
delay(5);
k=10-i;
outs=0;
for(j=0;j<k;j++)
delay(5);
}
 

d3ck,

Here's a link to an assembly language program similar to your listing above:

Temperature of surrounding is sensed by temperature sensor and it send it's o/p as DC voltage to Analog to digital Converter 0808 through which we give 8 bit value of that voltage to microcontrller 8051.After it's processing it is displayed in LCD ...

**broken link removed**

The design incorporates an 8051, ADC0808, LCD and LM35, so you should be able to adapt it to your design.

BigDog
 
  • Like
Reactions: d3ck

    d3ck

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top