Ac voltage measure

Hi!
Someone can explain me how can I measure a voltage of 150mV AC from a capacitor using an Arduino?
Thanks

You'll need a buffer amp to boost that to 0-5v range.

The Arduino can't read the negative half of the AC audio waveform. In fact it can be damaged by negative voltages. (But 150mV negative is safe.)

With audio signals (which are AC) we normally use a bias circuit and then the bias can be subtracted-out in software.
Audio Input Schematic

The two resistors create a 50/50 voltage divider to bias the input at 2.5V. The AC signal "rides on top" of the bias.

Or here's a circuit that will kill the negative voltage.

Audio Input Schematic 2

With this circuit you can use the optional 1.1V reference and that gives you about 1mV resolution. If it's a "normal" sine wave the negative & positive halves are equal and opposite so the positive half is enough for you to calculate the peak or RMS voltage. (Half of the readings (all of the negative voltages) will read zero.

Here the 2 resistors create a 10/11 voltage divider for the signal so you have to compensate for the voltage loss in software. The 10k resistor limits the current during the negative half-cycle where the diode conducts. The 100K resistor keeps the DC voltage on the Arduino from "floating" up. (Increasing the 100K resistor will reduce the voltage loss from the voltage divider.)

What does that mean? Do you mean through a capacitor? Can you tell us anything else?

Note that you are "sampling" a continuously changing waveform where each cycle has a positive peak, a negative peak, and two zero-crossings and the raw readings will "look random". Typically, you find the peak and then if you know it's a sine wave you know the RMS is 0.707 x Peak.

1 Like

Can you post a partial schematic of the capacitor that you are getting "AC" from. How do you know it is 150mV AC? Also post an annotated schematic showing how you have assembled the Arduino voltmeter? From what I can see which is nothing I cannot give you an accurate answer.

Thank you for your response. Yes, I mean through a capacitor. If I measured with multimeter I get 150mV AC, and I want to read this value in Arduino

I have a circuit with a 555 oscillator, and there I have this capacitor.

Looking at what you have and what you want I would measure it the way DVDdoug points out. Among the problems you face is an Arduino for example an Arduino UNO is a 10 bit A/D. The normal reference voltage for the A/D is 5.0 volts and it's a 10 bit ADC. So you get 1023 quantization levels or simply put the best resolution is 5.0 / 1023 = 4.88 mV. You can also, as mentioned use an internal voltage reference of 1.1 volts. That will give you 1.1 / 1023 = about 1.0 mV resolution.

While I agree that 150 mV is not likely to damage your chip it's not a good practice. Thus we offset the AC on a SC level as was drawn out. Just remember you are not going to make a real accurate AC voltmeter using an Arduino. It likely will never accurately duplicate what you see on your Fluke DMM.

Ron

We can't clearly see the circuit.

You can't reliably read pulses with a meter or the Arduino. The Arduino reads an "instantaneous" voltage with every analogRead(). Your Fluke meter reads the "true RMS" which like a kind of average.

Normally you need an oscilloscope to see the waveform peaks and the wave shape, etc.

Most meters are unreliable when reading AC if it's not a sine wave. With a sine wave they will measure RMS accurately.

If you have a positive-going pulse, a narrow pulse has a lower RMS voltage than a wider pulse.

For example, here in the U.S. we have 120VAC RMS at the power outlet. It's a sine wave with a positive & negative peaks of about 168V (336 volts peak-to-peak). If you have a regular-old incandescent light bulb 120VDC will give the same brightness and consume the same power as with 120VAC (RMS).

1 Like

I just need to detect voltage variations, I don't need to detect their real value like in a FLUKE.
This voltage is present at the terminals of a sensor, which reads 200mV AC in the presence of people and 150mV AC when no one is around, and what interests me is detecting that variation.

Without the annotated schematic I cannot help you. The Arduino in your picture I believe runs on 3V3 not 5V. DVDdoug posted some good ideas that could be scaled but what is the reference point for the signal.

Yes! Looks like a ESP-32.

The schematic I'm using is this one:

I intend to acquire the signal from a bedsheet, which functions as a humidity and presence sensor. For that, I'm using the circuit from the schematic, which consists of basically an oscillator 555 and the ESP32. At the terminals of the bedsheet sensor, I'm obtaining an AC voltage of 150mV in the absence of people and 200mV in the presence of people. I want to find a way to detect this variation on the ESP32. What would be the best approach?

How would I go about it? Well figure your 555 output is a square or rectangular waveform. I have no idea as to the frequency. I also assume your circuit is tried and tested and behaves as you mentioned. Never saw a 555 used per the diagram.

Be it an esp32 or arduino I would likely get a ADS1115 Module because it uses I2C and is a decent A/D having programmable gain. I would configure it for "Differential" input mode. A Google of ADS1115 Arduino or ADS1115 ESP32 Will get you a few dozen examples. Once your setup is running just add an IF statement as in IF Voltage > your limit do something... Else do something else. The something can be turn a DIO pin ON or OFF.

Ron

Truthfully, I don't think the 150-200mVAC is anything other than noise. I don’t really see how the circuit works. The 555 AMPLITUDE won't change as much as the frequency. You need to be looking at the signals with a scope, not a voltmeter. You should be seeing a PWM, not an averaged voltage.

If you tell us what the that sensor is, I'm sure someone will tell you exactly what you need to do.

Agreed. The OP describes the mystery sensor as a capacitor in the diagram. Changing capacitance will decrease the output frequency as Cmystery increases, but the amplitude will be stable from 1/3Vcc min to 2/3Vcc max.

While I don't see the 555 circuit working as drawn here nor there. If you want to detect bed occupancy I would think about using the theory behind an automotive seat occupancy sensor scheme. A couple of seating pressure sensors are inexpensive and simple to use. Should be easy to interface with any uC as it's what they do.

Ron

Ron

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.