2113 views|18 replies

688

Posts

0

Resources
The OP
 

RC Filtering [Copy link]

 
 

RC filter The time constant of this RC filter is related to the resistance value of the capacitor and the resistor. If the setting is 10K, 2.2μF, the time constant is calculated to be 0.022s. Is the delay time a bit long?

Will it cause a delay in lighting if the analog dimming pin of the LED chip is used?

Latest reply

Regarding filter circuits, gmchen has published several articles in this forum. If you have time, I suggest you read them carefully.   Details Published on 2022-10-7 21:15
 
 

2w

Posts

0

Resources
2
 

"Isn't the delay a bit long?"

First of all, this is not a delay time. The RC low-pass time constant only means that after such a long time, the voltage across C drops to 37% of the original value, that is, 1/e (if it is originally charged to a certain value, the input terminal is short-circuited at time zero). Of course, the charging process is also calculated in this way.

 
 
 

2w

Posts

0

Resources
3
 

"Isn't the delay a bit long?"

How long it will take depends on your requirements.

 
 
 

2w

Posts

0

Resources
4
 

"Will it cause a delay in lighting if I use it on the analog dimming pin of the LED chip?"

22ms, can your eyes react that fast?

Comments

For example, if the voltage I input before is 5V, which is a 0 to 5V PWM square wave, then the time for the voltage to go from 0 to 5V should be about 5 times the time constant, which is about 0.1s. I want to use this resistor and capacitor to make the voltage into a smooth DC. Are 10K and 2.2μF suitable? I simulated it.  Details Published on 2022-10-2 20:57
 
 
 

688

Posts

0

Resources
5
 
maychang posted on 2022-10-2 18:29 "Will it cause a delay in lighting if the analog dimming pin of the LED chip is used?" 22ms, can your eyes react that fast?

For example, the voltage I input before is 5V, which is a 0 to 5V PWM square wave. Then the time for the voltage to change from 0 to 5V should be about 5 times the time constant, which is about 0.1s. I want to use this resistor and capacitor to make the voltage into a smooth DC. Are 10K and 2.2μF suitable? I simulated it and it seems OK.

Comments

"For example, if the voltage I input earlier is 5V, and it is a 0 to 5V PWM square wave, then the time for the voltage to go from 0 to 5V should be about 5 times the time constant, which is about 0.1s." As you said, the duration of the high level of your PWM square wave must be more than 0.1s to make the voltage across the capacitor rise.  Details Published on 2022-10-2 21:19
"For example, if the voltage I input earlier is 5V, and it is a 0 to 5V PWM square wave, then the time for the voltage to go from 0 to 5V should be about 5 times the time constant, which is about 0.1s." As you said, the duration of the high level of your PWM square wave must be more than 0.1s to make the voltage across the capacitor rise.  Details Published on 2022-10-2 21:17
 
 
 

2w

Posts

0

Resources
6
 
小太阳yy posted on 2022-10-2 20:57 For example, if the voltage I input before is 5V, it is a 0 to 5V PWM square wave, then the time for this voltage to go from 0 to 5V should be about 5 times the time constant, ...

"For example, if the voltage I input earlier is 5V, and it is a 0 to 5V PWM square wave, then the time for the voltage to go from 0 to 5V should be about 5 times the time constant, which is about 0.1s."

As you said, the high level duration of your PWM square wave must be more than 0.1s to make the voltage across the capacitor rise to close to 5V.

 
 
 

2w

Posts

0

Resources
7
 
小太阳yy posted on 2022-10-2 20:57 For example, if the voltage I input before is 5V, it is a 0 to 5V PWM square wave, then the time for this voltage to go from 0 to 5V should be about 5 times the time constant, ...

"I want to use this resistor and capacitor to make the voltage into a smooth DC. Are 10K and 2.2μF suitable?"

What is your PWM frequency? If the period is 0.2s (as you said), that is, the frequency is 5Hz, this time constant is far from enough. If the PWM frequency is 1kHz, this time constant is enough.

Comments

Doesn't it say that the high level duration should be more than 0.1S? If the PWM frequency is 1KHZ, one cycle is only 0.001S, then the high level time must be less than 0.1S, right?  Details Published on 2022-10-2 21:33
 
 
 

688

Posts

0

Resources
8
 
maychang posted on 2022-10-2 21:19 "I want to use this resistor and capacitor to make the voltage into a smooth DC. Are 10K and 2.2μF suitable?" What is your PWM frequency? If...

