PWM

Thread Starter

odm4286

Joined Sep 20, 2009
265
First I want to thank those brave enough to click this post after reading the vague title. I'm going to try and post enough information about my question as possible so here goes nothing.

Ultimately what I want to do is use a PLC(M340 if your curious) to PWM two small radioshack DC motors(2730223 if your REALLY curious). So far everything works great I'm just waiting on my hall effect sensors to come in so I can setup a tachometer, however when I laid out and simulated my circuit in Multisim 13 Student Edition I noticed some strange things that brought up a few questions.

First lets take a look at my circuit, sorry for the size





Now take a look at what my virtual scope showed me



Here is my real life scope

https://www.youtube.com/watch?v=M_5Juor3Qps

https://www.youtube.com/watch?v=JSE94CoSe2w

Notice how the output of the scope simulator swings negative for a bit? Is this a software issue that I should just ignore or....

Is it because your not supposed to PWM voltage regulators?

Sorry for the long post but I just wanted to include as much information as possible to make it easy for anyone that has the time to help me out. Thanks a lot
 
Last edited:

crutschow

Joined Mar 14, 2008
38,503
I don't understand the very low frequency of your pulses. That's not PWM, it's just turning the motors on and off at a low rate.
 

praondevou

Joined Jul 9, 2011
2,942
If you want more people to help you please also attach the pics to the thread. I can't access them from where I am, for example.

You can use Multisim for standard circuits. It can show pretty strange things when used for strange stuff. :D

It is certainly not suited to prove a design. Unless you are familiar with all the little details of the software maybe, how to handle errors etc.
 

crutschow

Joined Mar 14, 2008
38,503
Those spikes may be real or not but you can't readily see them with an analog scope at such a slow sweep speed. My experience has been then if it shows in a simulation then there's a good chance the real circuit will show something similar.
 

Thread Starter

odm4286

Joined Sep 20, 2009
265
I don't understand the very low frequency of your pulses. That's not PWM, it's just turning the motors on and off at a low rate.
Can you elaborate on this? I'm new and I've been under the impression that PWM is exactly that. Pulsing a voltage on for a short period of time and then turning it on for a short period of time. d = t/p * 100

Note: I just noticed I forgot my two inrush current limiting potentiometers in that are in series with each motor on my schematic. Maybe that's why I'm getting different results on the scope? Anyway more experiments tomorrow. Thanks for the help everyone, any input is appreciated.
 

crutschow

Joined Mar 14, 2008
38,503
Can you elaborate on this? I'm new and I've been under the impression that PWM is exactly that. Pulsing a voltage on for a short period of time and then turning it on for a short period of time. d = t/p * 100
..............
Technically you could call a 400ms pulse period PWM but that is certainly not considered a "short" pulse in electronic terms. That's not even very short in human terms since a push-button can be manually pushed faster than that. Typically PWM pulse periods are in the low ms or μs range.

Normally you want the pulse frequency high enough so that the load integrates the pulses to give a more-or-less uniform power flow (similar to what a steady DC voltage would do). That means the electrical, inertial or thermal time-constant of the load must be much longer than the pulse period (thus giving a low-pass filter effect). For a small motor that would likely require a pulse period no more than a few milliseconds to give a steady rotational output.

The long pulse period you are using is just turning the motor on and off with the result being that the motor will not give a smooth output but rather will speed up and slow down (or even start and stop).

Note that I see no reason for the voltage regulators. Indeed they would seem to get in the way of controlling the motors. Typically you just apply the high frequency PWM signal directly to the motors. What is the purpose of the regulators?
 

Thread Starter

odm4286

Joined Sep 20, 2009
265
Thanks for the reply. The reason I'm using regulators is because the DC pulses originate from a 24vdc output card in a PLC. The motors that I'm using are rated for 1.5 to 3VDC.

As far as shortening the period, I've tried that. I started with a 3ms pulse and 1ms off time for a 4ms period, but this didn't work. With values this low the motor would "jog" (not sure if that's the correct term) basically move back and forth slightly and never start rotating.

Maybe I should try with a shorter period and higher voltage? Right now my LM317 is "programmed" to output 1.5 VDC.

By the way this is just a learning exercise, so things don't have to be perfect but I'd like to get a good grasp of concepts.
 

crutschow

Joined Mar 14, 2008
38,503
Thanks for the reply. The reason I'm using regulators is because the DC pulses originate from a 24vdc output card in a PLC. The motors that I'm using are rated for 1.5 to 3VDC.
...................................
Maybe I should try with a shorter period and higher voltage? Right now my LM317 is "programmed" to output 1.5 VDC..................
You should do the PWM after the regulator since it's designed to regulate DC not pulses. I would set the output voltage at about 3V and then do the PWM from its output (switch in series with the output). For that a higher frequency PWM should work properly.
 

Thread Starter

odm4286

Joined Sep 20, 2009
265
Thanks a lot. I'll put some more through into this project and find a way to regulate my voltage down to 3VDC before its pulsed. I'll post back as I make progress so others can learn. Thanks again
 

crutschow

Joined Mar 14, 2008
38,503
Can't you just use a low duty cycle PWM (~6%), plus a smoothing cap, to get the 24V down to 1.5V?
That should work as long as you limit the duty-cycle so it can't exceed the maximum motor voltage. For 3V that would be about 12% maximum duty-cycle.
 
Top