Circuit to convert duty cycle of PWM to resistance...HELP!

Status
Not open for further replies.
PWM --> Lowpass filter --> A/D converter --> digital potentiometer.

**broken link removed**, among others, has A/D's and digital pots.
 

It is a 'digital' signal, it goes from 0V to some positive value, and that doesn't change. The reason for the lowpass filter is to provide a smooth DC voltage from the output pulses. 20Hz is very slow for PWM, so the lowpass filter will have to very low frequency, this will restrict how fast it can change.

Assuming your PWM pulses are 0-5V, varying the pulsewidth from 0-100% should give 0-5V at the output of the lowpass filter.

I should try giving many more details of what you are trying to do, it's possible that we may be able to suggest a better way of doing it.
 
Presumably this is an automotive application?, it certainly sounds like it, 12V and slow PWM - presumably from a sensor intended to feed a crude meter in the dashboard (which averages it out). Also, presumably, you are wanting to feed this sensor into a computer based instrument, which probably requires a steady voltage. From what you've already said, presumably the new instrument requires a resistive sensor, which forms a potential divider with an other resistor?.

Assuming the requirement is something similar to that, presumably you can't alter the sensor?, what about the unit you want it to feed? - if I'm right in assuming it uses a resistive sensor with an extra resistor, can you remove the extra resistor?. If you can you only need the lowpass filter, you could then feed the resultant volage directly in - no need to try and convert it to a resistance.

The lowpass filter could consist simply of a resistor and capacitor, depending on the output impedance of the sensor, and the input impedance of the unit it will be feeding.
 
With a microcontroller(uC) you can measure the width of the pulse directly without an A to D. Look for a ucontroller with a "capture compare" module. This extra hardware built into the uC will let you time the pulse width without much software oversite. The uC then uses a digital pot to set the resistance.

Ron's solution doesn't involve a uC but by using a uC you don't have to use any analog components besides your digital pot which will make it less noise sensitive. You will also be able to have any relationship between input pulsewidth and output resistance that you want. You also might be able to make the uC talk to your automotive bus (CAN etc.). Your switching method might work too. With the PWM out from the uC you could switch a transistor at several kHz.

Hope this helps

Brent
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…