HVAC design questions

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Post by Bigglez » Thu Oct 30, 2008 12:17 pm

GoingFastTurningLeft wrote: I am running it to ADC0 on an AVR... pretty sure its a high impedance input when the ADC and port registers are set correctly.
Which AVR part number? They are all very similar but
it would be wise to read and understand the full data
sheet for the specific device.

The ADC is a successive approximation type, with a
MUX switch in front and typically requires a source
impedance of 10k or lower.

The reference for the ADC is from an on chip bandgap
which can be further decoupled by a capacitor to the
Aref pin.

The AVR has a noise reduction mode that halts the
processor clock during a conversion. This gives 10 bit
performance. 2.56/1024 = 2.5mV/step.

As the LM34 is 10mV per degree C output you are
trying to read only four counts per degree C, so an
intermediate amplifier would be wise.

For a room thermostat a comfort zone is probably
from 20 to 30 deg C. So your LM34 output is only
200mV to 300mV if used directly. Your ADC output
would range from &H00_50 to &H00_78.

If you replace the LM34/35 with a 5k pot (trimmer)
from Vref to Agnd the readings should be solid. If they
are not there is an error in the code (in particular
selecting a suitable sample period and noise
suppression technique). Or system or power supply
noise is to blame.

The LM34/LM35 should produce stable readings on a
DMM. If not there is probably noise from the supply.
A dedicated LDO for the temp sensor is a good idea.

User avatar
GoingFastTurningLeft
Posts: 163
Joined: Wed Sep 06, 2006 7:33 pm
Contact:

Post by GoingFastTurningLeft » Tue Nov 04, 2008 5:50 am

I'm using an ATmega48. Current generation AVR's have a 1.1V internal reference voltage, so 1.1/1024 = 1.07mV/step... works out to around 9 steps/C, so around 4-5 steps/F. This is what makes it nice to use a part that outputs 0V to 1V from freezing to boiling temperatures as its output range matches the ADC range.

Thanks for the tip on using a pot to check for noise due to sampling.

Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Post by Bigglez » Tue Nov 04, 2008 8:26 am

GoingFastTurningLeft wrote: This is what makes it nice to use a part that outputs 0V to 1V from freezing to boiling temperatures
Where do you live that you have 100degC climate
variations?

You are throwing away three-quarters of your
ADC dynamic range to cover 100degC when
a HVAC system typically only covers fifteen
degC (or less).

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests