View Single Post
  #33   Report Post  
Posted to alt.binaries.schematics.electronic
John Fields John Fields is offline
external usenet poster
 
Posts: 2,022
Default Sample & hold - for frequency.

On Fri, 6 Nov 2009 14:53:26 -0000, "ian field"
wrote:


"John Fields" wrote in message
.. .

Assuming that your mic can integrate out the 12kHz transitions and yield
a harmonic and overtone-free fundamental, what I'd do would be to detect
sequential zero crossings of the signal, square them up with a
comparator, and use the time between the edges to allow a counter chain
to accumulate high frequency clocks (the frequency of the clock chosen
to force the regenerated signal (the "copy") to yield the accuracy you
need) then, at the end of that time, to latch that value and send the
output of the latch to the broadside load inputs of the counter chain.

Simultaneously, the counter chain's count direction will be changed,
making it a down counter, and when it gets to zero it'll clock a dflop
wired as a divide-by-two, and will also reload the value stored in the
latch into the counter, starting the cycle anew.

The net result will be that the output frequency of the divide-by-two
will mimic the output frequency of the synthesizer.

JF


I was hoping for something pretty minimalist - its a sort of one hit project
that once its given me the info I want, its likely to get robbed of parts
for later projects.


---
Well, you're going to need, as a minimum, something which you can use to
measure the period of the waveform and then read it out and take its
reciprocal.

That could be something as simple as a comparator, a dflop, an RS
flip-flop, a clock source, and a counter feeding some LEDs

Just for grins, let's say the highest frequency you can get out of the
organ is 3520 Hz (A7) and you want to measure the frequency to +/- 1%.

In order to do that you'll need a clock running 100 times faster, which
is 352000 Hz., and something to accumulate 100 clock cycles during one
3520 Hz. cycle; an 8 bit binary up counter.

So what you'd do would be to manually reset the counter, have the first
rising edge of the squared-up organ signal enable the counter, and the
next rising edge disable it forever.

Then you'd get the contents of the counter by reading the LEDs, and the
frequency of the organ signal by multiplying the counter's contents by
284.0909µs and taking the reciprocal of the product.

One thing to be aware of is that as the frequency of the organ signal
decreases, either the length of the counter will have to increase or the
frequency of the clock decrease in order to prevent overflow.

Finally, it could get tricky trying to catch the first real rising edge
of the organ signal, so what I'd do would be to insert a small (10ms?)
delay from the whatever the rising thing out of mic was and, when it
timed out, use the next 2 rising edges to gate the counter,


JF