PDA

View Full Version : Help with PWM signal conversion to VDC


Screener
04/05/2012, 09:24 AM
Is it possible and practical to convert a PWM output to a VDC signal that I could use to switch a solid state relay? I think it should be, but... I can solder and buy parts from radioshack or digikey etc :rolleye1: but know that I am not an electrical eng.

Anyone care to show me how you have done this? or a circuit

Thanks in advance
S

der_wille_zur_macht
04/05/2012, 09:30 AM
What you're saying doesn't make a ton of sense.

Can you please describe the context? Where is the PWM signal coming from? What relay are you trying to control? What sort of logic are you trying to accomplish?

Relays essentially have an "on" voltage level, above which they energize. There's no real variability, the relay is either on or off. PWM signals (and the analog voltage you'd get by smoothing one) are essentially meant to control in a variable sense.

Screener
04/05/2012, 09:53 AM
What you're saying doesn't make a ton of sense.

Can you please describe the context? Where is the PWM signal coming from? What relay are you trying to control? What sort of logic are you trying to accomplish?

Relays essentially have an "on" voltage level, above which they energize. There's no real variability, the relay is either on or off. PWM signals (and the analog voltage you'd get by smoothing one) are essentially meant to control in a variable sense.


Yep, thanks Wille,

I have an 24VDC PWM output that is for controlling a small brushless motor. which I want to replace with another larger motor. I'd like to use the PWM signal and smooth it to a voltage high enough to switch a solid state VDC relay. That would provide a (higher) DC voltage to drive the beefier replacement motor. I dont need speed control as it is geared. Id like to use my existing custom cooked software providing the original PWM signal from its custom cooked sensors in order to switch on power to the bigger motor and turn it off when required. Essentially im just replacing the small drive with a larger one without reinventing a wheel.

Edit: it is for a canopy lift.

does that make sense?
S

der_wille_zur_macht
04/05/2012, 11:22 AM
Yep, thanks Wille,

I have an 24VDC PWM output that is for controlling a small brushless motor

Is this a signal you're talking about, or an actual power source for the motor? Is it ACTUALLY PWM or is it just a steady 24v DC that's either on or off?

Where is this PWM signal coming from? What duty cycle(s) are you generating? What frequency? Can you link to or post specs for the motor and the relay?

Again, relays should really be treated as on/off devices. PWM signals are inherently intended for variable control. Unless you are going to leave the signal at either 100% or 0% all the time, this is probably not the best approach to your problem. Even if your signal was ramping up and down, and you tried to use a filter to smooth it, you might not get the expected result - most SSRs have a significant difference between their on voltage and their off voltage (i.e. they don't turn on until the signal is above 3v, but once on, they stay on until it falls below .5V)

Screener
04/05/2012, 11:43 AM
Im at a bit of a loss as Im not the designer so please bear with me. My son is in a place he cant mention by name right now.

You are right perhaps I used the wrong word, the PWM "signal" drives a DC motor so it is just power. I dont know the duty cycle just that the motor is not running 100%. What I want to do is smooth that power to get something as you suggest greater than 3V to use as a signal to turn on a relay. I guess I dont really care what that voltage is if the relay will take up to 24VDC as its control voltage. Although I can decrease the PWM duty cycle as a speed control in the software, its just set and forget setting so there is no ramping involved in controlling the original motor.

The motor starts and stop the motor when the limit switches are reached. Fairly simple control.
I have one of these http://www.newark.com/jsp/search/productdetail.jsp?SKU=94C0661&CMP=AFC-GB100000001 which I should be able to switch with >3VDC as your suggest.

I guess what I am looking for is what is the basic circuit I need to smooth the PWM signal to get some VDC greater than 3V and less than 32V from a 24VPWM output. Im sorry I dont have an osciloscope or anything fancy to answer your other question. I do thank you for helping me anyway.
S

der_wille_zur_macht
04/05/2012, 11:50 AM
No worries. I'm just trying to truly understand the application before making any suggestions.

Out of curiosity, what is the new motor rated at for voltage and current?

What duty cycle is the controller set to run at right now?

At a basic level you could use a simple R-C filter - put a resistor in series with the load, and a capacitor in parallel with the load. This will likely smooth the signal plenty well enough to just switch the relay on and off. It will be hard to really nail the values for the resistor and capacitor without knowing more details (duty cycle and frequency of the signal).

I'm also curious about the control system. What you're describing (have a motor tun on and off when limit switches are hit) could be easily created with a few simple relays.

Screener
04/05/2012, 12:12 PM
Thanks Wille, I will ask but might take a couple days to get the answer.
I appreciate your patient help

kcress
04/05/2012, 01:32 PM
If you can dork with the software skip all the filters and averaging and just command 100% or 0%. That will revert this PWM signal to just ON/OFF. Use an SSR that will take 24VDC if that's what your controller puts out.

Screener
04/05/2012, 02:27 PM
That is a good idea but you can only set a speed variable which is then switched on or off by a timer unattended. (I know this sounds fairly rube goldbergish).

The controlled output is PWM. I was under the impression that that would mean an output that turned on and off (from 0 to 24VDC) a few thousand times per second. Im not sure that I want to do that to the SS relay?? It is possible I guess it would in effect be transferring the 24VDC PWM "signal" to the 48V power for the beefier motor? Im thinking those who know more than me will say that's not the way it works. I'm happy to supply the new motor with straight 48VDC as I have already tested that and it works nicely. Just need to get the data for wille zur Macht to help me make a rc filter.

KC BTW i looked up your thread for you tank which is BTW amazing.

der_wille_zur_macht
04/06/2012, 08:02 AM
That is a good idea but you can only set a speed variable which is then switched on or off by a timer unattended. (I know this sounds fairly rube goldbergish).

That's not an issue, as long as you can set the speed variable to 100%, which (in theory) would produce a constant 24v signal, no PWM involved.

The controlled output is PWM. I was under the impression that that would mean an output that turned on and off (from 0 to 24VDC) a few thousand times per second.

At duty cycles between zero and 100, that would be true. At zero, it will (should) produce a constant 0v signal, and at 100% it should produce a constant 24v signal, no switching involved - the switching should only be happening at intermediate settings. So if you CAN force it to only ever produce either zero or 100%, it should, in theory, work fine to supply that signal directly to an SSR relay capable of taking a 24v DC control signal, which is true for the relay you posted above.

If, for some reason, the speed variable can't be set to 100%, then you'll need some sort of interface as mentioned above.

kcress
04/06/2012, 02:03 PM
KC BTW i looked up your thread for you tank which is BTW amazing.

Thanks!

BTW After thinking about it your filtering of the PWM to drive an SSR it is a completely BAD idea. It would very likely destroy the SSR. Do not contemplate it further.

You need to fix the code to provide 100% or 0% PWM out to the SSR. That should be trivial even to a code noob. The hardest part would just be getting things set so you can modify the code. If you can do that, actually modifying the PWM aspect would be easy.