|
The BV4205 is an I2C two wire
compatible integrated circuit with a 10 channel 10 bit A to D converter.
The IC works independently of the microcontroller and can acquire
analogue signals continuously until required.
The following is a 'working' version of a temperature gauge based on the
BV4221, USB to I2C converter, the BV4205 A to D IC and an LM35 temperature IC.
By working I mean that all the scripts and software are included in this file. There are three
components and they will be described below in turn along with the circuit
diagram.

This is how the physical set up looks, for convenience a
bread board has bee used which leans itself to experimentation, it is
easy to do 'what if' type experiments and ideal for this illustration.
The newer versions of the BV4221 have a socket that can
be used whereby a wire can be directly connected from its socket to the
breadboard. The power supply is of course from the USB.
The
LM35 has been connected to a bit of wire so that it can be waved around,
warmed up and cooled down. it can just as easily be mounted straight on
to the breadboard.
The LM35 is a low cost analogue temperature gauge whose output voltage varies
with temperature. For every 1 degree C change in temperature gives a 0.1mV
change in voltage. In its simplest configuration the voltage begins at 0 for 0
degrees C so that 22 degrees C for example will give 0.22V
They
come in several different types for Fahrenheit and Celsius and some others, they
normally have differing postfixes the the LM35 but as they are made by various
manufactures they all differ. The one that is used for this text is a Celsius
type even though the data sheet specified centigrade which is in fact an angular
measure.

The circuit diagram for the whole set up is shown here and at first the circuit may seem more complex than it needs to be but this is
not so. All the capacitors are needed as A to D conversion is notoriously
'jittery' and without all of the above the temperature reading would quite
easily swing a whole degree or two for no reason at all. This actually could be handled
in software by taking an average, but this approach is to get it right at the
source.
How it works
C3,D1 and R2 supply a voltage reference of about 0.56V, this depends on the
diode used, R2 limits the current through the diode and also forms part of a
smoothing circuit along with C3. The reference voltage needs to be as stable as
possible and this circuit seems to do the trick. The reason for such a low
reference is because we are only measuring 0.22V for 22 degrees C and we need to
get a reasonable count out of this. If higher temperatures were needed then an
LED can be used instead of the small signal diode, this will increase the
reference voltage to about 2.
The output of the LM35 could be taking straight into the A to D however in
practice it was found that noise caused the reading to vary sufficiently to give
quite a range of temperatures even when rounding to half a degree so R1 and C4
form a low pass filter which does help considerably. Something to watch is the
value of R1, this must not be too big (less then 10k) as it will effect the
conversion time.
|