AD converters

Questions on other types of hardware and getting it talking to the ARM CPU
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

AD converters

Post by YahooArchive »

> Whats the best method to get some ADC channels on the cordium?
> Maybe something like and AD7997 using I2C?

That would work, my favorite general purpose A/D part is the ADS7870,
readily available with prescaling amps, 8 channels, 12 bits (14
available), and does differential too.

The builtin routines support I2C, SPI, 1-wire protocols just for this
type of expansion.



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

> Since Armmite only accept maximum 3.3V for Analog input. Now my
> application the output is from 0.25V to 4.75V. What is the best way to
> link it together without damage the IC.

The ARMmite will tolerate a 4.75V signal, but for the A/Ds to work
properly they must be limited to 3.3V

The simplest solution would be a voltage divider with 68K an 30K
resistors which would give a 3.29V signal. Use 1% values if your
building more than a few.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

>I want to add a higher resolution(16-20 bits) adc chip to a daughter
>board on the armmite or arm express SBC.

There are numerous 16bit and more serial ADC chips available. These
can be interfaced with the ARMmite/express using either SPI or SHIFT
functions. Depending on frequency of conversion and the signal will
dictate what part to use. More modern devices will operate rail to
rail, meaning they will accept a signal from GND to the power supply.
Older devices will use multiple supplies often +/-12V. This is the
easy part.

The hard part is getting an accurate conversion. With a 3V signal 16
bit accuracy means your noise has to be less than 50 microvolts.
That's a pretty small number. It usually means the converter has to
be very close to the source, long wires will act like antennas and
pick up noise. Power supply noise is the next problem and requires
filtering and bypass capacitors at the converter, this is particularly
a problem is the power supply is used as part of the reference
voltage. For this reason, many newer devices have their own on chip
reference.

Anyone want to share some real world experiences?

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

> Anyone want to share some real world experiences?
>

Well, not knowing what they're measuring, the enviroment I can only
speak to some solutions I had to resort to in measuring remotely or
just measuring in general.


To reduce noise over wires from a few inches to several feet use
twisted-pair. That or do like I did and tie one end of the two wires
and put the other end in a drill and made my own. That or at least
some sort of shield cable. Some I've seen are two wires inside a
sheath of foil that you can tie to ground for shielding. I haven't
tried those.


That and good shielding and filtering at the end where you're
measuring at. If it's some sort of sensor shield it as best you can
too. All it takes is a small bit of wire exposed and you'll be
surprised what it will pick up. That and you'll be surprised at how
well a good common-point ground will work to reduce noise.


Like Bruce suggested, definately get an A/D converter with it's own
internal reference. But I'd like to add to that. The A/D converter
itself should be on a different supply than the digital components.
Don't forget to decouple the power supply pin on the A/D converter.
If you're going to make your own pc board having a good ground and
good layout can help there as well, keeping analog signals as far
away from digital component traces will help a lot.


We used to have circuitry measuring microamps. So you learn quick
that at that low someone running an electric razor could wreak havoc
on your measuring.


Oh, something else. If you know what the bandwith of the signal
you'll be measuring is you can filter out components that are outside
that range. That or do it through software filtering. But having
good shielding and grounding techniques can help a ton.


Michael

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

> I am attempting to use a armite controller to receive an analog signal
> from a modulating thermostat (0-10v) and then let out an analog signal
> to a variable frequency drive (0-10v). From what I have gathered from
> the literature, I need to use a pulse width signal and then use a
> capacitor to create an analog output. However, I have not figured out
> how to input an analog signal into the armite controller. Can you help?
>

For the analog input the LPC ARMs want a 0-3V signal (from User
Manual), to get that, use a resistor divider

A 24K resistor and a 10K resistor will work,

0-10V ----24K-----o----10K----- GND

AD input connected at o

AD input now = (0-10V) * 10/(10+24)
or 0-2.94 V

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

Thanks for the information:),

As for the voltage I have used my ARMmite up to 3.3V without incident.
From what I read it appeared to me that there is a slight voltage
allowence before the faulse readings will occure. Even so I never include
the highest 2% as part of normal readings. I use readings over 1000 as
an indiction that an error has occured.

As for Zener protection, I don't know if I just bought the wrong ones but
the 3.3 volt Zeners I tried; skewed my result. They started passing
enough leakage that my measurements were having errors. The voltage/
current result was exponential but it started passing enough current that
at 2.5V my readings were off and when I was close to three volts it was a
struggle to get the reading to rise. I don't have anything on the circuit
right now becaue I'm not happy with the zener. I have data from a 5.1
volt zener that shows at 3.3v it is passing 287µA.

If there is a better Zener or a better method to protect the inputs from
over voltage I would like to know.

