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.

Bandpass Filter for Sawtooth wave

Status
Not open for further replies.

simply_me

New Member
Hello,

I've a bandpass filter centered at 40kHz. The filter is working nice when I send it a sinusoid/square wave/triangle wave, but when it receives the actual signal that I need it to filter which is a sawtooth wave the filter converts it to a triangular wave (which is part of the reason I'm using a filter) but it cuts the frequency by half. In turn, my transmitter filters the 20kHz signal. Does someone know how to modify the bandpass filter to receive a 40kHz output?

Thank you.
 
Without seeing your schematic and without knowing which parts you used for the filter then we know nothing about your circuit.
Please post your schematic showing its part numbers and supply voltages.
 
So what's the difference between the signal you send to the filter and the "actual signal".

It's difficult to know how to modify your filter when we have no information on the filter you built. Post a schematic.
 
Hi,

Sorry about that.
Please review the attached files.
I've attached schematics of the filter and a picture of the incoming sawtooth wave from the linear ramp.
In the mean time, I've added an LC before the filter to covert the sawtooth. The resulting wave is ok, but I dont think that the filter is centered around 40kHz anymore. I'm trying to design a 39-41kHz filter.
 

Attachments

  • Design2.pdf
    17.5 KB · Views: 306
  • IMG_1713[1].JPG
    IMG_1713[1].JPG
    386.4 KB · Views: 439
  • Design2.zip
    141.3 KB · Views: 157
The output of a lousy old LM358 has trouble producing frequencies higher than only 5kHz. It also has a low gain at 40kHz. Use a faster opamp like a TL071.
Your ZIP file has errors and does not unzip.
 
ahhmmm.....I just unziped it on my computer. I'll try to attach it again.
 

Attachments

  • Design2.zip
    141.3 KB · Views: 149
Last edited:
Hello,


What is the amplitude of the input, and what amplitude output do you need?
 
Hi,

As you can see from the input wave picture, Vpp=5.4V with center frequency of 40kHz (but it is a linear ramp so varies +-1kHz).
That being said, I need to filter the incoming wave a little and convert it to a sinusoid (if possible). The output amplitude-- the higher the better as long as it's in the frequency range. I'm using it for my ultrasonic range finder.
 
Last edited:
Hi again,


Ok, then it very well could be as audioguru says, that the LM358 is limited the output slew rate so that it can not follow the sine wave, even though it is trying to as hard as it can.
The LM358 slew is not very fast, so if you try to get higher output than a certain level it will turn into a triangle wave. The triangle wave results from the amp not being able to slew fast enough to produce a sine wave so it ends up slewing as fast as it can and that ends up being a triangle wave.
The slew rate for the LM358 will limit the usable output to about 1vpeak at 70kHz, after which it will start to distort until it becomes a triangle. At half that frequency you might get up to 2vpeak

The solution is either to get a faster op amp or to try to limit the output to a lower level so it can keep up. You didnt mention what kind of output you are looking for so i cant comment if it will work or not, but if you lower the input signal it should start to look like a sine wave again. If it does in fact do this, that shows for sure it's the slew rate (most likely it's that anyway though).

Just wondering too, what is that inductor and 2.2uf cap doing? Is that a pre filter to limit in band signals to some reasonable value?
It is certainly not tuned close to 40kHz.

Also, let us know what vpeak output you need.
 
Last edited:
Hi,

I appreciate the input. The frequency isn't close to 70kHz as my target frequency is 40kHz. It works okay with the inductor-capacitor frequency wise, the inductor capacitor series "rounds" up the edges of the sawtooth wave so after the filter it looks almost sinusoidal. To be honest, I don't think it matters that much if I'm transmitting a triangle or a sinusoid. Vpp of the output should be as high as possible and in sinusoid waveform (ideally). The wave itself goes to the transmitter afterward, and I thought that sinusoidal wave absorbs less noise (the wave is w/o harmonics) so it'll be easier to detect in the receiving end.
I'm trying to design the filter a very narrow bandpass filter for this, without much success so far. Another problem is that I don't know where I can find the TL071 in such a short notice, I'm not sure the stock room in my school carries it.
 
