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.

Change Train of Random Narrow Pulses to Smoothed Continuous Waveform

Status
Not open for further replies.

pnielsen

Member
The attached oscilloscope screen shot shows a series of narrow pulses (or spikes). They were created by shifting the DC level of white noise, and feeding into an op amp so only the uppermost swings of noise remain at the output.

The peak voltages and intervals between pulses are therefore random within the numerical range indicated by the screen information.

What I am trying to derive from the above signal is a smoothed, analog-like waveform with fluctuations that roughly track the changing noise amplitude, such as indicated in red on the oscilloscope screen below.

Can anyone advise regarding possible design approaches?

pulse_train_smoothing.png
 
Without being able to see into the future I don't see how you can determine a slope to the next peak as you don't know which way to go up/down.

Mike.
Edit, unless the output can be delayed relative to the input which is the equivalent of seeing the future.
 
Good point. That implies an approach that incorporates a time delay.

Is what I am trying to do not that dissimilar from converting a PWM signal to analog?
 
It also implies some kind of memory either analogue or digital. Not the same as PWM as that is effectively just a filter, this is tracking peaks. Maybe one of the analogue guys has an idea.

Mike.
 
Maybe some kind of delay could be implemented after each voltage peak, that decays until the next peak occurs. Obviously, there would be a near instantaneous rise at each leading edge, but that might be an acceptable compromise.

The objective is simply a random "wavering" signal. It does not really need to accurately track the noise peaks. They are just there to provide the randomness.
 
I think you may need something like a "peak detect" VU meter circuit, as used for audio level monitoring?

Or possibly two peak detectors with relatively shorter and longer time constants and average the two outputs?? That seems to somehow fit, but I can't work out the exact result in my head...
 
What about just an RC low-pass filter, used as a running integrator?
Adjust the time-constant to get the desired signal.
 
Sort of like a peak detector mentioned above, set a reference voltage and decay towards the reference voltage instead of decaying towards ground or 0V. The reference voltage could be a slow moving average relative to the incoming data or a fixed reference.

EDIT: ... Or treat each new incoming Peak as a new reference voltage. The Delta or amount of Error from the last value determines the rate in which the previously stored value is updated.
 
Last edited:
I would start with about a 100ms time-constant and go from there.
 
With the 22K load (and no meter, presumably), try either 2.2uF or 4.7uF to start with.
That should be something roughly in that range.
 
OK. That gives me enough info for a few enjoyable hours at the bench.

Just one last thing. I would like to feed the output of the CA3130 into the inverting input of an LM358. Should I just take the signal off between the diode and R3, leaving R3 at 22K connected to ground (with no meter in series)?
 
Here is a "rough draft" Peak tracking circuit that will bump a sample and hold up or down depending on the last value compared to the current value.
Everything to the left of the INPUT is for pseudo signal generation. Depending on your frequency you can adjust the 47k resistors and 10nF caps on the output stage just before the "Peak buffer". You can adjust the Threshold voltage also, but it needs to be something other than 0V.
 

Attachments

  • Peak Tracking.PNG
    Peak Tracking.PNG
    30.5 KB · Views: 194
Should I just take the signal off between the diode and R3, leaving R3 at 22K connected to ground (with no meter in series)?

Yep, that should work fine.

For audio output (?) another series resistor and small cap to ground may improve operation, to smooth out the sharp rising edges each time a new peak occurs; it's likely to be nearer a vertical edge sawtooth at R3.
And / or a lower value resistor in series with the diode, to limit the rising edge speed.
 
Thank you for the brilliant circuit.

If I understand correctly, for simulation purposes, a 250Hz pulse is fed into the "threshold" amp. My random signal is centered around 10Hz, so I will change the filter values accordingly as advised. From the trace at the bottom of the diagram, I can see it gets shifted to 2.47V.

I intend to power the entire circuit with single supply 12VDC. Would LM358's be suitable? I happen to have a lot on hand.

This looks like a good choice for an analog switch IC? https://www.mouser.com/ProductDetail/Analog-Devices/ADG417BNZ?qs=BpaRKvA4VqHUaH0kwDpc4w==

I don't know what the voltages are around the switch as drawn, but could I use something discrete like this?

mosfet_swtich.jpg
 
The 250Hz was just an arbitrary value I used to chop the pseudo signal generation section. In fact all of the frequency values to the left were just arbitrary values to get something that resembled your original image. The 2n4351 may work, but I would be more inclined to use something more suited for analog switching ... 2n5952 ... if you wanted to use descrete components... otherwise the IC would be fine
 
This additional advice is much appreciated. I will order the analog swith IC and start building as soon as it arrives. You didn't address the LM358 question. I understand. People these days think I am joking.
 
Instead of the LM358 I would lean more towards something like a TL072 that has J-FET inputs and is better suited for audio in my opinion.
 
Point noted. But the average pulse rep rate in my original screenshot is 100mS, being sub-audio. Signals composed of random audio frequencies (i.e. noise) are easy to generate. Hence my need expressed here for an ELF equivalent circuit.

Nonetheless, the TL072 has been around long enough for me to have a few survivors clinging to the bottom of my parts bin.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top