Electronics > Beginners

Auto-ranging circuitry for an ADC on a microcontroller (Arduino)


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.


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.

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.


[0] Message Index

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod