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.

How to connect j type thermocouple to 8051 via ADC0808

Status
Not open for further replies.

smitgovani

Member level 2
Member level 2
Joined
Dec 25, 2011
Messages
50
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,641
i want to connect j type thermocouple to 8051 via adc0808....how can i connect it and what changes should i have to do???
 

Re: thermocouple to 8051

i want to connect j type thermocouple to 8051 via adc0808....how can i connect it and what changes should i have to do???

There are some threads dealing with the 8051<-->ADC0808 issue ..
Here is an example:
https://www.edaboard.com/threads/81484/

To connect a thermocouple you will need an extra interface, something similar to the attached circuit ..

:wink:
IanP
 

Attachments

  • Thermocouple interface.png
    Thermocouple interface.png
    9.2 KB · Views: 327
Re: thermocouple to 8051

why i need this extra interface????
can't i directly connect it to adc0808??
 

Re: thermocouple to 8051

why i need this extra interface????
can't i directly connect it to adc0808??

Physically you can, but have you thought about resolution?
J-Thermocouple gives you roughly 5uV per degC ...

:wink:
IanP
 

Re: thermocouple to 8051

this is my code for data aquision...daq Circuit.PNG

#include <reg51.h>
sbit start=P3^3;
sbit end=P3^4;
sbit oe=P3^5;
sbit ale=P3^6;
sbit clock=P3^2;
sbit relay1=P1^3;
sbit relay2=P1^4;
sbit relay3=P1^5;
sbit relay4=P1^6;
unsigned char temp;
unsigned char aray[]={'0','1','2','3','4','5','6','7','8','9'};
void delay()
{
int k,l;
for(k=0;k<40;k++)
for(l=0;l<80;l++);
}
void initSerial()
{
TMOD=0x22;
TH1=0xFD;
SCON=0x50;
TR1=1;
EA=1;
ES=1;
}
void usDelay(int a)
{
TH0=256-(a/1.085);
TR0=1;
ET0=1;
}
void timerRoutine() interrupt 1
{
clock=~clock;
}
void sendChar(unsigned char ch)
{
SBUF=ch;
while(!TI);
TI=0;
}
void serialRoutine() interrupt 4
{
if(RI==1)
{
temp=SBUF;
switch(temp)
{
case('a'):
relay1=1;
break;
case('b'):
relay1=0;
break;
case('c'):
relay2=1;
break;
case('d'):
relay2=0;
break;
case('e'):
relay3=1;
break;
case('f'):
relay3=0;
break;
case('g'):
relay4=1;
break;
case('h'):
relay4=0;
}
RI=0;
}
}
void sendReading(unsigned char val)
{
unsigned char l,m;
l=val%10;
m=(val/10)%10;
sendChar(aray[m]);
sendChar(aray[l]);
sendChar(',');
}
void latch()
{
ale=0;
delay();
ale=1;
}
void startConv()
{
delay();
start=0;
delay();
start=1;
}
void wait()
{
while(end==1);
}
void get()
{
delay();
oe=0;
delay();
oe=1;
}
void main()
{

unsigned char sensor=0,reading;
P1=0;
initSerial();
usDelay(50);
while(1)
{
if(sensor==8)
sensor=0;
if(sensor==0)
sendChar('N');
P1=(P1&0xf8)+sensor;
latch();
startConv();
wait();
get();
reading=P2;
sendReading(reading);
sensor++;
}
}

i want to use j type thermocouple instead of lm35
then what changes i should make in circuit and code...
circuit changes as u said but code??
and

i thermocouple temperature ranges in 3 digits temperature
so i need to send 3 digits to max232
void sendReading(unsigned char val)
{
unsigned char l,m;
l=val%10;
m=(val/10)%10;
sendChar(aray[m]);
sendChar(aray[l]);
sendChar(',');
}
then what change should i make??
 
please give me component list for extra interfacing circuit it cant be read from the circuit please
 
  • Like
Reactions: wendmu

    wendmu

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top