What are some techniques for filtering and amplifying pulse signals?

  • Thread starter Thread starter petterg
  • Start date Start date
  • Tags Tags
    Pulse Signals
Click For Summary
The discussion focuses on techniques for filtering and amplifying weak pulse signals mixed with low-frequency sine waves, specifically for microcontroller input. A high-pass filter (HPF) is suggested to amplify the pulses without boosting the sine wave, but challenges arise as filtering tends to weaken the pulses. The proposed solution involves using parallel circuits with an op-amp for both filtering and maintaining signal integrity, but achieving equal gain in both paths proves difficult. Dynamic trigger levels for comparators are also discussed, with suggestions for automatic gain control to adapt to varying signal amplitudes. The conversation emphasizes the complexity of filter design and the need for careful circuit adjustments to achieve the desired outcomes.
  • #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
 
Engineering news on Phys.org
  • #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: 527
  • #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: 548
  • #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: 563

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
Replies
20
Views
2K
Replies
19
Views
2K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
13
Views
3K
Replies
2
Views
3K
  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K