What are some techniques for filtering and amplifying pulse signals?

In summary, you can use a series capacitor to amplify pulses and then use a window comparator to compare the pulses and trigger a gate or output when the pulses are lower than a certain threshold.
  • #71
petterg said:
How long does the reset need to be held...


a microsecond should be more than enough

Delay time reset to output is 0.47μs typical. Minimum reset pulse width must be 0.3μs, typical.

http://www.ti.com/lit/ds/symlink/lm555.pdf page 12
 
Engineering news on Phys.org
  • #72
I don't know whether this is relevant here, but I'll mention it. When the topic of 555s comes up, I point out that not all 555s behave the same. So long as you stay within the documented uses and the configurations in the application notes, there is no observed difference. But if you start changing things, inventing new arrangements for trigger & threshold, the differences between manufacturers can become apparent.
 
  • #73
I found this notice in the datasheet for NE555
http://pdf1.alldatasheet.com/datash...3_85UORlHDyRHOIpa/1XXyxeocTlLM+/datasheet.pdf

Applying a negative pulse simultaneously
to the reset terminal (pin 4) and the trigger terminal
(pin 2) during the timing cycle discharges the externalcapacitorand
causes the cycle to start over.The
timing cycle now starts on the positive edge of the
reset pulse.

That is exactly what I experience. All thou it could be written more precise, that the timing cycle starts on negative edge of trigger, so what the notice say occur if reset is released before timeout. And it doesn't matter if the reset and trigger pulses come at the same time or with some delay. While reset is low output is low. While reset is high, output will be high within the timing period. If there is a negative pulse to reset fully within the timing period the output will go low while reset is low, and return to high after the reset pulse. Timing period will start on negative edge og trigger even while reset is low.

Is that behavior unique for NE555 as I don't see anything similar in lm555 datasheet.

Buying a lm555 that is not a ne555 may be a challenge...
 
  • #74
meBigGuy said:
123, 423, etc are retriggerable if that's what you want.

The reset pulse leaves it reset until the next active edge. The spec is right there. 5ns for a 123.
https://www.fairchildsemi.com/ds/74/74VHC123A.pdf

Search for retriggerable monostable or just monostable. There are a ton of parts.

They are mostly edge triggered, as opposed to level triggered. SO, after a reset you need an active edge to trigger again.

I kind of need level triggered. Or edge triggered output, level retriggered timer.
As I don't see anything similar to the notice quoted above, I can assume that behavior does not apply to 74123?
 
  • #75
I kind of have a solution now. I'm sure it won't work in a real circuit thou. The chain of components is: buffer - gain x20 - gain x20 - gain x20 - differentiator - low pass filter - gain x10 / inverting gain x11 - 2x 555 - 2x 555.
What makes this work is that I amplify in several steps to keep the wave form better, and I amplify so much that clipping will occur even for the weakest signal. That made the needed timing for the 555's more stable.

The reason this will not work in a real circuit is that all the amplifications will cause even the tiniest noise to trigger the 555's.
 
  • #76
...I amplify so much that clipping will occur even for the weakest signal...

That's a good technique. It is not uncommon to use two diodes in parallel, opposite directions for a feedback 'resistor' around an inverting opamp. That way you don't saturate the amplifier.
Plain diodes give you a ~ 1/2 volt signal, zeners give whatever you want and it can be made asymmetric that way..


It WILL work in real world. All you need do is remove high frequency noise and that low frequency bias before handing signal to clipper.
 
  • #77
The problem is if there is any inband noise (he has amplified so much the low signal is clipped). I think clipping before low pass filtering is a mistake. I think not using a comparator to feed the logic is also a mistake. But, that's just my opinion. It's easy to sit here and take pot shots.
 
  • #78
Yes, wash the signal of noise then process it.
 
  • #79
I got too optimistic. Positive pulses when offset is positive, and signal is strong, causes permanent high output form the amplifier. (Opposite when both are negative and strong.) Back to the same unsolved problems...
 
  • #80
