PWM(r/c servo control) to DC converter

spanner

Senior member
Jun 11, 2001
464
0
0
anyone know where to buy/ how to build a device that converts PWM (type of signal used to control R/C servos) to a DC voltage. Any help on this will be appreciated
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Prepare for a question that comes from knowing only half the story: (;))

Couldn't you just drop a cap in parallel with the PWM source? (and maybe a diode if you don't want to put any strange loads on the source?)
 

pm

Elite Member Mobile Devices
Jan 25, 2000
7,419
22
81
I do a fair amount of R/C stuff and have fiddling with things like this. The usual way to do it is either to adapt some existing chunk of electronics to the problem or to use a PIC chip programmed to do what you want it to do.

I'd need more details before I could offer a reasonable suggestion, but I can take a guess. What kind of DC signal do you want? Something that ramps up, say, from 0V to 5V depending on the input? Or something that is 0V until a threshold is reached and then switches to 5V (more of a binary signal).

Could you use an ESC - electronic speed control - for a brushed motor as the signal generator? Those basically take a signal and steadily ramp the voltage up. Check out the ESC's at places like Hobby-lobby.com.

If you want something that did the binary DC signal, then you could look at this site which uses PIC chips and the throttle PWM signal to trigger the shutter on a digital camera. You'd need to buy a programmer to do this though. But with a PIC chip you could get it to do pretty much whatever you wanted. Check out the rest of Cam-man's site. Also the Ezone/RCGroups.Com forums are a great place to ask about these types of questions.

Chris's suggestion about using a capacitor is a good one though. How do you know it wouldn't be accurate enough? Capictor sizings are pretty specific if you pay a little extra. You'd need to experiment with the sizing to get a decent signal, but I can't see why it wouldn't work. It'd be cheap. You could then build a simple biased NPN transistor amplifier to boost the signal to something a voltage you could use.
 

spanner

Senior member
Jun 11, 2001
464
0
0
"Something that ramps up, say, from 0V to 5V depending on the input? "

that is exactly what I want.

I am pretty sure an ESC outputs a PWM signal to the motors but I may be wrong. As for the capacitor, it may work with an amplifier. i just don't have the time to test capacitors. i need something i can buy or build quickly
 

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
There are several ways to do it and I have done all this before.

1) RC network to get the "average" dc level. This is a crude way to do it. It works, but you will be trading off accuracy for slow response times.

2) Binary counter with a slow ref. clock like 10khz or so and a D/A. A little harder to do, but it works better and you get better results in terms of accuracy and response time.

3) Microcontroller method with on-board D/A converter or interface to external D/A. Hardest to do unless you already know about microcontroller. But also most rewarding since it lets you do a lot of other neat stuff in tandem with the PWM to DC converter.
 

spanner

Senior member
Jun 11, 2001
464
0
0
" RC network to get the "average" dc level. This is a crude way to do it. It works, but you will be trading off accuracy for slow response times."

could you send me details about how to do this? Precision is more important to me then accuracy because all this will be input to a DAQ card on a computer and I will have software to callibrate the signal.
 

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
Originally posted by: spanner
" RC network to get the "average" dc level. This is a crude way to do it. It works, but you will be trading off accuracy for slow response times."

could you send me details about how to do this? Precision is more important to me then accuracy because all this will be input to a DAQ card on a computer and I will have software to callibrate the signal.

It's basically a resistor in series with the signal and a capacitor to ground after the resistor. You'll have to play around with the values of R and C to give you the best response. time constant = R*C.

With that said, with a large time constant, you are looking at a more precise and stable DC level, but at the expense of response time when the PWM width changes.

With a small time constant, you will see a DC level that fluctuates (and it will look like a triangle waveform), but the response will be quick.

Since your feeding it into a DAQ, you can filter out the fluctuations with software algorithms.

Better yet, if your DAQ has digital inputs (it can even be done with analog inputs), you can feed the PWM signal directly to the DAQ (of course, buffer the signal with a unity gain opamp configuration) and implement a timer in your program to "count" the elapsed time of the pulse width. You will have to account for the delay time it takes the DAQ to read and send the data through the bus.

By the way, what is this for? I did something similar to what you are doing while in school.
 

spanner

Senior member
Jun 11, 2001
464
0
0
Thanks for the info. This to to get emergency R/C control for a 200lb autonomous vehicle we are building.