Searching \ for 'Period Measurement help' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=period+measurement
Search entire site for: 'Period Measurement help'.

Truncated match.
PICList Thread
'Period Measurement help'
1996\08\03@125250 by Bruce Bowling

flavicon
face
I am designing a circuit which will measure the time
a pulse is high (range from 0.1 to 10 milliseconds)
and will put out a voltage from 0 to +5 volts which
corresponds to the measured period. The occurance
of this pulse is somewhat random (from every 20
milliseconds to about 1 second).

Design criterion: simple and cheap over accuracy.

How would *you* implement the above:
1) Use a PIC with a R-2R ladder made up of
individual resistors.

2) Use a PIC with a DAC chip and op-amp.

3) Rig up some op-amp integrator with
a sample-hold with integration capacitor
discharge control (to handle the random occurance
of pulses, keeping a constant output voltage
while there is no pulse).

Again, what would *you* do (everybody is required
to respond :-) )

- Bruce

--
-----------------------------------------------------
<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-----------------------------------------------------
              Bruce A. Bowling
 Staff Scientist - Instrumentation and Controls
The Continuous Electron Beam Accelerator Facility
   12000 Jefferson Ave - Newport News, VA 23602
                (804) 249-7240
               spam_OUTbowlingTakeThisOuTspamcebaf.gov
       http://devserve.cebaf.gov/~bowling
-----------------------------------------------------
<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-----------------------------------------------------

1996\08\03@131155 by Luigi Rizzo

flavicon
face
{Quote hidden}

generate a PWM waveform with the desired duty cycle,
followed by a simple RC filter and possibly a decoupling OP-amp.

       Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: .....luigiKILLspamspam@spam@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================

1996\08\03@143434 by Walter Banks

picon face
Bruce Bowling wrote:

> Design criterion: simple and cheap over accuracy.
> My entry to your "contest" is 2 resistors and a beat up cap

If the pulse is constant height (ie output from a gate would do) I
would use two resistors and a capacitor and two port bits one as an
output and the second as a sense input. I would turn the processor
into a high gain "op amp" and do statistics on the number of ones
fed back. The system works as a current summer with the Cap whose
value is non critical being a low pass filter. The energy in the
pulse can easily be measured and since we know the value of Ri,Rf
and the pulse height we can easily calculate its width. Should be
good to about 10 bits or so.

The added advantage is that it will measure asyncronous pulses.

                                 Rf     |
                           ---- \/\/ ---| Port bit out
                Ri        |             |
Pulse In ----- \/\/\ ------|             |
                          |             |
                          |-------------| Port bit in
                          |             |
               Cap       ===            |
                          |
                         ---
                          -

I have used similar systems for very low cost A/D systems where I can
trade time for accuracy. 10..12 bits are possible with only two critcal
resistors.

Walter Banks
Byte Craft Limited
(519) 888-6911
walterspamKILLspambytecraft.com

http://www.bytecraft.com

1996\08\03@175408 by Mark K Sullivan

flavicon
face
I won't quote it since "everyone is required to respond" and we'll get sick of
it.

I would generate a PWM waveform in software and vary the duty cycle from 0 to
100% based on the pulse width and fee this into an RC filter, saye 4.7K and 10uF
since you're not in any hurry.  I would be able to concurrently measure the
pulse and output the PWM.  If I couldn't, I would tri-state the PWM output when
not generating the PWM pulses so the capacitor in the filter would hold the
voltage.

- Mark Sullivan -

1996\08\04@021015 by Dana Frank Raymond

flavicon
face
>Design criterion: simple and cheap over accuracy.

Noteing that the circuit is to ONLY do this function, and that expense is
the primary concern, a minimum of external hardware is indicated.

I would do the DAC with a R-2R resistor ladder on PORTB and sample the input
pulse on a PORTA input. A level translator (comparator) may be required to
translate the input pulse to CMOS voltage levels and thresholds.

DAC resolution would be as high as 8 bits with accuracy limited by the
precision and matching of the resistors, impedance of the load, and accuracy
of the VCC supply.

A 12 bit PIC could do this job easily with perhaps 12 resistors, 4
capacitors, a crystal, a power supply circuit (as required) and a diode or
zener for input protection. Output buffering or input level translation
would require additional hardware. The least expensive PIC (except for the
newest 8 pin versions) could be used.

A PWM based DAC was a possibility except for 2 factors: 1) PICs with PWM
output are relatively expensive and bit banging a PWM output on one without
degrades the pulse width sense accuracy due to increased software loading.
2) PWM outputs inherently introduce integration delays. The lower the PWM
clock rate (and consequently lower software loading) the higher the time
constant for a given noise level. A R-2R DAC requires a much lower
integration time as only power supply and crystal noise need be removed.

My 2 cents...

Regards, Dana Frank Raymond
.....dfrKILLspamspam.....icom.ca

1996\08\04@112549 by Mark A. Corio

picon face
Are all the pulses for which you are trying to measure width of equal
amplitude?  Are they digital pulses or other format (i.e. shape)?

Mark A. Corio
Rochester MicroSystems, Inc.
200 Buell Road, Suite 9
Rochester, NY  14624
Tel:  (716) 328-5850 --- Fax:  (716) 328-1144
http://www.frontiernet.net/~rmi/

***** Designing Electronics For Research & Industry *****

1996\08\04@113008 by Bruce Bowling

flavicon
face


> Are all the pulses for which you are trying to measure width of equal
> amplitude?  Are they digital pulses or other format (i.e. shape)?
>
> Mark A. Corio
> Rochester MicroSystems, Inc.
> 200 Buell Road, Suite 9
> Rochester, NY  14624
> Tel:  (716) 328-5850 --- Fax:  (716) 328-1144
> http://www.frontiernet.net/~rmi/
>
> ***** Designing Electronics For Research & Industry *****
>
The pulses are all equal in amplitude, and are a
digital level. They range from 0.1 to 10 milliseconds.

- Bruce


--
-----------------------------------------------------
<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-----------------------------------------------------
              Bruce A. Bowling
 Staff Scientist - Instrumentation and Controls
The Continuous Electron Beam Accelerator Facility
   12000 Jefferson Ave - Newport News, VA 23602
                (804) 249-7240
               EraseMEbowlingspam_OUTspamTakeThisOuTcebaf.gov
       http://devserve.cebaf.gov/~bowling
-----------------------------------------------------
<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-----------------------------------------------------

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...