Doesn't it say that the high level duration should be more than 0.1S? If the PWM frequency is 1KHZ, one cycle is only 0.001S, then the high level time must be less than 0.1S, right?

Comments

"Doesn't it say above that the high level duration must be more than 0.1s? If the PWM frequency is 1KHZ, one cycle is only 0.001s, so the high level time must be less than 0.1s, right?" "The high level duration must be more than 0.1s". That's what you said, not me.  Details Published on 2022-10-5 11:37
"Doesn't it say above that the high level duration must be more than 0.1s? If the PWM frequency is 1KHZ, one cycle is only 0.001s, so the high level time must be less than 0.1s, right?" "The high level duration must be more than 0.1s". That's what you said, not me.  Details Published on 2022-10-3 08:09
"Doesn't it say above that the high level duration must be more than 0.1s? If the PWM frequency is 1KHZ, one cycle is only 0.001s, so the high level time must be less than 0.1s, right?" "The high level duration must be more than 0.1s". That's what you said, not me.  Details Published on 2022-10-3 08:07
 
 
 

2w

Posts

0

Resources
9
 
小太阳yy posted on 2022-10-2 21:33 Doesn't it say that the high level duration should be above 0.1S? If the PWM frequency is 1KHZ, one cycle is only 0.001S, then the high level time must be 0. ...

"Doesn't it say that the high level duration must be more than 0.1S? If the PWM frequency is 1KHZ, one cycle is only 0.001S, so the high level duration must be less than 0.1S, right?"

"The high level duration should be longer than 0.1s" is what you said, not me.

 
 
 

2w

Posts

0

Resources
10
 
小太阳yy posted on 2022-10-2 21:33 Doesn't it say that the high level duration should be above 0.1S? If the PWM frequency is 1KHZ, one cycle is only 0.001S, then the high level time must be 0. ...

"Doesn't it say that the high level duration must be more than 0.1S? If the PWM frequency is 1KHZ, one cycle is only 0.001S, so the high level duration must be less than 0.1S, right?"

The frequency is 1kHz, that is, the period is 1ms. Obviously, the high level duration is less than 1ms, not to mention 1s.

 
 
 

538

Posts

1

Resources
11
 
It depends on your PWM frequency. If the frequency is higher than 50Hz, dimming may not be possible. That's how I understand it. Because it's too fast and there's no way to control the output waveform.
 
 
 

2w

Posts

0

Resources
12
 
小太阳yy posted on 2022-10-2 21:33 Doesn't it say that the high level duration should be above 0.1S? If the PWM frequency is 1KHZ, one cycle is only 0.001S, then the high level time must be 0. ...

You may not have figured out what low-pass "filtering" is for.

The first circuit is a first-order low-pass RC filter circuit. Given the values of resistors and capacitors, the higher the frequency of the input signal (the faster it changes), the less likely it is to cause fluctuations at the output. The capacitor C has not yet been charged by the resistor R, and it has only been charged a little bit before it begins to discharge. The AC voltage across the capacitor C must be very small. This is exactly the purpose of our "filtering".

We do not want to fully charge capacitor C and then discharge it to zero. In that case, the voltage fluctuation on capacitor C will obviously be very large, almost the same as the fluctuation at the input end, and the purpose of "filtering" will be lost.

Comments

Teacher, I want to use this circuit to convert the PWM square wave into a smooth DC voltage and do a digital-to-analog conversion. In this case, should the high level time of the PWM square wave be higher than the charging time?  Details Published on 2022-10-7 17:46
 
 
 

688

Posts

0

Resources
13
 
maychang posted on 2022-10-5 11:37 You may not have figured out what low-pass "filtering" is for. The first post circuit is a first-order low-pass RC filter circuit. The number of resistors and capacitors...

Teacher, I want to use this circuit to convert the PWM square wave into a smooth DC voltage and do a digital-to-analog conversion. In this case, should the high level time of the PWM square wave be higher than the charging time?

Comments

