pwm to voltage

Thread Starter

Soroosh.m

Joined May 14, 2012
17
hi!
i have a sensor with pwm output(40khz). i want convert it to voltage.
i used rc filter but it dose not have a real time response!!
what should i do?????:confused:
 

ErnieM

Joined Apr 24, 2011
8,377
There will always be some delay no matter what scheme you use.

The fastest response I can thing of is a digital circuit (microcontroller or such) reading the period (and frequency too if it is variable) to get a digital count of period. This number can then be sent to a digital to analog converter. You should be able to get a pulse-by-pulse response this way.

But before going down that path what is your application? What are the constraints of the system looking at the sensor?
 

Thread Starter

Soroosh.m

Joined May 14, 2012
17
I use tsop1138.(ir receiver)
the frequency is not variable but the period is variable.
is there any chip set to do this??
i used a low pass filter with a 100k resistor and 1uf capacitor. but i said , it had a delay(about 700ms)
i'm looking for the fastest way.
pls help me:(
 

crutschow

Joined Mar 14, 2008
34,452
How much ripple voltage can you tolerate in the output voltage? That determines how fast you can respond to changes in the PWM duty-cycle using an analog filter.

Your filter has a 100ms time-constant which is likely much longer than you need for a 40kHz signal.
 

crutschow

Joined Mar 14, 2008
34,452
By ripple voltage, I mean how much deviation of the filtered output can you tolerate. Using a shorter time-constant filter will increase the response time but it will also increase the slight variation in the filtered voltage due to the on-off 40kHz pulses from the input signal. My question is how much of this deviation (ripple) at 40kHz can you tolerate in the filtered signal?
 

Thread Starter

Soroosh.m

Joined May 14, 2012
17
there is a 5mm ir transmitter diode (40khz).
and a tsop1138 ir receiver sensor.
the distance between transmitter and receiver is variable
i want to calculate the distance.
but i have a problem! the output of tsop1138 is pulse and i want convert it to analog voltage and calculate it with ADC unit of micro controller.
 

BillB3857

Joined Feb 28, 2009
2,570
That sounds like a project to calculate the distance from a TV transmitting tower to a receiver by watching TV. Somehow the receiver and the transmitter will need to be synchronized or is the receiver re-transmitting the pulse back to the transmitter so you can measure the turn-around time?. How are you accomplishing that?
 

crutschow

Joined Mar 14, 2008
34,452
there is a 5mm ir transmitter diode (40khz).
and a tsop1138 ir receiver sensor.
the distance between transmitter and receiver is variable
i want to calculate the distance.
but i have a problem! the output of tsop1138 is pulse and i want convert it to analog voltage and calculate it with ADC unit of micro controller.
You do realize that the speed of light is about 1ns/ft? So I don't see how you can resolve that sort of time using a 40kHz PWM signal and IR. :confused: One period of the 40kHz signal represents over 4 1/2 miles of travel time for light.
 

Thread Starter

Soroosh.m

Joined May 14, 2012
17
:D :))))))))))))))))))
i know but in fact there is not like something that you said ;)
i use this system and it was use full for me. but i calculate the output by a micro controller
and now i want convert it to analog voltage and and calculate it with adc unit .
 

ifixit

Joined Nov 20, 2008
652
Hi Soroosh.m,


Questions:
  1. You already said your PWM carrier frequency is 40KHz, but what is the modulation frequency, or at what maximum rate does the duty cycle vary?
  2. Also, what is the depth of modulation, or range of duty cycle variation in percent?
If you can answer these questions, then a filter can be designed to extract the data you want from the signal.

Regards,
Ifixit
 
Top