0
\$\begingroup\$

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)

\$\endgroup\$
1
\$\begingroup\$

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).

\$\endgroup\$
0
\$\begingroup\$

Your first thought of a V/F converter is what jumped to mind as well. I'd suggest you consult The Master (Jim Williams). Try http://www.linear.com/docs/4110 Drop down to page 9 and there's a VFC that will run off 1.5 volts, so you ought to be able to modify it for 3.6. Not only that, you might well be able to simplify it since your supply voltage is higher.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.