On the contrary. The RC low-pass filter should make the RC time constant much longer than the PWM cycle. In your words, the PWM high-level time and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor. Obviously, the high-level and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor, so the capacitor can only be charged a little.  Details Published on 2022-10-7 21:15
On the contrary. The RC low-pass filter should make the RC time constant much longer than the PWM cycle. In your words, the PWM high-level time and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor. Obviously, the high-level and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor, so the capacitor can only be charged a little.  Details Published on 2022-10-7 21:14
On the contrary. The RC low-pass filter should make the RC time constant much longer than the PWM cycle. In your words, the PWM high-level time and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor. Obviously, the high-level and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor, so the capacitor can only be charged a little.  Details Published on 2022-10-7 18:51
On the contrary. The RC low-pass filter should make the RC time constant much longer than the PWM cycle. In your words, the PWM high-level time and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor. Obviously, the high-level and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor, so the capacitor can only be charged a little.  Details Published on 2022-10-7 18:47
On the contrary. The RC low-pass filter should make the RC time constant much longer than the PWM cycle. In your words, the PWM high-level time and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor. Obviously, the high-level and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor, so the capacitor can only be charged a little.  Details Published on 2022-10-7 18:39
 
 
 

2w

Posts

0

Resources
14
 
小太阳yy posted on 2022-10-7 17:46 Teacher, I want to use this circuit to convert the PWM square wave into a smooth DC voltage and do a digital-to-analog conversion. Should this be done?

On the contrary. The RC low-pass filter should make the RC time constant much longer than the PWM cycle. In your words, the PWM high-level time and low-level time are much shorter than the charging and discharging time of the capacitor through the resistor.

Obviously, the high and low level time is much shorter than the time it takes for the capacitor to charge and discharge through the resistor, so the capacitor can only charge a little bit and discharge a little bit, that is, the voltage change across the capacitor is very small. This is exactly your goal, "converting the PWM square wave into a smooth DC voltage."

 
 
 

2w

Posts

0

Resources
15
 
小太阳yy posted on 2022-10-7 17:46 Teacher, I want to use this circuit to convert the PWM square wave into a smooth DC voltage and do a digital-to-analog conversion. Should this be done?

Obviously, the shorter the duration of high and low levels is than the charging and discharging time of the capacitor through the resistor, the smaller the voltage change across the capacitor will be. In other words, the smaller the ripple is, the smoother the filtered DC voltage will be.

 
 
 

2w

Posts

0

Resources
16
 
小太阳yy posted on 2022-10-7 17:46 Teacher, I want to use this circuit to convert the PWM square wave into a smooth DC voltage and do a digital-to-analog conversion. Should this be done?

This is a first-order low-pass filter. The RC time constant mentioned above, multiplied by 2 and then multiplied by pai, is the transition frequency of this first-order low-pass circuit. At this frequency, the input AC signal is attenuated by 3 dB, that is, attenuated to 0.707 times. This is originally the content of the electrical engineering course. Above the transition frequency, the frequency is doubled and the attenuation is 6 dB (another way of saying it is that the frequency increases 10 times and the attenuation is 20 dB, the two statements are the same).

Therefore, if you want the AC component to be attenuated sufficiently, the AC signal frequency should be higher than the turning frequency, which is what we said before: "the high level and low level time is much shorter than the charging and discharging time of the capacitor through the resistor."

 
 
 

2w

Posts

0

Resources
17
 
小太阳yy posted on 2022-10-7 17:46 Teacher, I want to use this circuit to convert the PWM square wave into a smooth DC voltage and do a digital-to-analog conversion. Should this be done?

If you want to "convert to a smooth DC voltage", and make it very "smooth", with as little AC component as possible, you can use a high-order low-pass circuit, such as the second order, third order... The higher the order, the more attenuation per octave or per decade above the transition frequency. The fourth-order low-pass attenuates 80 decibels per decade above the transition frequency. Calculate for yourself how many times minus 80 decibels is.

 
 
 

2w

Posts

0

Resources
18
 
小太阳yy posted on 2022-10-7 17:46 Teacher, I want to use this circuit to convert the PWM square wave into a smooth DC voltage and do a digital-to-analog conversion. Should this be done?

PWM signals contain many high-order harmonics, among which the one with the lowest frequency is called the fundamental wave, and there are second harmonics and third harmonics with a frequency twice that of the fundamental wave. If the fundamental wave component can be filtered out (meaning that the fundamental wave component is attenuated to a level that meets the requirements), the second, third, etc. will not be a problem, because the second and third harmonic frequencies are twice and three times that of the fundamental wave.

 
 
 

2w

Posts

0

Resources
19
 
小太阳yy posted on 2022-10-7 17:46 Teacher, I want to use this circuit to convert the PWM square wave into a smooth DC voltage and do a digital-to-analog conversion. Should this be done?

Regarding filter circuits, gmchen has published several articles in this forum. If you have time, I suggest you read them carefully.

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list