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.

Lookup Tables??? HELP!

Status
Not open for further replies.

chevymn1964

Full Member level 2
Full Member level 2
Joined
Apr 1, 2006
Messages
120
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,296
Location
Santa Rosa, Ca.
Activity points
2,551
Hey all, I found on the web a neat PIC Controlled Themostat... The software was created with an old version of MPLAB. I made one of my own and have been having nothing but problems with the software. I belive the problem is with the lookup table... If anyone dosent mind giving it a look and giving alittle advise would be great! thanks everyone! The project could be found @ h**p://www.technology.niagarac.on.ca/people/mcsele/TemperatureAlarm.htm
 

I built the circuit exact to the schematic... The problem that I'm having it the thing displays the current temp backwards.... Such as -70F when the thermister gets warmer the displayed temp increases... But, when you adjust the pot to read a positive #, and when the thremister gets hotter the displayed temp decreses?!?!?!?!?! The software required many other changes just to get that far...

NOTE: The author of the software states that he wrote the code with an OLD version of MPLAB and probaly need to be revised to work with a newer version of compiler...
 

chevymn1964, did you use recomended NTC thermistor? It needs to have negative thermal coefficient - resistance goes donw with temperature decrease . If used thermistor is PTC - you will have backward effect - more temperature and less output.
author recommend Philips 2322-640-63103 NTC Thermistor. Yet it is not problem to use PTC thermistor - you have lookup table and can calibrate your table towards your thermistor type used, and of course correct the thermistor biasing to get full scale of your adc (yet it also can be done via var resistor of 10 k on schematic providing vref to adc)

have a look to these intro to thermistors :
**broken link removed**
**broken link removed**

Also pay attention to vref voltage stability (connected directly to Vcc) - i dont know if there is digital averaging filter for adc output done in software within pic . But this does not relate to your problem, but accuracy of measurements will be affected.

good luck
 

well, the thermister that I am using is a Thermometrics RL1005-5744-103-D1 10K NTC Thermistor... I also thaught that maybe I was using the wrong type too unless my parts source labled the package wrong.... I'll have to check out Thermometrics web page........ Thanks for the help!
 

pay attention to 10 k resistor for adc biasing - it defines MSB bit as the sign in adc output
 

how did you adjust it ?
 

are you talking about the 10k pot for vref on the adc or the 10k resistor biasing the thermistor?
 

10k pot for vref on the adc
 

well, its strange because when I adjust the pot I can get the correct temp "dialed" in but it is a negative number... when I try to adjust the pot to read a positive temp it gets very sensitive and I cant get it to the right temp... also when I get it close in the positive side the hi/low readings go backwards.... low displays the high and the low displays the high???
 

What you can do - get an ice , put thermoresistor there (isolate it before ) ) adjust trimpod to get 0 degree C then check what goes on after with temperature increase . If things goe not right - dig the source code and correct the problem.
 

I tried all of that and it still displays a negitive number when it gets hotter.... Thats why I think its in the software... I have no idea how the ctable works.... In the software what does it do on the retlw .1+80, retlw .2+80??? I dont know what the +80 is???
 

chevymn1964 said:
Anyboudy else out there have any idea how the lookup table works??

It's simple
copy desired value to working register (w)
call look up table
add pc address with the value in w
(while adding w with pc it will jump to the location corresponding to your previous
working register value)
return with appropriate value from table.
for example:
you have decimal 25 in w register
call table and add pc, the result will be in 25th coloumn of your table
and you can return with the value resides in 25th location of your table in w
suppose the value in 25th location is 0X100, it will return with 0X100 in w.

good luck
 

ok, thanks for the info... Also I'm trying to figure out what the .1+80, .2+80, ect. means in the table...
 

most probably it sets the MSB of the byte to indicate negative number (temperature)
 

chevymn1964 said:
I built the circuit exact to the schematic... The problem that I'm having it the thing displays the current temp backwards.... Such as -70F when the thermister gets warmer the displayed temp increases... But, when you adjust the pot to read a positive #, and when the thremister gets hotter the displayed temp decreses?!?!?!?!?!
When you say it's negative and then increases, do you mean it goes from -70 to -80 for example. If so, that's decreasing. Sounds a lot like the thermistor is not NTC as someone suggested. There is an easy way to tell. Connect a DVM to the 10K that biases the thermister. It should measure about 1/2 the supply voltage. If not, you don't have a 10K thermistor. Now breath on it. If the voltage goes down you have a PTC not NTC. If you have a PTC, just swap the PTC with the 10K and it should work just fine.
Also, if you've interchanged the 10K and thermistor when you built the board, you'll get the effects you're seeing.
Let us know the results of these tests.
 

do you mean voltage decreased at adc input wheb temperature is rising?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top