Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Novel Frequency Determination

Status
Not open for further replies.

BrownOut

Banned
Thanks again to those who have expressed interest in my project. The objective is a high performance circuit for the measurement of frequency or pulse width. Also, to investigate different methods of processing signals for time-based measurements. Before you start ripping me a new one, please remember this is a work in progress. At present, it's just an idea being simulated using generic components. I still have alot of work to do before it's a finished product. Also, before telling to "just use a PIC", I want to say this project isn't targeted as a stand alone system; rather, it's targeted as an embedded subsystem for other projects where measurement of rapidly changing frequency is desired.

Most of the analog frequency measurement circuits or tachometers I've seen rely on some combination of charge pumps and averaging networks. Those components can cause a lag between fast frequency changes and the eventual accurate measurement output. My project attempts to rapidly change the output in response to frequency changes. In the attached diagram, U1 outputs a signal which is proportional to the integral of the signal's "low" period (green trace). The input network insures the integrator is reset to measure each pulse independently. The first FET follows the integrator’s output during the measurement period, and holds the peak value during the integrator’s "reset" period (blue trace). C2 keeps the value, which is in turn sampled by the next FET/capacitor. This sampled value is buffered by output by U4 as the final measurement signal. In the simulation, the output is at 97% of the final value on the very first sample.

For frequency measurement, the signal needs to have a 50% duty cycle (or 50% mark/space). This can be accomplished by dividing the input signal with a flip-flop, and scaling the output to account for the division. Alternatively, the circuit can measure the pulse width of a periodic signal without pre-processing.

There are several issues with the present circuit layout. For one, care must be taken to not overload U1, as that messes up the measurement totally. In the simulation, I use a pretty unrealistic signal source, until I have a good solution for that. Also, I have to find the right combination of amplifies and "hold" capacitors to keep the accuracy high. The values of the caps have all been arbitrarily chosen, and will ultimately depend on the frequency of the input signal. The idea here is to make the circuit independent to frequency, as much as possible. But for truly wide banc measurements, a selection of caps using rotary switches will be necessary. Also, R16 and R17 are not real resistors, but meant to model the opamps input currents for the simple components being used.

Thanks for reading. Any suggestions or help is appreciated.
 

Attachments

  • Freq_tach.JPG
    Freq_tach.JPG
    189.6 KB · Views: 197
Last edited:
Is the tiny jpeg schematic supposed to be readable?

My first suggestion would be to post the schematic in its own file, with a lossless format like png.
 
Last edited:
Looks good. I'm wondering why the voltage at 1st_S&H is higher than the voltage at the integrator output though (unless those spice strings are specifying some wierd series voltage).

You can get rid of the first S&H if you switch the integrator input (i.e. use it as the 1st S&H - I'm not saying it's any better, just different).

cycle-by-cycle-freq.gif
 
Last edited:
Thanks for your comments, dougy83. I think the 1st S&H just lags a little while the cap is being charged/discharged. If the integrator output was allowed to settle, the S&H would probably be the same voltage. As for the 2nd S&H, I'm not sure I understand your modification. I allow the first one to track the integrator output during the integration time, and the second one holds the value through the entire period. The second one is charged only at the end of each integration interval.
 
Last edited:
I think the 1st S&H just lags a little while the cap is being charged/discharged.
I wouldn't have thought it would overshoot it though.. Oh, I see, the gain of the 2 S&H is >1. You can get rid of R9/10/11/12/13/14 and just connect the output of each to its -ve input (unity gain buffer); unless there was some reason you didn't want to.

As for the 2nd S&H, I'm not sure I understand your modification. I allow the first one to track the integrator output during the integration time, and the second one holds the value through the entire period. The second one is charged only at the end of each integration interval.
In the scrawl I posted, the integrator output 'tracks the integrator output during integration time' (as you'd expect), but when that time's over, the input is disconnected as it just holds its value (so it's an integrator with built-in S&H). I just drew it up before I read yours properly as at first glance I thought it could be done with fewer components and I didn't like the nmos usage (I realise it's fine though - just ignore me).
 
If I understand what you are doing, you are measuring period. I have considered this technique before, but I always got stuck on converting the period to frequency. How are you going to calculate the reciprocal?
 
Actually, I didn't intend to calculate the reciprocal. This circuit is intended to be enbedded in a larger system which will use the output as a measure of the signal's frequency, but will process it in other ways. But off the top of my head, if you want to calculate the recprocal, something like this might work:

Log amplifier -> inverter -> summation -> anti-log amplifier.

I have no idea how to implement this. I think it might work, but I'm not up for working out the details.

EDIT: If you wanted to connect a meter, you could just make the meter scale the reciprocal.
 
Last edited:
hi D,
Would you please post your LTS *asc files as you progress with the 'thingy'. ?

Regards
 
Hi Eric, I should have done this on the first post: I'll post it periodically, but I only work on it sporadically.
 

Attachments

  • tachometer5.asc
    5.9 KB · Views: 136
Reciprocal

Here is my attempt to quickly cobble together a reciprocal processor. I included a graph of the reciprocal function for comparison. It's rough, and needs some setting up and/or refinement, but maybe can be bases for a better solution.
 

Attachments

  • reciprocal.JPG
    reciprocal.JPG
    184.1 KB · Views: 126
Hey Roff, what do you think of my reciprocal circuit? Here is a version without the abstract voltage source. The output is pretty close to the calculated reciprocal. It required a prescaler 10:1 because it works from .1v - 1v. I think with enough tweaking, I can get most of the error out. But temperature stability might be an issue, as I use the diodes for my log functions, and they will change with temp. I need to find a way to cancel out that effect, but this might be a good start, eh?
 

Attachments

  • reciprocal2.JPG
    reciprocal2.JPG
    148.3 KB · Views: 137
Last edited:
Hey Roff, what do you think of my reciprocal circuit? Here is a version without the abstract voltage source. The output is pretty close to the calculated reciprocal. It required a prescaler 10:1 because it works from .1v - 1v. I think with enough tweaking, I can get most of the error out. But temperature stability might be an issue, as I use the diodes for my log functions, and they will change with temp. I need to find a way to cancel out that effect, but this might be a good start, eh?
I didn't analyze it, but I like the concept!
The times I thought about measuring period and converting to frequency, I was going to measure the period digitally, so I needed to take the reciprocal digitally. Starting with analog certainly makes it simpler. Not a piece of cake, but simpler.:D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top