Author Topic: Auto-ranging circuitry for an ADC on a microcontroller (Arduino)  (Read 4469 times)

0 Members and 1 Guest are viewing this topic.

Offline e100Topic starter

  • Frequent Contributor
  • **
  • Posts: 566
I need to measure DC signals that can vary from about from about 6mV to 10v to an accuracy of about 5%. This is for measuring the current and voltage across a salt water chlorinator.
The Arduino has a built in switchable reference for 1 or 5 volts.
Would a voltage controlled amplifier or op-amp and programmable attenuator be the way to go?
The limiting factor is the number of microcontroller pins as half are already assigned for driving a display etc.
The Arduino doesn't have a DAC, so generating analogue control voltages is limited to resitive dividers on digital outputs or feeding a PWM signal into a low pass filter.


Mike
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: Auto-ranging circuitry for an ADC on a microcontroller (Arduino)
« Reply #1 on: May 01, 2012, 04:41:47 pm »
Yes, that is the way i would start looking into the signal conditioning. My recommendation would be to look into some of the I2C-interface parts that need just the SDA and SCL signals, i.e. 2 pins from the Arduino to set. What is best, if you need say 2 components (attenuator and amplifier, both can use the same I2C bus.
Arduino has the library for I2C or TWI interface but i haven't really used it, so no experience there.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Fox

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
  • Electronics Engineer
Re: Auto-ranging circuitry for an ADC on a microcontroller (Arduino)
« Reply #2 on: May 01, 2012, 07:23:25 pm »
Hi,
have a look at the Design Note 339 from Linear Technology, i attached, for a general overview how autorangeing can be realized.
In your case would need an PGA which can switch between a gain of 0,5 and 1, or a switchable voltagedivider.

Or you could use just use a fixed 1:1 voltagedivider to reduce your max. 10V to 5V and switch your reference Voltage to 1V when your input Voltage goes below 2V.
This would be the cheapest and easiest way to do it, with an 10Bit ADC and 1V Reference that would be 0.97mV per Bit.
Therefore your input voltage resolution is 1.94mV per Bit.
So you have to decide if this resolution is good enough for your application or not.
A closed Switch should have zero Ohms or less!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf