Discussion forum for the BasicX family of microcontroller chips.
|
Some capacitors can have some pretty bad TC's, and they won't track very well. If that's the culprit you could make a little oven to keep more or less constant temperature. Put the capacitors together with a 1K resistor connected across your power supply and sandwich them with a couple of pieces of styrofoam. Once you've determinded if that's the cause you can pot them in epoxy. -Ramon >However, when I put the transmitter outside at around 40F, the temps >are reported accurately for an hour or so, then they start drifting >off in different directions. |
|
I have built a temperature reporting transmitter that sits next to my BBQ and reports up to four temperatures via RF to a receiver that sits in the house. This transmitter uses the RCTime function to get the resistance, then translates that resistance to a temperature. The circuit and the formulae are borrowed from Peter Anderson, and they are the same circuit and formulae as can be found in the App Note "Measuring Resistance using RCTime." If the transmitter circuitry is at room temperature, it reports all temperatures very precisely. I calibrated the thermistors at 35F and 212F, and they tracked very precisely to another, very accurate thermometer I own. However, when I put the transmitter outside at around 40F, the temps are reported accurately for an hour or so, then they start drifting off in different directions. One thermistor reports 55F, one reports 60F, etc. If I then do nothing but bring the transmitter back inside the house and allow the thermistors to report ambient temperature, after about an hour or so, the temperatures start to get back in line, and after two hours, they are back to normal again. (I can also stick all thermistors in a water bath at about 35F, and they will report flaky temps for an hour or two, and then correct.) It _sounds_ like the RCTime circuitry doesn't like cold ambient temperatures. I need to be able to transmit BBQ temps in cold ambient temps because the whole purpose of this contraption is to report temps to the receiver (which will sit next to my bed and alarm over and under temp conditions) when I do my overnight smoking. Any ideas? TIA grant |
|
|
|
> Any ideas? I suggest that you replace the thermistors with fixed resistors and run through the same sequence you did with the thermistors - even faux calibration - to find the thing or things that change with temperature other than the thermistors. I had a project years ago that had a hidden cold solder joint; I was ready to scrap a simple design that baffled me for a week. I've also encountered a noisy resistor. Also consider trying another processor to see if the sensitivity is on it - a sensitive crystal loading cap, for instance, changes all timing. Tom Becker --... ...-- The RighTime Clock Company, Inc. Cape Coral, Florida USA www.RighTime.com |
|
> ... 212F... I didn't pay attention to the range. If all you need is 100C (in a BBQ?), you can avoid the timing issue by using LM34-family temperature sensors. They're accurate, cheap and easy to interface. Tom Becker --... ...-- The RighTime Clock Company, Inc. Cape Coral, Florida USA www.RighTime.com |
|
Grant, I'd be tempted to try measuring the thermister temperature by supplying it with a conatsnt current ( or from a high value resistor) and using the ADC function to measure the resistance and hence the temperature. neil Grant Baxter wrote: > I have built a temperature reporting transmitter that sits next to my > BBQ and reports up to four temperatures via RF to a receiver that sits > > in the house. This transmitter uses the RCTime function to get the > resistance, then translates that resistance to a temperature. The > circuit and the formulae are borrowed from Peter Anderson, and they > are the same circuit and formulae as can be found in the App Note > "Measuring Resistance using RCTime." > > If the transmitter circuitry is at room temperature, it reports all > temperatures very precisely. I calibrated the thermistors at 35F and > 212F, and they tracked very precisely to another, very accurate > thermometer I own. > > However, when I put the transmitter outside at around 40F, the temps > are reported accurately for an hour or so, then they start drifting > off in different directions. One thermistor reports 55F, one reports > 60F, etc. If I then do nothing but bring the transmitter back inside > the house and allow the thermistors to report ambient temperature, > after about an hour or so, the temperatures start to get back in line, > > and after two hours, they are back to normal again. (I can also stick > all thermistors in a water bath at about 35F, and they will report > flaky temps for an hour or two, and then correct.) > > It _sounds_ like the RCTime circuitry doesn't like cold ambient > temperatures. I need to be able to transmit BBQ temps in cold ambient > temps because the whole purpose of this contraption is to report temps > > to the receiver (which will sit next to my bed and alarm over and > under temp conditions) when I do my overnight smoking. > > Any ideas? TIA > > grant > Yahoo! Groups Sponsor [Click for Details] Click for Details > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] |
|
|
|
Grant, Precisely so. RC networks are very sensitive to temperature changes. In a thermister circuit the Dv (Delta V, change in voltage) is very small so these sensitivities add up to big changes in output. You will need to use temperature stablized caps and resistors in such a circuit to tolerate temperature variations - Better yet to use wire-wound resistors and an OPAMP and not an RC circuit if the temperature varies much. At least I _think_ its the wire-wound resistors that are less sensitive to temperature fluxuation. DLC > I have built a temperature reporting transmitter that sits next to my > BBQ and reports up to four temperatures via RF to a receiver that sits > in the house. This transmitter uses the RCTime function to get the > resistance, then translates that resistance to a temperature. The > circuit and the formulae are borrowed from Peter Anderson, and they > are the same circuit and formulae as can be found in the App Note > "Measuring Resistance using RCTime." > > If the transmitter circuitry is at room temperature, it reports all > temperatures very precisely. I calibrated the thermistors at 35F and > 212F, and they tracked very precisely to another, very accurate > thermometer I own. > > However, when I put the transmitter outside at around 40F, the temps > are reported accurately for an hour or so, then they start drifting > off in different directions. One thermistor reports 55F, one reports > 60F, etc. If I then do nothing but bring the transmitter back inside > the house and allow the thermistors to report ambient temperature, > after about an hour or so, the temperatures start to get back in line, > and after two hours, they are back to normal again. (I can also stick > all thermistors in a water bath at about 35F, and they will report > flaky temps for an hour or two, and then correct.) > > It _sounds_ like the RCTime circuitry doesn't like cold ambient > temperatures. I need to be able to transmit BBQ temps in cold ambient > temps because the whole purpose of this contraption is to report temps > to the receiver (which will sit next to my bed and alarm over and > under temp conditions) when I do my overnight smoking. > > Any ideas? TIA > > grant > ============================================================================ * Dennis Clark Aristocrat at heart www.verinet.com/~dlc * * Shannon Moyes Clark Resident historian * * Be well, do good work, and stay in touch -- Garrison Keillor * ============================================================================ |
|
Grant: I have found the same problems trying to mesure temperatures with an RC time. I believe it.s mostly due to drift in the capacitors at different temperatures. What I'm using now with good success is a type 7 10K thermister. If you plot their curve, you will find them to be quite lenier between 30 and 100 F (if this is within your range). Hook the thermister between +5 V and the input pin and connect a 10K resistor from the pin to ground (a 1 pecenter if you can find one). The interisting thing about it is if you subtract 259 from the counts, you get deg C*10! The routine below does some over sampling and also averages the new reading with the old reading to smothe things out but if you take all that out, you end up with: Deg C *10 = CInt(CountsAsSingle - 259#) the " * 10 " means that if you devide your integer by 10, you get a .1C resolution. I'm assuming that your RC network has a series resistor and a capacitor to ground. If so, you can leave this network in place as it will make a great filter! '----------------------------------------------------------- Private Function Read_Probe(ByVal iCurrentTemp As Integer, ByVal Offset As Integer, ByVal bInputPin As Byte) As Integer ' converts input from 10K thermister to Deg F '-259)/10 for Deg C 'Deg C * 1.8)+320.0 for F Dim bTemp As Byte Dim iTemp1 As Integer Dim iTemp2 As Integer Dim sTemp As Single iTemp1 = 0 For bTemp = 1 To 30 ' Over Sample Sleep (0.005) ' Delay sample to filter out AC hum iTemp1 = GetADC(bInputPin) + iTemp1 ' Read port and add to self Next ' bTemp iTemp2 = iTemp1 \ 30 'Average iTemp1 (counts) sTemp = CSng(iTemp2) 'Convert counts to a single iTemp1 = CInt(((sTemp - 259#) * 1.8) + 320#) 'Convert counts to Deg F 'iTemp1 = CInt((sTemp - 259#) * (sSpan / 1000#)) 'Convert counts to Deg C of F iTemp2 = iTemp1 + Offset 'Add calibratin offset If (iTemp2 >= iCurrentTemp + 20) Or (iTemp2 <= iCurrentTemp - 20) Then Else iTemp1 = ((iCurrentTemp * 3) + iTemp2) \ 4 ' New value weighted by old value if within 10 F Degrees iTemp2 = iTemp1 End If Read_Probe = iTemp2 ' Pass back End Function '----------------------------------------------------------- Brad Watts / AMT Web www.amt.nb.ca -----Original Message----- From: Neil Jepsen [mailto:] Sent: Monday, April 02, 2001 5:29 PM To: Subject: Re: [BasicX] Can cold temperature affect a resistance reading? Grant, I'd be tempted to try measuring the thermister temperature by supplying it with a conatsnt current ( or from a high value resistor) and using the ADC function to measure the resistance and hence the temperature. neil Grant Baxter wrote: > I have built a temperature reporting transmitter that sits next to my > BBQ and reports up to four temperatures via RF to a receiver that sits > > in the house. This transmitter uses the RCTime function to get the > resistance, then translates that resistance to a temperature. The > circuit and the formulae are borrowed from Peter Anderson, and they > are the same circuit and formulae as can be found in the App Note > "Measuring Resistance using RCTime." > > If the transmitter circuitry is at room temperature, it reports all > temperatures very precisely. I calibrated the thermistors at 35F and > 212F, and they tracked very precisely to another, very accurate > thermometer I own. > > However, when I put the transmitter outside at around 40F, the temps > are reported accurately for an hour or so, then they start drifting > off in different directions. One thermistor reports 55F, one reports > 60F, etc. If I then do nothing but bring the transmitter back inside > the house and allow the thermistors to report ambient temperature, > after about an hour or so, the temperatures start to get back in line, > > and after two hours, they are back to normal again. (I can also stick > all thermistors in a water bath at about 35F, and they will report > flaky temps for an hour or two, and then correct.) > > It _sounds_ like the RCTime circuitry doesn't like cold ambient > temperatures. I need to be able to transmit BBQ temps in cold ambient > temps because the whole purpose of this contraption is to report temps > > to the receiver (which will sit next to my bed and alarm over and > under temp conditions) when I do my overnight smoking. > > Any ideas? TIA > > grant > Yahoo! Groups Sponsor [Click for Details] Click for Details |
|
Jack: I'm still a little confused about what effect local variables have on stack space. It would seem that locals live between static variables and the stack but when I check the mpp file, things don't add up. I wrote a small test program that put a 100 byte array in static and a 100 byte array as local. If this puts 200 bytes in RAM, I should only have 201 bytes for the stack but the mpp file reports 301....Can you elaborate on this? Brad Watts / AMT Web www.amt.nb.ca |
|
|
|
--- In basicx@y..., "Brad Watts" <bradwatts@b...> wrote: > Jack: > I'm still a little confused about what effect local variables have on stack > space. It would seem that locals live between static variables and the stack > but when I check the mpp file, things don't add up. > > I wrote a small test program that put a 100 byte array in static and a 100 > byte array as local. > > If this puts 200 bytes in RAM, I should only have 201 bytes for the stack > but the mpp file reports 301....Can you elaborate on this? > > Brad Watts / AMT > E-mail BradWatts@a... > Web www.amt.nb.ca Local variables live on the stack. They are transient and come and go with the flow of the program. All languages do this with local variables. So local variables do not count in the total ram usage reported by the program or the mpp file, because it is only reporting static ram usage. Depending on how your program flows, local variables can actually take up the bulk of your memory usage. This is why you can have stack overflows if you call too many subroutines with local variables. Jack |
|
Grant, The problem is not the Atmel chip, which is spec'ed from 0C to 105C. But the crystal/oscillator circuit probably is not. And if the time is off, then any rc measurement is suspect. I have never seen a temp spec on the BX24. The way I see it, you have two choices. Keep the BX24 warm, or send your data inside before you convert it. You could literally put the BX24 into an insulated box, measure the temperature, and keep the box warm by measuring the temperature and switching a 5(?) watts resistor on and off with the processor. The second choice gives up the wireless link. Route the signal inside with a cable with 4 twisted pair, and do the conversion inside. By the way, you might want to look at the LM34C to give a temperature output as a voltage instead of a resistance which has to be converted. They are cheap, less than 50 cents each. But you still have to get the signal into the BX24, and I suspect that the A/D converter also depends on the oscillator accuracy. Let us know what you do. Andy --- In basicx@y..., Grant Baxter <grant@b...> wrote: > I have built a temperature reporting transmitter that sits next to my > BBQ and reports up to four temperatures via RF to a receiver that sits > in the house. This transmitter uses the RCTime function to get the > resistance, then translates that resistance to a temperature. The > circuit and the formulae are borrowed from Peter Anderson, and they > are the same circuit and formulae as can be found in the App Note > "Measuring Resistance using RCTime." > > If the transmitter circuitry is at room temperature, it reports all > temperatures very precisely. I calibrated the thermistors at 35F and > 212F, and they tracked very precisely to another, very accurate > thermometer I own. > > However, when I put the transmitter outside at around 40F, the temps > are reported accurately for an hour or so, then they start drifting > off in different directions. One thermistor reports 55F, one reports > 60F, etc. If I then do nothing but bring the transmitter back inside > the house and allow the thermistors to report ambient temperature, > after about an hour or so, the temperatures start to get back in line, > and after two hours, they are back to normal again. (I can also stick > all thermistors in a water bath at about 35F, and they will report > flaky temps for an hour or two, and then correct.) > > It _sounds_ like the RCTime circuitry doesn't like cold ambient > temperatures. I need to be able to transmit BBQ temps in cold ambient > temps because the whole purpose of this contraption is to report temps > to the receiver (which will sit next to my bed and alarm over and > under temp conditions) when I do my overnight smoking. > > Any ideas? TIA > > grant |
|
I can see that you aren't old enough to have built a short wave receiver with tubes. In those olden days we had a variety of capacitors with specified temperature coefficients. In this way you could compensate for the shift in an oscillator frequency with the appropriate cap. I would also go with a resistor designed for this purpose (see Digikey for NTC resistors) or a surplus thermocouple. The LM34Z, which I like, won't stand up to the heat in the application you describe. |