Calculating time and saving that using analog circuit

Thread Starter

msadoughi

Joined Sep 7, 2023
4
Hi Everybody,


In a measured waveform, there are several spikes. Once the first spike is sensed, I want to calculate the time until the last spike. The time would be around 10 microseconds. I need to calculate that time precisely and store that time. This procedure must be done completely using analog, not digital. Can anybody help me with which devices I need to choose? Counter is a good option?


Thankfully,
Milad
 

LowQCab

Joined Nov 6, 2012
3,580
You will need to filter-out everything that is not the spike that You want to measure,
and then purchase a High-End Frequency-Counter,
and then "cross your fingers" and hope for the best.

10us is pretty extreme for a DIY project.

If You just need one test-measurement, just get a top-rated Oscilloscope.
.
.
.
 

BobTPH

Joined Jun 5, 2013
8,101
How do you plan to “store” the analog time? For how long?

A counter is digital circuit, so according to your rules, you cannot use a counter.
 

AnalogKid

Joined Aug 1, 2013
10,783
This procedure must be done completely using analog, not digital.
That is a problem. And you don't state what "precisely" means to you. That is another problem.

An almost-all-analog solution certainly is possible, although it will not be as "precise" as a relatively simple digital one. I say almost because measuring a time period by definition means starting and stopping a process, and those are digital functions. Let's assume digital "techniques" are permitted for the control system, but not the acquisition method.

Start with a comparator or Schmitt Trigger circuit to get consistent sampling of the input waveform. The leading edge of the first pulse toggles a flipflop that enables a constant current source. This charges up a "precision" capacitor. The next output from the Schmitt Trigger (the leading edge of the second pulse) toggles the flipflop again, disabling the constant current source. The voltage across the capacitor now is directly proportional to the time period between the leading edges of the two input pulses. Now all you have to do is convert this to a meaningful display or output without digital techniques.

Note that the Schmitt Trigger and toggle flipflop both can be built with discrete transistor circuits. No opamps, IC comparators, or digital chips expressed or implied, but this isn't fooling anyone. A flip is a flipflop.

AND - Getting all of that to deliver 1% timing accuracy will be a major effort. This is because at these speeds, the intricate little foibles of how transistors operate become a significant percentage of the overall period. OTOH, a 100 MHz clock oscillator and a three-decade divide chain can deliver 0.1% -ish performance, hand-wired in one afternoon.[/SIZE]

What is this for?

ak
 
Last edited:

Thread Starter

msadoughi

Joined Sep 7, 2023
4
That is a problem. And you don't state what "precisely" means to you. That is another problem.

An almost-all-analog solution certainly is possible, although it will not be as "precise" as a relatively simple digital one. I say almost because measuring a time period by definition means starting and stopping a process, and those are digital functions. Let's assume digital "techniques" are permitted for the control system, but not the acquisition method.

Start with a comparator or Schmitt Trigger circuit to get consistent sampling of the input waveform. The leading edge of the first pulse toggles a flipflop that enables a constant current source. This charges up a "precision" capacitor. The next output from the Schmitt Trigger (the leading edge of the second pulse) toggles the flipflop again, disabling the constant current source. The voltage across the capacitor now is directly proportional to the time period between the leading edges of the two input pulses.

Note that the Schmitt Trigger and toggle flipflop both can be built with discrete transistor circuits. No opamps, IC comparators, or digital chips expressed or implied, but this isn't fooling anyone. A flip is a flipflop.

AND - Getting all of that to deliver 1% timing accuracy will be a major effort. This is because at these speeds, the intricate little foibles of how transistors operate become a significant percentage of the overall period. OTOH, a 100 MHz clock oscillator and a three-decade divide chain can deliver 0.1% -ish performance, hand-wired in one afternoon.

ak


I appreciate the information you provided. Could you please let me know how come I can use that time? I only want to calculate that time one time, and then use that time in my circuit.
 

Danko

Joined Nov 22, 2017
1,773
In a measured waveform, there are several spikes.
Once the first spike is sensed, I want to calculate the time until the last spike.
The time would be around 10 microseconds. I need to calculate that time precisely and store that time.
Use oscilloscope.
For example, OWON VDS3102 can write to file
waveform up to 10,000 μs, where you can
measure durations with accuracy ±1 ns.
1694196028892.png
ADDED:
That is a $300, 1000% digital box that needs an even bigger all-digital box to be useful.
I only want to calculate that time one time, and then use that time in my circuit.
TS do not need to buy oscilloscope, only pay to some owner of oscilloscope
for time of measuring process.
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,006
The only analogue arrangement that comes to my mind is a pulse integrator (counter), giving a ramp voltage which reaches a value representing the number of pulses and can be held (stored) on a capacitor. Hardly 'precise' though.
If the TS were more forthcoming over the purpose of this project, we might be able to offer better help.
 

MrAl

Joined Jun 17, 2014
10,900
Hi Everybody,


In a measured waveform, there are several spikes. Once the first spike is sensed, I want to calculate the time until the last spike. The time would be around 10 microseconds. I need to calculate that time precisely and store that time. This procedure must be done completely using analog, not digital. Can anybody help me with which devices I need to choose? Counter is a good option?


Thankfully,
Milad
Hi,

I am not 100 percent certain about what you are asking for because it sounds like you are mixing up analog terms with digital terms.

To measure time using an analog circuit you would need to, ideally, use a constant current source with a capacitor, where the current source charges the capacitor.
You start with the cap fully discharged, then when you are ready to start the clock you turn on the current source. When the time is up you read the analog voltage across the cap and that will be a scaled voltage analog of the time between the start time and the time of some occurrence such as the ending spike. If you need to store that for a short time then you might use a sample and hold circuit.
I used the word "ideally" in the above but if you do not need super accuracy you can charge using a resistor if you stay within the first RC time constant. That eliminates the need for a constant current source. If you stay within one-half of the RC time constant it's even better, but you lose range.

Normally to time something you use a digital counter and a clock of known frequency.
 

SamR

Joined Mar 19, 2019
4,911
Kinda like saying "I want 10 decimal precision out of a slide rule instead of using a pocket calculator". Use a digital scope.
 
Top