Previous in Forum: Reinstatement of Motors   Next in Forum: Why the Latching Current of SCR is Greater Than Holding Current
Close
Close
Close
3 comments
Active Contributor

Join Date: Feb 2010
Location: cochin,kerala
Posts: 18

Converting an ADC Value to Equivalent Temperature?

10/07/2013 12:39 AM

I'm working on a humidity controller which also controls the temperature inside a chamber.I'm done with the hardware (though i'm not the one behind the design)and which was originally designed with a 12 bit external ADC and an 89s52 uc and I replaced both with PIC 16F877A uc and I use the 10 bit internal ADC.

Other hardware details are (I can provide the schematic though it seems cumbersome).

  • temperature sensor -PT100
  • humidity sensor - SY-HS-220 (datasheet)
  • +Vref for ADC - 1.235V and -vref =0;

I roughly checked the voltage across the 2 ADC channels by replacing the sensors with a 500 ohm pot (not concerned about the errors at this point) and got the following figures

proposed temp | voltage @ ADC

  1. 5 oC--------------1.650v
  2. 6 oC--------------1.660v
  3. 80 oC-------------2.480v

proposed humidity | voltage @ ADC

  1. 30% (990mV)--------0.098V
  2. 31% (1023mV)-------0.101V
  3. 32% (1056mV)-------0.104V
  4. 33% (1089mV)-------0.107V
  5. 34% (1122mV)-------0.110V
  6. 40% (1300mV)-------0.128V
  7. 90% (2970mV)-------0.29VI want to use this hardware for the following requirements
    • Temp. measurement - 5-80 oC, 0.5 oC resolution
    • Relative Humidity - 30-90%, 1% resolution

And my concerns are

  1. Should I have to change the reference voltage to 2.5V as I can see the maximum voltage to be measured is 2.48? Or that voltage is out of a mistake since the original hardware is designed with 1.235V
    • is the voltage at the ADC in(of temp sensor) adjustable so as to make it within 1.235V (so I think better performance) by some minor hardware changes (like changing a resistance value to change gain of amp)
  2. are my requirements achievable with a single ADC configuration as I'm concerned about the rough figures I got (ADC input values for temp and humidity are not comparable or that too a mistake?) ?
    • for the temperature I could measure only with 1 oC in steps as the RTD chart (For European Curve, Alpha = .00385, ITS-90)was provided with 1 oC increments. To measure 0.5 oC resolution is it OK if I divide the change in voltage for 1 oC increment by 2 (assuming the curve is linear, or not!?)
  3. How to decide efficiently the sampling time of ADC (considering the facts that the sensors respond slowly, transient voltage fluctuations in the line etc.)
  4. Finally how ADC values are converted to equivalent process values.? (Excuse me if the title of question matches here only)
    • By a table look up? (in my case 150 values(for temp) + 60 values(Rel humidity) ) or can I use some calculation ? (if yes, how to get a linear relationship between the ADC values and process values) .which method is efficient in terms of accuracy?
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain. Kettle's on.
Posts: 31825
Good Answers: 834
#1

Re: Converting an ADC value to equivalent Temperature?

10/07/2013 6:38 AM

What is the slew rate on the humidity in response to a 100% step change in the Setpoint?

What is the slew rate on the temperature in response to a 100% step change in the setpoint?

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Register to Reply
Guru
Hobbies - Musician - Engineering Fields - Chemical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Instrumentation Engineering - New Member

Join Date: Jan 2007
Location: Moses Lake, WA, USA, Thulcandra - The Silent Planet (C.S. Lewis)
Posts: 4216
Good Answers: 194
#2

Re: Converting an ADC value to equivalent Temperature?

10/07/2013 8:01 AM

It will all have to be done in code, either a higher-level language like PIC Basic or something like Flowcode or the assembly code that comes with Microchip's MPLAB programming interface program. What are you using to program the PIC?

Math and timing functions!

Your sketch didn't show up. What type file did you upload?

__________________
"Reason is not automatic. Those who deny it cannot be conquered by it. Do not count on them. Leave them alone." - Ayn Rand
Register to Reply
Active Contributor

Join Date: Feb 2010
Location: cochin,kerala
Posts: 18
#3
In reply to #2

Re: Converting an ADC value to equivalent Temperature?

10/07/2013 8:15 AM

I'm using Hi-tech c compiler.

I uploaded a jpg image. I could see the pic when I clicked on the link. I don't know why its not working on your side.

Register to Reply
Register to Reply 3 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Copy to Clipboard

Users who posted comments:

Mikerho (1); PWSlack (1); raf23 (1)

Previous in Forum: Reinstatement of Motors   Next in Forum: Why the Latching Current of SCR is Greater Than Holding Current

Advertisement