Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:35 29 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : low pass filter

     Page 1 of 3    
Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2134
Posted: 08:18pm 26 Mar 2023
Copy link to clipboard 
Print this post

 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2134
Posted: 08:26pm 26 Mar 2023
Copy link to clipboard 
Print this post

oops. My question -- is the vga sound low pass circuit only for vga or can it be used with non vgaa pico mite.
It's simpler than the non vga low pass circuit, no chokes.. just ordered 10 and just one preferred value cap.

 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 08:50pm 26 Mar 2023
Copy link to clipboard 
Print this post

It can be used for either.

I believe that once updated both manuals will show the same filter with the inductor/choke as that is a better quality filter.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 09:08pm 26 Mar 2023
Copy link to clipboard 
Print this post

The filter shown above will work, but the output shouldn't be fed into a modern amp with good speakers. You are ok with 32R headphones or most cheap desktop speakers (probably). It has pretty poor performance.

The 1k / 47nF combination extracts the audio from the PWM. The other two resistors merely halve the output level.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 03:12am 27 Mar 2023
Copy link to clipboard 
Print this post

Due to RC filters in the input and in the feedback circuits most modern amplifiers that I have seen usually have an upper frequency roll off beginning at a bit over 20kHz (not all though). That would add another two stages of RC filter to the one shown above. I honestly don't believe that much 44kHz would reach the tweeters in a modern HiFi system.

My calculations show that the corner frequency of that filter above is around 3.4kHz. For most applications I believe that is adequate.

Having said that my father used to say that 'if a job is worth doing it's worth doing well'. For that reason I applaud the efforts of Volhout and matherp in trying to design a more ideal filter. It should make those with 'golden ears' happy.

I also believe in 'horses for courses' and, as I personally cannot hear much beyond 5kHz, anything more than that is just a waste of effort.

There are sites on the web you can use to test the frequency response of your hearing. Try it, you may be surprised.

Bill
Keep safe. Live long and prosper.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 07:10am 27 Mar 2023
Copy link to clipboard 
Print this post

There's not a lot of point, from an audio perspective, in being 3dB down at less than about 10kHz. Not many adults can hear fundamentals above that even if they think they can. However there are harmonics there that add additional "air" to the sound, particularly on percussive instruments such as triangles and cymbals.

This isn't about what you can hear though, it's about what you can't hear. I was surprised to find that many modern amps are pretty flat up to about 100kHz. They don't have to be expensive to achieve that. Even the LM4871has only dropped from a gain of 50dB at 10kHz to 40dB at 60kHz. That 40kHz is a real sound and is really driving the output devices in the amp, and heating them up as they shove unwanted power into the load. Just because no-one can hear it doesn't mean that it isn't there. It's like the RF oscillations that can burn big MOSFETs out if you don't put a gate resistor on them, but not quite as extreme.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 07:51am 27 Mar 2023
Copy link to clipboard 
Print this post

I would be happy with a two stage RC filter at around 5kHz. If anyone wants to roll their own RC low pass filter I have made a small spreadsheet that will help.



Starting with about 220R (about the min. load resistor that you would want to use) a capacitor to give you the frequency that you want. Adjust the resistor if needed. Add a second resistor in series with the original. Make it 10 times the value of the first one so that there will be little interaction. Then add a second capacitor to 0v 10 times smaller than the first one. Finish up with a resistor divider to give you the output voltage you desire. Done.

I found that 330R with 0.1uF followed by 3300R and 0.01uF will give me what I want. 4.8kHz.

If anyone wants a copy of the spreadsheet I can upload it here. It's in LibreOffice .ods format but I believe Excel can cope with that.

Bill
Keep safe. Live long and prosper.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3816
Posted: 09:51am 27 Mar 2023
Copy link to clipboard 
Print this post

  Turbo46 said  I found that 330R with 0.1uF followed by 3300R and 0.01uF will give me what I want. 4.8kHz.

How much of the 40kHz / 44kHz is still there after that?

John
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 09:58am 27 Mar 2023
Copy link to clipboard 
Print this post

I’m sorry John, I don’t know and I don’t really care. Somebody who does care may be able to help if you really need to know.

Bill
Keep safe. Live long and prosper.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4254
Posted: 10:21am 27 Mar 2023
Copy link to clipboard 
Print this post




Residual 44kHz is 38dB down, so roughly 50mVpp

Note that your calculation for a single stage RC filter gives you -3dB at 4.6kHz. Chaining 2 stages will be -6dB at 4.6kHz (also shown in above graph).

Numbers say nothing. When you are happy with the result, that is what counts.

