On 10/12/10 5:52 AM, Jens Boos wrote:
Hello folks,
I am currently building a digital voltmeter (3 x IN-14, 1 x IN-19A)
using the 10 Bit ADC MAX1242 and the PIC16F627A as the controller. I
would like to measure voltages up to 300V.
Here is what I did:
- Vref was conencted to the 5V logic supply voltage, buffered with
2.2uF and 100nF. The 5V are obtained from an 78ß5 regulator that is
buffered with 100nF on both sides.
- Vin is taken from a voltage divider consistong of R1 = 9.970MOhm, R2
=
151kOhm, results in a factor of n = 0.0149. The resistors' values were
measured within the working circuit. Addidionally, V_in has been
buffered with 10nF due to the large impedance of the divider (see the
datasheet of the MAX1242 here:
http://datasheets.maxim-ic.com/en/ds/MAX1242-MAX1243.pdf)
- I left /SHDN floating so that I could use the external 5V reference
(see the datasheet).
I am calculating the applied voltage as follows:
U_measured = n * U_applied
^ U_measured = U_ref / 1024 * Bits
<=> U_applied = U_ref / 1024 / n * Bits
With U_ref = 5V and n = 0.0149 I get
U_applied = 0.327 V/Bit * Bits
I programmed that into my controller with a normal floating point
multiplication, fixed-comma-arithmetic will be implemented during
optimization later. Checking the displayed voltage with my multimeter
revealed that the voltages calculated my the uC are off by the factor
2; not exactly 2, but in the range.
So now I am wondering if I did something wrong in the concept, or if
there is another mistake in my setup. I should also mention that the
last two digits of the ADC value ripple rather strongly.
Any suggestions?
Thanks,
Jens
Jens,
The recommended reference is specified as 2.5V. Perhaps the chip isn't
happy with a 5V reference, although the data sheet doesn't specifically
state that it won't work.
And why aren't you using the internal reference? It must be better than
a 7805. The 7805 is a lousy voltage reference - it's designed to
regulate a lot of power, but not very well. The internal reference is
designed for the task.
Of course your problem could be in the digital end. A factor of two is
one bit position. Is your serial interface data sampled on the correct
edge?
--
David Forbes, Tucson AZ
http://www.cathodecorner.com/
--
You received this message because you are subscribed to the Google Groups
"neonixie-l" group.
To post to this group, send an email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/neonixie-l?hl=en-GB.