## Measuring 0-200V using 1AD channel

10 posts / 0 new
Author
Message

Can anyone have the idea of the voltemeter

that using single channel to measure dynamic range of

voltage?

for example 0-10V(0.1V resolution) and (10V-200V) 1V resolution.

I search a lot but i cant find any usful material

thank you!

Quote:
I search a lot but i cant find any usful material

Hmmm, maybe you searched for a complete solution, instead of some ideas for separate parts of your problem?

What you need, is:
- a way to measure a (0-5Volt?) voltage with your micro (i assume this is indeed what you're trying to do: measure voltages with an AVR)
- a way to transform any voltage into a range which can be accepted by your micro (maybe a simple resistive voltage divider?)
- a way to switch (automatically or manually) between different voltage ranges. This is just inserting the right resistor into the right place of your voltage divider.
- some care when dealing with voltages in the 200V range, this can hurt, to say the least!!!

Example code for using the ADC of an AVR can be found right here at avrfreaks, if designing a 3-parts voltage divider creates even the slightest challenge for you, you should go out for another hobby/job. And switching the resistors in and out of the divider according to the actual voltage applied, is just a matter of some relays or low-resistance MOSFETs.

-- Thilo

Einstein was right: "Two things are unlimited: the universe and the human stupidity. But i'm not quite sure about the former..."

DO1THL wrote:
Quote:
I search a lot but i cant find any usful material

Hmmm, maybe you searched for a complete solution, instead of some ideas for separate parts of your problem?

What you need, is:
- a way to measure a (0-5Volt?) voltage with your micro (i assume this is indeed what you're trying to do: measure voltages with an AVR)
- a way to transform any voltage into a range which can be accepted by your micro (maybe a simple resistive voltage divider?)
- a way to switch (automatically or manually) between different voltage ranges. This is just inserting the right resistor into the right place of your voltage divider.
- some care when dealing with voltages in the 200V range, this can hurt, to say the least!!!

Example code for using the ADC of an AVR can be found right here at avrfreaks, if designing a 3-parts voltage divider creates even the slightest challenge for you, you should go out for another hobby/job. And switching the resistors in and out of the divider according to the actual voltage applied, is just a matter of some relays or low-resistance MOSFETs.

-- Thilo

"And switching the resistors in and out of the divider according to the actual voltage applied, is just a matter of some relays or low-resistance MOSFETs."

can you elaborate more on that ?

Well, the AVR can input 0-5V.
You have a signal that is 0-200V.
Logically = use a resistor divider! And, to increase resolution in the lower parts of the scale (like your signal is 2.4684V but you are measuring 2V) you use a RELAY to CHANGE (or SWITCH TO ANOTHER) resistor divider.

For instance, you'd have 3 dividers: 1:1 (for sigs 0-5V), 1:10 for 5-50V and 1:50 for sigs 50-200 and above. If you detect a voltage lower that the minimal in the range, you switch to a lower divider, if you detect a voltage ABOVE the maximal voltage for this range, you switch one range UP.

There are pointy haired bald people.
Time flies when you have a bad prescaler selected.

Though clearly, if the 1:1 is active and you apply 200V you will let the embedded smoke out of your AVR! (so obviously best to always leave it set to 1:50 and work down)

Well, obviously, some protection is required (resistor for input, clamping diodes, etc.).

There are pointy haired bald people.
Time flies when you have a bad prescaler selected.

daqq wrote:
Well, the AVR can input 0-5V.
You have a signal that is 0-200V.
Logically = use a resistor divider! And, to increase resolution in the lower parts of the scale (like your signal is 2.4684V but you are measuring 2V) you use a RELAY to CHANGE (or SWITCH TO ANOTHER) resistor divider.

For instance, you'd have 3 dividers: 1:1 (for sigs 0-5V), 1:10 for 5-50V and 1:50 for sigs 50-200 and above. If you detect a voltage lower that the minimal in the range, you switch to a lower divider, if you detect a voltage ABOVE the maximal voltage for this range, you switch one range UP.

A more interesting circuit I know of is the analog optoisolator. You end up scaling the circuit from a higher to a lower voltage and physically isolate the higher voltage. It's more complicated because you need feedback but once you get it working you'd never have to worry about blowing up the AVR.

Or use a avr with a Programmable Gain Amp like the mega 32. Place a Fet input opamp as voltage follower in front with a high voltage resistor of 1 - 10M in series and you are protected.
Dig