Volhout
Edited 2023-03-27 20:26 by Volhout
PicomiteVGA PETSCII ROBOTS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3816
Posted: 10:56am 27 Mar 2023
Copy link to clipboard 
Print this post

Thanks.

John
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1115
Posted: 11:44am 27 Mar 2023
Copy link to clipboard 
Print this post

  stanleyella said  oops. My question -- is the vga sound low pass circuit only for vga or can it be used with non vgaa pico mite.
It's simpler than the non vga low pass circuit, no chokes.. just ordered 10 and just one preferred value cap.



To be on the safe side, I connected an additional 10uF Capacitor in series to the headphone/Line output to eliminate the DC component.
Edited 2023-03-27 21:46 by Martin H.
'no comment
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 12:06pm 27 Mar 2023
Copy link to clipboard 
Print this post

If you are feeding an amplifier you could probably go down to 2.2uF rather than 10. If you want headphone output then 100uF would be much better.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2134
Posted: 02:30pm 27 Mar 2023
Copy link to clipboard 
Print this post

The remaining 44kHz not filtered is still a signal that needs amplifying.
This can overload the amp and then the amp adds inaudible harmonic distortion.
I've had tweeters blow.
At our age we remember before computers, people wasted their money on "hi-fi".
OK there were "white" goods and 3 piece suites but that's different. Remember lava lamps.
I remember building speakers in the 90's with speaker box designer but that needed Theile and Small parameters, resonant freq, Q and Vas but most speakers don't give this info and it's hard to measure yourself.
I still got a stereo,2 wharfdale diamond IV, Sansui amp.. with "super feed forward" connected to the tv for input. There's a 2TB usb hd connected to the tv and that's got all my music on it in mp3. Not hi-fi but sounds loud and clear and bassy.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 10:08pm 27 Mar 2023
Copy link to clipboard 
Print this post

  Quote  Residual 44kHz is 38dB down, so roughly 50mVpp

So roughly 20mV RMS.

  Quote  The remaining 44kHz not filtered is still a signal that needs amplifying.
This can overload the amp and then the amp adds inaudible harmonic distortion.
I've had tweeters blow.

  Quote  It's like the RF oscillations that can burn big MOSFETs out if you don't put a gate resistor on them

Seriously?
20mV at 44.1kHz can do all that?

Bill
Keep safe. Live long and prosper.
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1115
Posted: 05:49am 28 Mar 2023
Copy link to clipboard 
Print this post

  stanleyella said  The remaining 44kHz not filtered is still a signal that needs amplifying.
This can overload the amp and then the amp adds inaudible harmonic distortion.

44Kilohertz is the sample rate, i.e. the carrier frequency of the audio signal. The usable audio signal can only have a maximum of half the sample rate
To smooth Signal, the Lowpass should be at around 18 to 20 Kilohertz (half the sample rate).
In this range are frequencies that only children, cats and dogs can hear.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4254
Posted: 06:21am 28 Mar 2023
Copy link to clipboard 
Print this post

The issue with 44kHz is you can't hear it, and the amplitude is always the same. So when you play audio from a WAV file, or, to lesser extend, play sound at low volume, you may be tepted to increase the volume of a connected hifi system. And that could damage tweeters.

44khz is the carrier, the sound is the modulation.

Volhout
PicomiteVGA PETSCII ROBOTS
 
ville56
Regular Member

Joined: 08/06/2022
Location: Austria
Posts: 96
Posted: 04:34pm 28 Mar 2023
Copy link to clipboard 
Print this post

Would it be a possibility to add a RC notch filter centered at 44 kHz before the lowpass filter? Probably there would be the need for "mild" adjustment of the notch frequency. There are a some RC circuits around on the web, but i don't know which one can be made adjustible easily.
What is the experts opinion on that?

Reagrds,
Gerald
                                                                 
73 de OE1HGA, Gerald
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2134
Posted: 05:09pm 28 Mar 2023
Copy link to clipboard 
Print this post

I just built the low pass filter and there's a 1 per second clicking with this code
for c=50 to 1000
play tone c,1050-c,5
pause 5
next c
Edited 2023-03-29 03:14 by stanleyella
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1115
Posted: 06:58pm 28 Mar 2023
Copy link to clipboard 
Print this post

Gerald,
here you find some useful background informations:
low pass filter a pwm signal into an analog voltage
in the example they use a 100kHz PWM carrier frequenz.
So they create at first a 50Khz Lowpass. Should be nor big deal to recalculate the L R and C values for our 44kHz carrier.
Edited 2023-03-29 05:02 by Martin H.
'no comment
 
     Page 1 of 3    
Print this page
© JAQ Software 2024