Thanks,

--- In ARMexpress@yahoogroups.com, "oratzes" <oliver@...> wrote:
>
> --- In ARMexpress@yahoogroups.com, "basicnode" <bruce@> wrote:
> >
> > > I looked through the messages and manual but I can't find how much
> > > energy the A/D inputs consume. Is there an equivalent resistance,
> > > capacitance?
> >
> > NXP specs the input cap in the datasheet to be 1 pF (sounds a bit
low
> > to me, but its normally in that range)
> >
> > There is no spec on the input resistance, though there are leakage
> > specs, typically the input is going through an analog mux to an
analog
> > comparator, so its pretty high, normally many Megohms, and is
swamped
> > by leakage current of 5 uA
> >
> > If you exceed 3V, the leakage does go up quite a bit.
> >
>
> On that topic. I saw the 3V max on AD inputs. Coupled with a resistor
voltage divider, will a
> 3V6 zener be sufficient to protect the input, yet maximize the range
of the analog signal?
>

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

> As for Zener protection, I don't know if I just bought the wrong
ones but
> the 3.3 volt Zeners I tried; skewed my result. They started passing
> enough leakage that my measurements were having errors. The voltage/
> current result was exponential but it started passing enough current
that
> at 2.5V my readings were off and when I was close to three volts it
was a
> struggle to get the reading to rise. I don't have anything on the
circuit
> right now becaue I'm not happy with the zener. I have data from a 5.1
> volt zener that shows at 3.3v it is passing 287µA.

Zener diodes are not ideal devices, especially if you get the bigger
ones. Take a look at Figure 7 on this spec sheet, the curve to the
far right is for a 3.3V device.

http://www.onsemi.com/pub_link/Collateral/1N5333B-D.PDF

At 1V, it looks like 10K
At 2V, it looks like 200 ohms

These larger devices are really meant for power which means they will
really be on at their rated voltage.

Even for a small 3V device it will be 100K at 1V, 2K at 2V

http://www.onsemi.com/pub_link/Collater ... 4LT1-D.PDF

So at a minimum you should use a 5V device, and really in analog
applications, its better to use a Schottky diode to the 3.3V rail

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

Thanks for this great information, as always!
>its better to use a Schottky diode to the 3.3V rail

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

>What is the largest forward voltage acceptable by armmite? 3.3 V is
>clearly the peak, and it corresponds to about 65427 (more like 16 bit
>resolution than 10 bit?).

>A more important question: What is the maximum reverse voltage
>acceptable to the armmite?

The LPC2103 has simple parasitic protection diodes, but they are not
designed to take large amounts of reverse current or over voltage
current. So the answer is really 0-3.3V, beyond that you should add
external diodes.

In addition analog mux is disturbed by voltages greater than 3.3, so if
you are using any A/D, all A/D pins must remain below 3.3V (see NXP
errata sheets).

The output of the A/D is justified left into 16 bits. The reason,
being that when better (higher resolution) A/Ds get built in, your code
would not need to change.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: AD converters

Post by YahooArchive »

I have built a circuit that divides 5.3 V down to 0.9V to test my A-
>D program.
I measured the battery pack's which powers the circuit voltage as
5.3V (+/-0.05V)
I constructed a potential divider from two low tolerance but measured
resistors, 16K5 (+/-1K) and 80K (+/-5K). The voltage at the the non-
ground side of the 16K5 resistor (the non 5.3V side of the 80K
resistor) was measured to be 0.8V(+/-0.05V). The ground of the
ARMmite was connected to negative terminal of the battery pack.

These are some of the measurements I got (over about one section of
200ms):
19008
19136
19392
19648
19072
19264
19008
19456
19648
19520
19072
19904
19008
19584
19712
19008
19520
19136
19584
19264
19328
19200

They correspond to about 1.0V I think (3.3*19200/65472). These
values are dubious in their accuracy though I could be persuded that
1.0V is within the bounds of error of my other measurements; more
worrying is the ~3% variation in the readings. Does anybody know
what I am doing wrong, or have any suggestions for any
improvements ? This dat was collected from a battery based system
and so the voltages shoud be stable.

This is my program running on the ARMmite:

DO
A = AD(2) ' A to D pin 2
WAIT(10) ' wait ten milliseconds
PRINT A
'IO(18) = 1 ' turn off the LED
'WAIT(5000) ' wait a second
UNTIL 0 ' loop forever

it assigns to the variable A the analogue voltage on A->D channel 2
converted to a digital integer value (lying between 0[0V] and 65472
[3.3V]), waits for 10ms, prints th current value of A, (a couple of
irrelevant comments) and then does it again until the loop is broken
externally.

Post Reply