[sdiy] (Low) frequency to voltage conversion
Tom Wiltshire
tom at electricdruid.net
Thu Mar 27 12:59:27 CET 2014
On 27 Mar 2014, at 11:03, Neil Johnson <neil.johnson71 at gmail.com> wrote:
> Steve Lenham wrote:
>> However, the OP was asking about frequency-to-voltage conversion, not the
>> other way round - does that make any difference, or is it equally achievable
>> in the analogue domain?
>
> Oh, right, yeah, analogue F/V conversion at such low frequencies will
> take a VERY long time due to filtering you'd need to avoid ripple, as
> you say.
> In that case do what Tom was talking about a few days ago on another
> thread and implement a reciprocal frequency counter in a PIC/AVR/etc,
> and then output a voltage via a DAC proportional to the input
> frequency (insert usual discussion about how many bits, etc etc etc).
> That way you only have to wait for one complete cycle before the
> output updates. Getting it to behave nicely over a 10 octave range
> will be fun.
+1 for this idea. That's exactly what I was about to propose.
Since Justin wanted to measure slow square waves, it seems like the obvious solution. The range is 0.001Hz to 1Hz, so x1000, which isn't too bad - 10 bits.
You could even use a PWM output for the DAC. 10-bit PWM could be used with each bit representing 0.001Hz, so you'd get 0.001Hz to 1.023Hz. This would be doable on any old PIC. The newer ones would do a better job still, since there are some with higher PWM resolution.
Using the typical quartz watch 32768Hz crystal for the timing clock might make the calculations easier (division! ugh!) and would give you enough accuracy.
You'd get no ripple, you'd get an accurate result after only one cycle, and it'd cost less than a pint.
HTH,
Tom
More information about the Synth-diy
mailing list