Ramsey Electronics COMPUTEMP CT255 User Manual

Page 6

Advertising
background image

CT255

• 6

The DAC (Digital to Analog Converter)

The resistor values in this ladder are chosen to give us nice even steps in the
voltage range we are able to work with. The outputs of the counter can’t
actually achieve 5 volts with the LEDs on the output, but really close at 4.67V.
We then figure what the voltage will be across R38 when all outputs of the
counter are at 4.67V and we will have the maximum output of our DAC. In this
case it is 3.10V. Of course the minimum works out to be 0V. To find our
minimum resolution we find the number of steps the counter has, which is in
this case 2^8 which is 256 possibilities. 0 is one of them, so take 3.10V and
divide by 255 to come up with 12.16mV per step or count. This means this is
the smallest change in voltage that we can measure with our DAC.

When the counter is counting up, you can take a volt meter, probe R38 and see
the voltage “ramp” up with the count. On an oscilloscope, you can not only see
the voltage ramp up, but also take 255 steps on the way up to 3.10V, each step
being 12.16mV! It’s worth it just to check this.

The ADC (Analog to Digital Converter? In a sense…)

Well, you may wonder how this ramp from our counters and resistor ladder can
be used to display temperature. This will be done in a way many analog to
digital converters used to make conversions. ADCs use much more
complicated methods now to increase conversion speed, but that is beyond this
manual. Now you know that each count is equal to 12.16mV, so if you have a
count of 100, you should have an output of 1.216V from our DAC. Well this
means that the display should also be indicating 100 degrees Celsius, right?
This also means that our temperature sensor should be putting out 1.216V at
100 degrees Celsius to get this count of 100, but it doesn’t since it only outputs
at 10mV per degree Celsius, which would only be 1.00V. This means we need
to scale the output of the temperature sensor to meet the needs of our DAC so
the count display and the voltages match.

Scaling to Celsius

To scale the output, we just have to figure out what it will take to make 1.00V
become 1.216V. Not too tough here, we just multiply our 1.00V by 1.216. But
wait, we’re going to make things complicated. We want to display temperature
in 1/2 degree increments. This means that we have to multiply the sensor
output by 2 to multiply our reading by 2. In this case we need 1.216 x 2 or a
gain of 2.422. Since the display has a potential count of 255, and we will never
find an air temperature of 255 degrees Celsius (and like it), we can divide the
display by 2 to scale it to the range of 0-127.5 and use the last LED for 1/2
degree steps.

U1:A is set up as a non-inverting amplifier, and the output of the temperature
sensor is sent to the non-inverting input (pin 3) to be amplified. R39 and C6 are

Advertising