meBigGuy said:
Maybe it's time to think about an AGC. The AD8336 is a variable gain amplifier (there are others). Here is an app note: http://www.analog.com/static/imported-files/application_notes/AN_934.pdf that shows one implementation.

Here is an application note that talks about the gain control implementation in a TI CODEC chip. : http://www.ti.com/lit/an/snaa028a/snaa028a.pdf It's more of an example of AGC in a general way, although it would provide a nice digital ADC interface.

Do a search for varaible gain amplifier IC and there are a slew of them. You can build a detector that outputs a voltage based on the peak levels and use it to control gain. You just need to decide on the attack and decay times.

See http://www.ti.com/lit/ds/sbos395c/sbos395c.pdf

Repost
 
Last edited by a moderator:
  • #81
AGC is too complex. Using the IC's in the sample circuit will cost $230 for 4 circuits. A MPU with 4 analog inputs will cost $10. I'd rather go with the MPU then.

I would have gone the MPU-way long time ago, it's just that I can't believe that removing something that is so close to a dc cold be this hard.

I would guess signals in wifi, gsm and other digital wireless communication also would need to filter pulse signals. How is it solved there?
 
  • #82
Whatever. A VCA820 is $6. And figure 83 shows an implementation with 2 opamps. I'm not sure why you think this is about "filtering pulse signals". It isn't. It's about a high pass filter, proper gain control, and a window comparator.

As for an MPU
You will need somthing like a 14 bit converter and need to consider the cpu cycles needed to implement your processing. I'd recommend high pass filtering before the adc. I'd implement it in C or MATLAB or something first so I could determine the processing requirements and what amount of analog pre-processing I needed before buying a processor. Make sure your sample rate is enough to get 4 or 5 samples per pulse.

Digital wireless uses A/D converters and dedicated dsp processing. They also have analog AGC and analog I/F filtering.
 
  • #83
I calculated AGC cost for the sample at analog.com. It didn't hit me that TI would be that much cheaper.

I think the MPU code will be simpler than most digital filtering as all it needs to do is to keep track of pulse direction. Basically it must keep track of median voltage for the last 50(?)ms and the average voltage for the last 20us. If the short average is significantly higher than the median there is a positive pulse. If it's significantly lower there's a negative pulse. If no pulse is registered for the last 5ms, signal is lost.
Input must be amplified so that max expected offset is in the range +/-1.7V. That would make the strongest pulse +/-8.5V (clipping to 2.5V) and weakest +/-0.017V. That makes 1024 levels (10bit) for +/-2.5V sufficient.

Anyhow, I got home last night and woke up with a clear mind, which resulted in a retriggerable 555 circuit which seems to work. That makes the differentiator approach come back to life. "Seems" because I can't test it with the rest of the circuit. Turns out that LT spice fail to simulate 2x555 + 6 opamps. 6 opamps + 1 555 = OK. 4 opamps + 2 555 = OK. Once there is one device too much in the sketch - it doesn't even need to be connected to any signal, or the 555's trigger can be connected to V+, the simulation goes on for ever.
 
  • #84
There are lots of agc methods, variable amplifier chips and ways to skin that cat. All receivers have AGC. All decoders normalize amplitudes to some extent. I just looked for a few minutes and found the TI chip. It is way more high performance that what you need (150MHz if I remember correctly). There are probably cheaper solutions also.

As for your MPU solution, you can do the same thing by filtering for a comparator reference level (a window comparator). As I said, " It's about a high pass filter, proper gain control, and a window comparator."
 
  • #85
