# Measuring a low AC Voltage with microcontroller

This is my first time posting so if I miss some form of etiquette I apologize in advance. I am an undergrad engineering student and I am trying to build an internal resistance state of health battery monitor. This monitor will put approximately 1 Amp AC at a fixed frequency through a 12 V lead acid battery. This will cause a voltage drop in the range of millivolts that I need to measure.

I'm currently using a raspberry pi with an ADC to take measurements, however I am unable to take in negative values. I thought about rectifying the signal but then that defeats the purpose of having AC in the first place.

I can use a DMM to measure AC but have been widely unsuccessful in figuring out how to make my own circuit so that the measurement can be read into the ADC.

So my question is either 1, How does a DMM measure, accurately, the AC voltage without messing the signal itself up (this would help me build it) and or secondly, is there some type of sensor that I can use that will accurately measure AC voltage in the range of millivolts or even microvolts.

Any help is greatly appreciated!

I have attached a very simplified circuit. The purple, R1, C1, L1 and R2 and the 12v source represent the battery. The The terminals start at R1 and end at L1. C2 and R3 are just part of the AC current generation circuit where C2 stops the 12V DC from circulating. I am trying to measure AC voltage across the terminals.

• If your ADC has enough resolution and speed, it may be able to provide your PI with enough data to calculate AC voltage. Can you provide more ADC details? Like # of bits (resolution), and full-scale voltage, and the time it takes to process one reading. – glen_geek Oct 27 '16 at 23:44
• Won't the battery's own voltage offset the measurement? – ThreePhaseEel Oct 28 '16 at 1:32
• ADC Bit rate: 16 Bit Interface Type: I2C Channels: 4 Channel AN0 AN1 AN2 AN3 or 2 differential inputs Input voltage: 2.0-5.5v Channel input voltage :0-VDD Continuous Mode: Only 150μA Single-Shot Mode: Auto Shut-Down PROGRAMMABLE DATA RATE:8sps-860sps Input range programmed control, 7 types input ranges: -0.256V ~ + 0.256V, -0.512V ~ + 0.512V, -1.024V ~ + 1.024V, -2.048V ~ + 2.048V, -4.096V ~ + 4.096 V, -6.144V ~ + 6.144V I2C 7-bit addresses between 0x48-0x4B Size:18mm*28mm – Shawn Oct 28 '16 at 5:25
• "Won't the battery's own voltage offset the measurement?" Um.. Wow.. I haven't done this in a real scenario but, that may work enough to at least to do a proof of concept. I can't believe I didn't consider the battery voltage. Spero gave some great options that would help make it precision but thank you. Seems like a no brainer now that you mentioned it. – Shawn Oct 28 '16 at 20:34

## 1 Answer

There are a few possible approaches:

1. amplify the voltage with an AC-coupled amplifier and offset it to the middle of the ADC range.

2. amplify the voltage with an AC-coupled amplifier and make an AC-DC converter (precision rectifier) as would be used in a DVM (this may will have more potential problems with noise being interpreted as signal)

3. amplify the signal with an AC-coupled amplifier and synchronously demodulate the output voltage by effectively multiplying it with the energization signal. This can be done in the digital domain using 1. or in the analog domain using analog circuitry. This is effectively a lock-in amplifier and can give you superior performance by acting as an extremely narrow-band filter, so most of the noise falls outside the passband.

• Thank you, I'll take the time to research these options tomorrow night. I've been so very lost in trying to get it to work. – Shawn Oct 28 '16 at 5:16
• When I finish my project I'll post some results here. Thank you for your help! I'm still researching and designing but I will be implementing some suggestions made here. – Shawn Nov 1 '16 at 4:23