Last edited:
Thank you!
The simulated filter with a TL082 in multisim is attached.
I think this waveform is good enough for me, only if I could make it more narrowband (39-41kHz). Any suggestions?
I've attached the schematics in .png and in .zip (for multisim).
 

Attachments

  • bode.png
    bode.png
    306.4 KB · Views: 337
  • TL082.png
    TL082.png
    413.8 KB · Views: 452
  • Design3.zip
    736.9 KB · Views: 184
A TL071 is a single low noise opamp. A TL082 is a dual opamp using the same opamp for both but not selected for low noise.

Look in Google for tutorials about how to design a Multiple Feedback Bandpass Filter to narrow the bandwidth.

Why do yo bother to zip your files?
I get this error when I try to unzip your files:
 

Attachments

  • Winzip error.PNG
    Winzip error.PNG
    10.1 KB · Views: 183
Can't you see that the output of the filter is clipping like crazy because the input level is way too high?
 

Attachments

  • clipping.PNG
    clipping.PNG
    6.3 KB · Views: 231
Hi,

I appreciate the input. The frequency isn't close to 70kHz as my target frequency is 40kHz. It works okay with the inductor-capacitor frequency wise, the inductor capacitor series "rounds" up the edges of the sawtooth wave so after the filter it looks almost sinusoidal. To be honest, I don't think it matters that much if I'm transmitting a triangle or a sinusoid. Vpp of the output should be as high as possible and in sinusoid waveform (ideally). The wave itself goes to the transmitter afterward, and I thought that sinusoidal wave absorbs less noise (the wave is w/o harmonics) so it'll be easier to detect in the receiving end.
I'm trying to design the filter a very narrow bandpass filter for this, without much success so far. Another problem is that I don't know where I can find the TL071 in such a short notice, I'm not sure the stock room in my school carries it.


Hi again,

Your signal does not have to be near 70kHz to be a problem if the amplitude is too high to work with the LM358 and it's slew rate. Even 20kHz could be too high if you are asking for an output that is too high to slew properly with a sine wave. That's why i keep asking you what output amplitude you need. If you state exactly how much amplitude you need on the output i can help more here. Whether or not this works as is depends not only on the frequency, but also on the OUTPUT amplitude.
Based on the design as presented by your schematic, the circuit is trying for too much gain at the desired frequency so the output will not be able to slew properly. This could be an oversight so i ask how much output you really need. If you need something like 5v peak then the LM358 definitely will not work.

For example, with an input sawtooth that is only 0.5v high (instead of 5v) you may see a nice clean sine wave output even with the circuit you are using now with the LM358. Of course the output will be reduced also. It's a matter not only of frequency, but also of output amplitude. Do you understand this now?

About narrowing the bandwidth...
Another thing that would help is if you tuned the input LC filter a little better working it in more carefully with the overall design.
 
Last edited:
@MrAl, thank you for the explanation I understand it better now. Since the signal is going to be transmitted I need to maximize the output. I'll be using the TL082, and I'll try to modify the LC series.
@AudioGuru, I see that it is clipping, but I rather have clipping than lower Vp. About the attachments, I'm using PowerArchiver, and it opens them fine when I click on the links. I'll try to figure it out.
 
Last edited:
clipping produces a lot of harmonics that mess up the bandpass filter.
Your zipped file appears to be a Multisim file but I don't have Multisim program so maybe that is why I can't unzip it.
 
Hi AudioGuru,

Do you think it is possible to build such narrow bandpass filter that will also convert the sawtooth to a sinusoid? I don't know if I should spend time trying to eliminate the clipping because I dont think that the filter is centered at 40Khz nor has a narrow band around it.
I think it should at least open the .zip file and show you what files are compressed, if you dont have the supporting software for the files you won't be able to open them, naturally.
 
Hi,

Your op amp circuit does have a narrow passband near 40kHz, i dont think that's something you have to worry about just yet. You have to fix the other problems first.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top