You seem to take bigger mental steps than I do. (That's my weakness, not yours)

I would have to get my filters working individually with just resistors and capacitors before adding the opamps.

Opamps let's you cascade them without worry about one loading down the one before it.
But the corner frequencies of your individual filters will clean up the hf noise and block the lf, then you can differentiate and limit. You can get those working one at a time to produce desired function without complication of opamps.

Reason I suggest this is I don't understand your DC offsets. Resistors and capacitors don't tend to add offsets.
When you have found frequencies that work you can sharpen slopes by sallen-key or multiple feedback opamp filter topology.

This should be simple - bandpass, differentiate, limit(clip), count.

But I am probably days behind you.

General rule - when things look confusing, back up and simplify them

good luck and keep on experimenting.

old jim
 
  • #86
The problem with differentiation in this problem is that it detects both edges, doesn't it? I never got the need for that part of the solution. Seems like it just creates noise. A positive pulse has positive and negative edges. A negative pulse has positive and negative edges. What am I missing?
 
  • #87
meBigGuy said:
The problem with differentiation in this problem is that it detects both edges, doesn't it? I never got the need for that part of the solution. Seems like it just creates noise. A positive pulse has positive and negative edges. A negative pulse has positive and negative edges. What am I missing?

A positive pulse give a negative pulse, then positive pulse from the differentiator. A negative pulse turns the result the other way around. Thats perfect for triggering a pair of oneshots, one triggered on negative, one triggered on positive, and make sure output from one block the trigger of the other. Hence if the negative pulse comes first, only the negative triggered oneshot will be triggered. I've solved this by having output from one pull the reset on the other. While writing this I realized it would probably be better to stop the trigger signal before it reaches the oneshot input - in particular after I got the retrigger working.
 
  • #88
jim hardy said:
You seem to take bigger mental steps than I do. (That's my weakness, not yours)

I would have to get my filters working individually with just resistors and capacitors before adding the opamps.

I'm thinking filters are dependent on the resistance to ground. Hence dependent on the load. The difference between us is that I have no clue what I'm doing. (You have some clue of what I'm doing.) I'll try your way...
[/QUOTE]
 
  • #89
meBigGuy said:
There are lots of agc methods, variable amplifier chips and ways to skin that cat. All receivers have AGC. All decoders normalize amplitudes to some extent. I just looked for a few minutes and found the TI chip. It is way more high performance that what you need (150MHz if I remember correctly). There are probably cheaper solutions also.

As for your MPU solution, you can do the same thing by filtering for a comparator reference level (a window comparator). As I said, " It's about a high pass filter, proper gain control, and a window comparator."

Use of a comparator requires high pass and gain control to work perfectly. Highpass has not been working so far. I'll give high pass another try.
Comparator would also work if Vref could be dynamic set to the level between pulses = lowpass. But even low pass has not worked out yet. (Thats the idea described in the initial post.)
 
  • #90
meBigGuy said:
The problem with differentiation in this problem is that it detects both edges, doesn't it? I never got the need for that part of the solution. Seems like it just creates noise. A positive pulse has positive and negative edges. A negative pulse has positive and negative edges. What am I missing?

My thought was this:

Thought experiment-
Amplify, filter and limit(clip).
Differentiate.
Ignore negative edges.
Immediately after a positive edge, look at the level of the clipped signal incoming to differentiator.
If that signal is high, then this pulse is a positive one that hasn't expired yet.
If that signal is low, then that pulse was a negative one that has just expired.

Might an edge triggered D flip-flop with clipped pulse for data and differentiated one for clock do it ?

It's immaterial which edge you use, the key is what follows an edge of given direction(up or down) tells you whether the transition was toward or away from zero.
Draw it out on a napkin.

jim
 
  • #91
I'm thinking filters are dependent on the resistance to ground. Hence dependent on the load.

very much so. When you do voltage divider you have to include the load.

With un-amplified r-c filters make the downstream stage Z >10X the one feeding it.

old jim
 
  • #92
I think I'm about to see what happens with the highpass filter (first order):
When tuned to low cutoff frequency (-3dB at 30Hz) it tries to center the output so that average voltage = 0. With a positive square wave, 25% duty cycle, the baseline is pulled down almost 25% of the pulse voltage. So a input pulse from 0mV to 100mv makes a output from -22mV to 77mV.

The higher I set the cut off frequency, the less square is the output pulse. At 1500Hz output show a starting ripple. At 3600Hz the output pulse looks more like the differentiator output. Anything above 5000Hz result in both positive and negative pulse. My goal was to keep the pulse shape, hence I made the filter with extreme low cut off frequency. That was probably the cause of what looked like dc made by highpass.

For the above test pulse was 50us on, 150us off. That equals 5kHz cycle. Tested with square wave generator, not my circuit.

For triangle pulse the pulse shape is kept a lot better, but the "flat" area between goes down half a pulse amplitude.

I guess the differentiator can double as highpass, and not worry about that part any more.


Lowpass (first order) keeps the pulse shape while cutoff is higher than 30kHz.
 
  • #93
When tuned to low cutoff frequency (-3dB at 30Hz) it tries to center the output so that average voltage = 0.

sure, it has to.
High pass can't pass on the DC , so it'll have zero average output.
If its time constant is short compared with your pulse width you'll see the pulse edges as spikes of opposite polarity. That's differentiation.
Longer its time constant, the more your output will look like the input but centered about zero.

I still don't know what your input looks like. Does it really have 25% duty cycle?

but I suspect you're making good strides here by experimenting with time constants in your filters.
Keep at it until it becomes intuitive.
A high pass that's real slow compared to your pulse width should just move you to a zero centered wave, ie block that low frequency sinewave.
A low pass that's fast compared to your pulse width should remove higher frequency noise.
A differentiator can be a simple RC high pass that's got a time constant just a few(maybe 5- 10)% of your pulse width.

Have fun !

Even at my age it's still fun to learn...
at Goodwill this afternoon I found an antique General Radio 650 impedance bridge and bought it just to learn how the guys in 1930's made precision measurements of inductance and capacitance.
Found instruction manual online, looks very cool !
I should learn some really good basics from it.
GR650A1s.jpg

picture courtesy this guy: http://www.prc68.com/I/GR650A.shtml


old jim
 
  • #94
Seems like the combination of differentiator and level retriggered 555 is an excellent filter!

The attached graphics shows the input in red. That is a signal of negative pulses of amplitude 2.3mV with an offset of +0.4mV, added with quite a bit of random noise. The green is the (inverted) signal to trigger one of the 555's, devided by 100 to scale somewhat similar to the input.
The negative pulses are correctly detected, with two false spikes. As the 555 starts the timer when the trigger signal is lost, it's output won't be affected by the spikes. The pair of 555's will (in theory) be triggered by the level that lasts longest - in other words not the pulses, but the flat area between.

I have no clue how much noise there will be around the circuit. Here I just added so much that I was sure I could not tell anything about the input signal from watching the input+noise.

What fails is to leave both 555's unactive when there is no signal (including no noise). Maybe there's a need for separate circuit to detect "no signal"?
 

Attachments

  • noise.png
    noise.png
    24.5 KB · Views: 463
  • #95
jim hardy said:
I still don't know what your input looks like. Does it really have 25% duty cycle?

Input is the derivation of the sawtooth generator you helped with before this thread, including a massive loss. What decides the duty cycle is the rise- / fall time factor of the sawtooth. It seems to be possible to push it to a better factor with a 5ohm resistor in series with the output, but my resistors (10x 47ohm i parallel) burned within seconds, so I need to wait for a delivery of some 50w resistors to really know if it will improve or not.

jim hardy said:
but I suspect you're making good strides here by experimenting with time constants in your filters.
Keep at it until it becomes intuitive.

By then I'll be far past your age ;)

jim hardy said:
A high pass that's real slow compared to your pulse width should just move you to a zero centered wave, ie block that low frequency sinewave.
A low pass that's fast compared to your pulse width should remove higher frequency noise.
A differentiator can be a simple RC high pass that's got a time constant just a few(maybe 5- 10)% of your pulse width.

Sounds like something similar to what I found.

jim hardy said:
an antique General Radio 650 impedance bridge

Looks like a nice toy!
 
  • #96
petterg said:
Maybe there's a need for separate circuit to detect "no signal"?

Is there a trick to stop signals less than a certain level from Vref from pulling the opamp in any direction? (Kind of opposite of putting two diodes between the opamp input.)
 
  • #97
petterg said:
Maybe there's a need for separate circuit to detect "no signal"? ...


I've seen that trick in telephony IC's.


Is there a trick to stop signals less than a certain level from Vref from pulling the opamp in any direction? (Kind of opposite of putting two diodes between the opamp input.)

A switch across a feedback resistor to drive gain to zero will do it. CMOS analog switch works okay, but big-guy is probably more fluent than I am as to current parts and technique.
hard part is deciding what's zero signal. Quiet differentiator output ?

Thanks for that picture of input - wow if you're pulling a signal out of that mess you are doing quite well. Impressive.

Is your impulse string regular enough you could phase-lock to it? In other words does input have a reasonably stable frequency? Do a quick read on 'synchronous demodulation', which somebody mentioned earlier. AD630 I think is the industry workhorse chip for that. LM567 is sometimes handy - it gives you a logic level output when it sees input in its frequency range, and is real simple to use.
 
  • #98
I think I'm too dumb to see how a PLL would be useful here (or how to hook it up in a useful way).

Drive feedback resistance to 0, wouldn't that make a voltage follower? A follower would then output the same error as input. That would make the need to do the same on each opamp. I was thinking more like pulling the input towards vgnd if it was close to vgnd. Maybe that won't be enough to keep output from the other opamps =vgnd?
(I don't know how to implement this thou)
 
  • #99
petterg said:
...
Drive feedback resistance to 0, wouldn't that make a voltage follower? A follower would then output the same error as input. That would make the need to do the same on each opamp. I was thinking more like pulling the input towards vgnd if it was close to vgnd. Maybe that won't be enough to keep output from the other opamps =vgnd?
(I don't know how to implement this thou)

You're far from dumb and doing fine with filters and don't need the distraction of pll's right now. My bad.

Inverting opamp gain = Rfb/Rin, so Rfb=zero gives zero gain
Indeed for a noninverting follower minimum gain = 1.


A question well stated is half answered.
For just detecting inactivity ask yourself "What is condition of signal where I declare it not present?"

Are you familiar with National appnote AN-31, a handy collection of opamp circuits? http://www.ti.com/ww/en/bobpease/assets/AN-31.pdf

it dates back to around 1970 so a lot of the opamps are really old ones, feel free to insert modern ones.

old jim




old jim
 
  • #100
When you mention pll, I'm sure it's a good idea. I'm just not capable (too dumb) to see it.

Also I forgot that gain can be <1 when inverting.

So a switch then, to make gain=0 when no signal is comming. Could the switch just be a pair of transistors? (One to open when positive signal level, one to open when negative signal level?) Or would one of the circuits on page 5 in AN-31 be better?

And wouldn't such a switch give a full new way to look at the circuit? One opamp has a switch that makes gain=0 when input level is negative, the other makes gain=0 when input level is positive. Wouldn't that make it posible to drop everything else in the circuit?

jim hardy said:
"What is condition of signal where I declare it not present?"

When it's so weak that pulses cannot be detected. Originally I was thinking of that as when the input, after amplification still did not have the level required to trigger the oneshots. With the approach of using clipping to an advantage that won't happen. Any tiny bit of noise will be enough to trigger, unless there is a strong enough signal to control that. Maybe the trigger level can be adjusted so that level near clipping is required to trigger, and adjust gain so that minimum signal is just enough to get past that level?
 
  • #101
I'm on a new approach to this. What I have now is two outputs, one in the range Pp=[0;2]V, the other in the range Pn=[-2;0]V. If abs(Pp) > abs(Pn) the pulse is positive, if If abs(Pp) < abs(Pn) the pulse is negative. If abs(Pp)+abs(Pn) < X the signal is too weak to be considered valid.

I haven't decided on the value of X yet, but the plan is to build the validity check by connecting Pn to an opamps negative input, Pp to the positive input, and tune gain so that a diode on the output will give signal only if signal is valid.

The new challenge: How to make a comparator for the absolute values? I'm thinking the output of the comparator could be +2.5V if Pp is the larger, or -2.5V is Pn is the larger.
 
  • #102
I think I would use a second comparator for Pp-Pn > X where X is set by a pot, or maybe even dynamically. You need an amp to create Pp-Pn, which you may also want to condition. I wouldn't try to gather so many functions into one amp.
 
  • #103
Into one? I'm trying to not exceed 2 quad.
Attached is sketch of the comparator. Basically it compares both inputs to vgnd, lowpass filter and summarize. It works quite well. If signal becomes too weak it starts oscillating the output, hence I don't need a validity signal. However, if signal becomes too strong it gives a random output... But here is a workaround: I theory the signal will never reach the strongest level on one of the sides. If that turns out to be real signal may be compared to some voltage a little bit off vgnd.

I'll let this project rest until the high power resistors arrive so I can power up the sending circuit. According to schedule they'll arrive on Wednesday. (And I might not be traveling next week)
 

Attachments

  • comparator.png
    comparator.png
    2.1 KB · Views: 486
  • #104
I've hung back - felt I was confusing more than helping, plus got busy with some pressing projects.

I thought you were close with your filters

What does this thing do? Are you building a communication system, or trying to decode some existing signal?

Frequency modulation/demodulation is mighty easy with IC's of the 1980's,

AD630 datasheet shows examples of picking signal out of noise with synchronous detection

and amateur radio buffs have used frequency shift keying for over fifty years
 
  • #105
Just that I don't understand all your cleaver ideas doesn't mean your confusing :)

Removing noise turned out ok. Removing that drifting offset never really worked out without destroying the signal. My new approach is positive and negative peak detection then comparing the peak levels. It seems to be working as long as at least one of the peak detectors doesn't clip. Also there's some rippel on the peak detectors output. When signal is weak this rippel can make the output level of the two peak detectors to cross, which makes the comparators output oscillate. I think it is working within the voltage range needed.

The circuit is supposed to signal to a mpu if the received signal is the sent signal, or the inverted. (Or no (too weak) signal.) Signal is not modulated, all thou I've been looking into modulations thinking that it might come handy. Phase shift modulation of a pulse train seemed to be the most suitable. That phase shifts 180 degrees every time there is a transaction from 0 to 1 or 1 to 0 is easy to understand. But how do the receiver know, when powered on, if the current signal caries a 0 or a 1?

Attached is the sketch of my retriggerabel dual 555 with triggerblock. One of the 555's is (re)triggered continuously while input is higher than about 2*Vcc/3, the other is (re)triggered when input is lower than about Vcc/3. While the output of one 555 is high, the other is blocked from triggering. It might be useful if anyone else need something similar from a 555.
 

Attachments

  • 555-retrigger-triggerblock.png
    555-retrigger-triggerblock.png
    6 KB · Views: 504

Similar threads

Replies
20
Views
1K
Replies
19
Views
2K
  • Electrical Engineering
Replies
29
Views
3K
  • Biology and Medical
Replies
6
Views
415
  • Electrical Engineering
Replies
10
Views
2K
Replies
47
Views
3K
Replies
2
Views
2K
  • Electrical Engineering
Replies
6
Views
1K
Replies
3
Views
4K
  • Electrical Engineering
Replies
1
Views
3K
Back
Top