Maker Pro
Maker Pro

RC filter

MRF

Jul 3, 2015
3
Joined
Jul 3, 2015
Messages
3
Hi my friends
i have a sensor with pwm output(38khz). i want convert it to voltage.
i used rc filter but it does not have a real time response!!!
what should i do?????:confused:
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Hi my friends
i have a sensor with pwm output(38khz). i want convert it to voltage.
i used rc filter but it does not have a real time response!!!
what should i do?????:confused:
I think you need to elaborate a bit because I can't decipher what you've posted. :confused:

Chris
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
What is the corner frequency of the RC filter? What is the source impedance of the pulse driver in the ON state and OFF state? How fast is "real time" response?
 

MRF

Jul 3, 2015
3
Joined
Jul 3, 2015
Messages
3
I think you need to elaborate a bit because I can't decipher what you've posted. :confused:

Chris

Sorry my friend i cant type english well

I want to khow that what is the best of the value of the capacitor and resistor for RC filter in output of TSOP1138 sensor
 
Last edited by a moderator:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,782
Joined
Nov 17, 2011
Messages
12,782
This is not easy to answer conclusively because there are two contradicting requirements:
  • select a short RC timeconstant.
    - advantage: fast response
    - disadvantage: high ripple at the output
  • select a long RC timeconstant.
    - advantage: low ripple at the output
    - disadvantage: slow response
You'll have to weigh the advantages vs. the disadvantages. The main question, based on your original post, seems to be: "what is real-time for you"? You will have to accept a delay, that is inherent to filtering a PWM signal, your only choice is the degree of filtering.
Here is an extensive discussion on this topic.
 
  • Like
Reactions: MRF

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
The block diagram on page 1 indicates that the output stage is a common collector amplifier with a very high collector resistor of 80kΩ. With a collector resistor this high you won't need an RC filter. Just "C" alone and it will be very low value.
i have a sensor with pwm output(38khz). i want convert it to voltage.
Reading this again has me wondering if we're misinterpreting you. Do you want to filter the signal or obtain a DC level from it?

Chris
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
I think he want's a D.C voltage. That's how I take it. Let me see if I can come up with something.
Adam
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I think he want's a D.C voltage. That's how I take it. Let me see if I can come up with something.
Adam
If he wants a DC voltage I think it's going to require more than a Diode and Cap because of that very high value collector resistor. Especially if the output signal is going to be split in two. One being the PWM signal and the second.. DC. He's probably going to need a high Z input buffer driving a rectifier diode and filter cap. Not doing so, by hanging a diode and filter cap directly on that 80KΩ output, will certainly swamp out the PWM signal.

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I'm thinking a little op-amp circuit personally.
Adam
Yeah, I think a common single ended LM324 in voltage follower config should suffice. On the other hand we're assuming we understand what he wants. I've been down that rocky road to many times to admit how many! :D

Chris
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Here is a very crude circuit which will produce a voltage from a PWM signal. 1 us pulse produces approx. 300 mV and 25 us produces approx. 4.8 Volts. If that's what the OP wants.
Adam

PWM-V.PNG
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Here is a very crude circuit which will produce a voltage from a PWM signal. 1 us pulse produces approx. 300 mV and 25 us produces approx. 4.8 Volts. If that's what the OP wants.
Adam

View attachment 20753
Adam, I'm a bit confused with this circuit. I didn't sim it but it would seem to me that R1 * C1 would more likely transform an (above zero) square or rectangular wave to something that resembles an above zero sinusoidal-(esc) wave. Am I missing something?

EDIT: More like a Triangle wave.

If the OP just wants to detect a PWM (go - no go) signal he might be better of using a 555 pulse stretcher. I hope he posts again soon so we can determine what he's desirous of doing.

Chris
 
Last edited:

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
LOL, I thought he wanted a control voltage derived from PWM. See your right we both had different things on our minds. Yes you will get a triangle ish wave, your right. But if you make the RC at least 100 times the period it will be so small. You could add an LC filter to the output if you wanted to.

I have simulated it now and here is the output at 25 us pulse.
CheersPWM-V-SIM.PNG
Adam
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I see where I'm going astray here. A PWM wave is not a square wave but I was viewing RC as it would react to one. Which would be a near zero V output with a triangular ripple... Duh!

Chris
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
But what happens at 50% duty cycle :) When it is a square wave?
Adam
 
Top