# AC signal for ADC [solved]

Hello, I experience the following problem : I have an AC signal which I want to measure (volts) with Uno. Of course, since 328's ADCs are single polarity, I "cut " the negative part using a schotky diode (clamp to the ADC input), that means the ADC input goes maximum 0,15V negative (absolute maximum spec is -0.3V).

In practice I have 2 AC signals to measure. These signals are same frequency, but may be in phase or opposit phase (0 or 180 deg) in respect to a ref signal.

The strange part is that if the signals are in same phase between them (ie both 0 or both 180 deg to ref), measurements are ok, if they are opposite between them (one 0 the other 180 deg to ref), measurements are not ok. There comes an error which is related to their amplitude.

Any comments on possible input behavior of ADC because one input is positive and the neighbour (a little) negative?

Try a 1mS delay between reads. There is only one multiplexed ADC in the ATmega chip and it takes time to "settle". (A shorter delay should work, but 1mS is easy to try.)

I "cut " the negative part using a schotky diode (clamp to the ADC input),

I hope you have a resistor in series if you are "shorting" the negative half of the waveform to ground. ;)

The usual method is to read the same channel twice and use the 2nd reading, that gives the internal sample & hold capacitor a chance to charge up/settle at the input voltage.

How fast is the AC signal changing? < 5KHz?

@wvmarle : here is a sch, this is the best i can do now, out of office. There are 2 such circuits (with different but related to reference signal inputs). Output resistor is 1k.

@DVDdoug : Sampling is first on channel …1, then after filling array processing, calculations, etc, on ch…2. Anyway, 10ms delay is out of question for this project. If you think inserting a delay is a MUST (sorry) pls tell me. Resistor…is ok

@CrossRoads: Sampling is continous for 1000 times on ch1 then processing, calculations, etc, then for 1000 times on ch2…

The schematic:

What are you actually trying to do? Putting a zener on the output you are trying to measure is going to screw you up. Why is their no ground on the op amp supply?

Grumpy_Mike: What are you actually trying to do? Putting a zener on the output you are trying to measure is going to screw you up. Why is their no ground on the op amp supply?

IF it is a zener, then it will limit positive cycle at ...let say 5volt (not to exceed Vcc)? IF it is a zener, what happens on forward biasing? Opamp is powered with +-12. Is there any other line on power connector? Where are capacitors connected?

A zener's slope starts to kick in long before the knee so it will affect any voltage above say 3.5V you want to measure.

The op amp has no common ground with the Arduino so any measurement is screwed there as well.

The problem is that your schematic leaves more questions than it answers.

Grumpy_Mike: A zener's slope starts to kick in long before the knee so it will affect any voltage above say 3.5V you want to measure.

The op amp has no common ground with the Arduino so any measurement is screwed there as well.

The problem is that your schematic leaves more questions than it answers.

my friend pls try to read more and write less. some posts before i mentioned for my schematic: this is the best i can do out of office. if you want the full schematic, not happily i can assure you it is about 366 pages. Interested?

Anyway, There is ground arduino is powered with the same 12V as opamp. Diode is Schottky, i mentioned at initial post. Symbol IS schottky.

Pls leave the investigation. If you know, you are kindly requested to tell : If one input ADC is with positive signal and another with negative -0.15V, will there be any problem in measurements? thank you

demkat1: if you want the full schematic, not happily i can assure you it is about 366 pages. Interested?

I am.

Well, I'm seeing the same problem that Mike noticed is also on the input side of the opamp. Zeners are really not the right tools for analog inputs. You have to put the nominal zener voltage a long way away from the voltages you're measuring and then the protection they provide needs another layer of pre-protection.

What is the input voltage you're measuring? If it's around 1V p-p then perhaps the schematic is OK.

For reference, have a look at the standard AC input buffer for a multimeter. There must be a zillion examples of this circuit online. That doesn't need diodes in the signal path, so it can measure AC voltages much smaller than a diode drop.

Whandall: I am.

ok, you will get your free copy if you answer a simple question on arduino (uno):

If one input ADC is with positive signal and another with negative -0.15V, will there be any problem in measurements?

Negative voltages are out of spec but should be savely clamped if only -0.15V.

The ADC inputs are nominally independent. The voltage read by one should not be influenced by any other input.

In practice, this isn't entirely true. A high impedance input can't charge up the ADC capacitor fast enough when you are taking readings at high frequency. (In this context, "high" might be 1M ohm and 1000 per second.) This shows up when one input is dragged higher or lower by the one that you read before it.

But you've got an opamp buffer and no impedance problems. Each input should not care what's on the other inputs.

Why not build a " precision" rectifier with an op amp to give you a nice DC signal ( Google ) to measure ?

demkat1:
The strange part is that if the signals are in same phase between them (ie both 0 or both 180 deg to ref), measurements are ok, if they are opposite between them (one 0 the other 180 deg to ref), measurements are not ok. There comes an error which is related to their amplitude.

Just a thought:

You have two schottkys in opposite direction between the two inputs of the opamp, with sizeable resistors on all sides.
Would that not mean that the voltage between them is never going to be higher than the forward voltage of your schottkys? (Which I imagine is well under 500mV)

When your two AC signals are in phase, the difference between them is very small, so this will not affect the measurement. But when they are out of phase, they get ‘pulled together’ when they are more than Vf apart.

Edit:
Oh… those are zeners, and Vf seems to be 1.25V, but still…
Did you mean to put those zeners in series? --|<|—|>|–

hammy: Why not build a " precision" rectifier with an op amp to give you a nice DC signal ( Google ) to measure ?

no space for extra opamp. Tried to "add" rectifying at output of existing, but find many problems because of pcb (smd, tight pack, capacitive feedback destroy original signal). Thank you

@Jobi-Wan: They are NOT zeners. they are Schottkies. (as a further step to your analysis : the diodes at input just protect the inputs, keeping difference in acceptable limits. IF they were zeners TES, they should be in series)

Please dont bother with the circuit. it exists for more than 20 years. http://pdf.datasheet.live/da9751f3/analog.com/AN-252.pdf

I'm still waiting for your 366 page document.

Or is 4 (decimal) equal to 366 in a base unknown to me?

The diode clamp will work for negative, but not for positive voltages from the opamp. You might also need a schottky diode from the analogue input to Arduino's 5volt rail.

Would'n a rail2rail opamp, powered from Arduino's 5volt rail have been better? Tell us more about that input signal (peak voltage, frequency). Leo..