(MM) wild temp sensor readings


Author Message
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 4877
Posted: 12:08am 14 Jan 2012      

I find its always good to use some software smoothing where possible. It depends on the application of course, and but instead of taking one reading, I would take several with a few milliseconds between them and then average them out.

eg


OUTDOORTEMPCENT=0
for i=1 to 10
OUTDOORTEMPCENT = OUTDOORTEMPCENT + (PIN(2)/3.3 * 3.26-2.73)*100.
pause 5
next
OUTDOORTEMPCENT=OUTDOORTEMPCENT/10


It takes longer to make a reading, 50mS in this case, but the accuracy and noise rejection are impoved.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