Reading battery voltage via frequency

batteriesfftfrequencyvoltage

I'm working on a project that involves reading battery voltage via a headphone/microphone jack. The batteries will vary between 3.0 – 3.6V. I'd like to convert that voltage to a frequency (linearly if possible) and perform an FFT on the signal to pull read the voltage from it. Since the headphone/microphone jack uses a sampling rate of 44kHz, I'm limited to an upper bound of about 20kHz. This is the maximum output frequency I can generate from the headphone outputs, or read in with the microphone.

I first looked at a LM331, but it cannot operate at the low voltage I'm using. Next, I looked at the AD7740, but its input clock requires a 32KhZ minimum input reference clock, so I could not generate that using my system.

Since it's looking like I cannot get a continuous mapping of voltages to a range of frequencies, I'm deciding upon using a series of high precision zener diodes that will enable different resistors to be used in a LMC555 astable oscillator circuit. This way, I'll know if the battery voltage is 3.0-3.2V, 3.2-3.4V or 3.4-3.6V. Each Zener will have a different resistor, and the resultant 555 square wave will be filtered to eliminate higher harmonics, then fed into the microphone and a FFT will be performed.

Example: 3.0-3.2V = 1kHz.
3.2-3.4V = 2kHz.
3.4-3.6V = 3 kHz

I've come to stackexchange to ask if anyone knows of a better way, such that I could achieve my original goals of a linear map of voltages to frequencies? (keeping in mind the constraints)

Best Answer

I've come to stackexchange to ask if anyone knows of a better way, such that I could achieve my original goals of a linear map of voltages to frequencies? (keeping in mind the constraints)

IMHO, the easiest way to achieve your goal is to employ an 8-bit PIC micro-controller.

The PIC16(F)XXX parts work with 5V power supply so you do not even need to scale down the voltage input. The effective ADC resolution is ~10 bits, which gives you about 5 mV resolution or about 120 distinct frequencies (from 3,000 to 3,600 mV).

You can use the ADC to measure the battery voltage and use the PIC's its internal 32 MHz (some have 16 MHz) clock to generate a square-wave signal at the frequency of your choosing. The waveform signal can be further filtered (standard single-pole LPF RC) to mainly pass through the fundamental component only.

This solution is highly configurable and very cost effective (< $1).