Simple 555 PWM - disappointing performance

May 25, 2005 106 Replies

Didn't try as low as 1.2V. But my curiosity is now piqued generally about this torque issue, and I'll try to do some more experiments.

As mentioned earlier, my assumptions about the effect of PWM on torque were simplistic. Now I'd like to understand it better. Ideally, I'd like to know how the torque compares to that from a direct DC supply, Vm. The ratio must be a function of at least 3 factors:

- Source voltage for PWM Typically it would be higher than Vm; I was planning 4.5 V compared to my present direct supply of 3.6 V.

- Duty cycle I'd wrongly assumed this was linear; Fred pointed out that it's ^2.

- Frequency I hadn't thought about this until now, but John's post has prompted me to investigate. I had arbitrarily tried 300Hz and 1.2 KHz, and couldn't see any immediately obvious difference in torque, other things being constant. But clearly the motor's inductance will influence performance; how much I don't know. I wonder whether the effect of F for a given motor of known inductance and series resistance can be reliably calculated? Maybe trial and error would be quicker in practice. Another area this prompts me to pursue is simulation. Specifically, I'll try to discover what model CircuitMaker uses. From this

formatting link
it looks as if it is purely resistive!

Presumably the torque ratio will also depend on the configuration, being lower for the simple circuit under discussion and higher for bridge types. Of course, all the above assumes a simple DC motor of the kind under discussion.

Understood. That was Ban's point too.

I had intended to rebuild the present circuit a few months ago, using a full bridge configuration and a PIC approach I'd found in EPE magazine. I actually bought the PICAXE-18A in a fit of enthusiasm. But a prerequisite is that I first need to complete my *basic* PIC self-training. And that doesn't look like happening any time soon .

Meanwhile, my own circuit is doing OK. Here are the two main sections:

formatting link
formatting link

Terry Pinnell Hobbyist, West Sussex, UK

Many thanks, much food for thought and experiment there.

BTW, if I measure the inductance L and DC resistance R of this motor, do you reckon a simple series LR model should give realistic simulation?

(I'll try it later today and report back.)

Terry Pinnell Hobbyist, West Sussex, UK

In article , Terry Pinnell wrote: [snip]

There is something wrong with that collector waveform, it doesn't look right, too flat on the top, etc. Is that an artifact of some data clipping going on somewhere?

A PM DC motor is not a resistive load, it's internal back-emf controls everything.

Below is an LTSpice schematic (originally named terry.asc) that gives a more accurate emulation of what you are doing.

Try the suggested runs at I1= .001A (no load) and at 0.5/1A which represents the light loads of your fingers around the shaft. Look at the averaged voltage across C1 for each load condition and compare it with the (guessed) 1.9V Vbemf for no load with 2.4V dc supply. You will see why the motor's torque/speed is so pitiful at 50:50 duty cycle.

Version 4 SHEET 1 880 716 WIRE 160 80 480 80 WIRE 480 80 480 304 WIRE -400 608 -400 640 WIRE -400 640 160 640 WIRE 160 576 160 640 WIRE 160 656 160 640 WIRE -400 528 -112 528 WIRE -32 528 96 528 WIRE 320 432 320 384 WIRE 160 432 320 432 WIRE 0 384 0 432 WIRE 0 432 160 432 WIRE 160 432 160 480 WIRE 0 304 160 304 WIRE 160 304 320 304 WIRE 160 256 160 304 WIRE 480 384 480 640 WIRE 480 640 160 640 WIRE 160 160 160 176 WIRE 160 80 -224 80 WIRE -224 80 -224 144 WIRE -224 208 -224 432 WIRE -224 432 -144 432 WIRE -144 384 -144 432 WIRE -144 432 0 432 WIRE -144 304 0 304 WIRE 160 304 160 336 WIRE 160 400 160 432 FLAG 160 656 0 SYMBOL res 144 64 R0 SYMATTR InstName R1 SYMATTR Value .5 SYMBOL ind 144 160 R0 SYMATTR InstName L1 SYMATTR Value 3mh SYMBOL res -16 288 R0 SYMATTR InstName R2 SYMATTR Value 3.8 SYMBOL cap 144 336 R0 WINDOW 0 49 29 Left 0 SYMATTR InstName C1 SYMATTR Value 2000u SYMBOL current 320 304 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName I1 SYMATTR Value .001 SYMBOL diode -208 208 R180 WINDOW 0 24 72 Left 0 WINDOW 3 24 0 Left 0 SYMATTR InstName D1 SYMATTR Value 1N4148 SYMBOL npn 96 480 R0 SYMATTR InstName Q1 SYMATTR Value 2N3055 SYMBOL res -128 544 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R3 SYMATTR Value 100 SYMBOL voltage 480 288 R0 WINDOW 123 0 0 Left 0 WINDOW 39 24 132 Left 0 SYMATTR SpiceLine Rser=.1 SYMATTR InstName V1 SYMATTR Value 4 SYMBOL voltage -400 512 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V2 SYMATTR Value PULSE(.4 12 0 1u 1u 1.5ms 3ms 5000) SYMBOL current -144 304 R0 WINDOW 0 -38 91 Left 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName I2 SYMATTR Value .5 TEXT -440 40 Left 0 !.tran 0 .5 .49 10u TEXT -1216 104 Left 0 ;R1= Total motor series resistance TEXT -1216 144 Left 0 ;L1= Armature inductance TEXT -1216 184 Left 0 ;I2//R2//C1//I1 = Torque loads and back-emf simulator TEXT -1216 240 Left 0 ;I2= Fixed friction torque load TEXT -1216 272 Left 0 ;R2= Speed-dependant friction torque load TEXT -1216 304 Left 0 ;I1= External torque load applied to shaft TEXT -1216 336 Left 0 ;C1 represents the motor's time constant TEXT -1216 376 Left 0 ;The resultant voltage across C1, plotted as V(n005)-V(n004), represents the\\nback-emf generated by the motor when running. The average of this\\nvoltage is a measure of the motor's speed. TEXT -1288 496 Left 0 ;From the brief description I have guessed that the 2.4V screwdriver takes\\nabout 1A on no-load and 5A at stall. This gives some of the numbers above\\nplus a guess that the Vback-emf is about 1.9V on no load. TEXT -1280 600 Left 0 ;By comparing the resultant voltage across C1 with that 1.9V we can\\nguestimate the speed for various values of external load, ie for I1. TEXT -1280 672 Left 0 ;Do Runs with I1 set to 0.001A, 0.5A, and 1A. Look at the average of\\nV(n005)-V(n004) and compare with 1.9V.

Tony Williams.

I forgot something. Comparing stall torques.

Do a Run with C1 shorted in the LTspice circuit, and plot I(L1). You should get an average of 1.75A. This is a measure of the stall torque.

That same (0.5 ohm) motor, (with locked rotor and, powered from a 2.4Vdc supply), will take a a stall current of 4.8Adc..... that is 2.7x the stall torque on DC.

Tony Williams.

Thanks a lot Tony, appreciate your going to the trouble. Very timely, as I was pondering how to proceed with simulation in parallel with my practical experiments, and didn't really know where to start. Will study that circuit and simulation in detail.

I'll try to take the key measurements for this motor and plug them in. I already measured two key ones earlier. According to my Atlas LCR, the motor has a DC resistance of 0.2 ohms and inductance of only 14 uH, measured at 200 kHz. (The Atlas chooses its own test frequency.) One odd point is that the DC resistance initially measured about 1.0 ohm, but after running the motor briefly that became 0.2! Same with two identical motors.

Can't say I really see how some of those elements work (I1, I2, R2 and C1), but I'll hold my queries until I've played with it.

FWIW, this morning I trying to rig up some method of doing rough torque tests on this particular motor. Basically, I'm trying to measure the 'max torque', i.e. just before it stalls. Much more difficult than I expected!

Terry Pinnell Hobbyist, West Sussex, UK

Isn't 'high school' physics wonderful ! ;-)

Graham

The model is still under development and I'd welcome any corretions or additions.

That would be a stall current of 12A when directly powered off the original battery. Be warned though Terry. I burned out my B&D battery screwdriver doing some similar expts about a year ago. Run the thing off a current-limited supply if possible.

I2 and R2 are trying to account for the gearbox losses, which was the 1A my B&D drew with no external load. I1 is supposed to simulate the external load. C1 is supposed to acquire a voltage across it that represents the motor's generated back emf.

Tony Williams.

Thanks. I need to buy another spring balance then - I've been trying to do it with just the one (my 30 year old fishing scale, rarely used to its 7 lb max!).

Terry Pinnell Hobbyist, West Sussex, UK

and besides, he is completely wrong about the "dont need the diode", which of course you still do. The diode is placed to ensure the motor current has somewhere to commutate to when the switch turns off. for a pnp switch, the pnp collector goes to the motor and the cathode of the diode; the other end of the motor and the diode anode are at zero volts.

advice like that you can live without.

BTW, the point Ban made is quite correct. The motor has some inductance, Lmotor. This is what "forces" the current to keep flowing when the

2n3055 switches off. When the switch is on, current ramps up, current slope = dI/dt = Vbattery/Lmotor. Eventually this current gets so high the voltage drop across the winding resistance gets in the way (eg in a relay, Rwinding sets Irelay). When the transistor switches off, the voltage on the winding reverses (Lenz' law) forward biasing the diode to, say, 1V. The inductor current now ramps down, dI/dt = Vdiode/Lmotor

Because Vdiode is small (1V cf 15V) the current ramps down slowly. This will limit the performance you get from the machine. A simple fix for a low power single-ended circuit is to add a zener in series with the diode (or a few more diodes), but beware the losses!

Cheers Terry

^^^ 4V. RTFP

Thanks for the follow-up. You didn't comment on that inductance? Can a motor really have such a tiny value?

I managed to measure what I think is the stall torque. Motor (ex HomeBase screwdriver) was allowed to pull a spring balance via a cord fixed to a pulley of a little under 2 inch in diameter. The balance registered about 7 lbs, and I was surprised to measure about 9.5 A. At that point the voltage at the motor's terminals was a mere 1.0 V. At the source, a set of 4 D-type Nicads, it had dropped from its unloaded value of 5.0 V to 4.0V. Quite a lot of variation between successive apparently identical measurements though. Had 10A at one point.

I'm I bit handicapped by not having a heavy duty variable voltage power supply, but I'll see how much further I can get with batteries. I can always get some variation with series diodes.

Terry Pinnell Hobbyist, West Sussex, UK

My initial attempt with that technique (albeit with a suspended fixed weight substituting for one of the spring balances) met with a major snag. The continuous slipping of the cord on the pulley meant that the balance was oscillating over a wide range! I've returned to a fixed cord pulling one balance for now.

Terry Pinnell Hobbyist, West Sussex, UK

Connecting the emitter to the motor places the pnp transistor in a common collector configuration. Hence the transistor approximates a voltage switch. The current however will slew between on and off due to the inductance of the motor.

In common emitter configuration the 2N3055 approximates a current switch. Now switching the current produces voltage spikes and necessitates the diode.

Herbert

Run a strap or cord over a pulley on the motor, and attach the ends to two spring balances (scales). Adjust the tension in the strap (by moving the clamps holding the scales) until the motor is running at the speed you're interested in, then subtract the two readings. The force difference times the diameter gives you the torque.

Clifford Heath.

If my memory is correct, the output stage of the 555 has an open collector and grounded emitter. In this case a second resistor from the 4 volt supply to the base of the pnp transistor would ensure prompt turn off. Alternately if the output stage of the 555 has active source and sink stages then you must reconnect the timer to a lower voltage and omit the second resistor.

You forget that bipolar transistors are not the only kind.

You should never allow Vbe of a pnp transistor to go positive. This is especially true for power transistors, whose base-emitter junctions have low reverse breakdown voltages.

If the output stage of the 555 has active source and sink stages then connecting the timer supply to four or five volts ensures proper biasing of the transistor.

I suggest doing the circuit analysis. You will find that switching current in an inductance produces voltage spikes. By contrast switching voltage across the inductance gives a continuous change in current with slope discontinuity. Voltage switching in inductive circuits is not an idea, instead it is standard practice in electromechanical controls systems.

Herbert

Since the output sinks more than it sources, the turnon base current in a pnp transistor would be higher than with a npn unit.

Adjust the resistor to compensate for the change in voltage. The bottom line is to get the base current up to the proper value.

After you objected to the higher Vce of the pnp transistor, I reminded you that not all transistors are bipolar.

Driving the base resistor from a 15 Volt output of a 555 reverse biases the base-emitter junction of the pnp transistor and causes reverse breakdown.

When the output of the 555 is high, the pnp transistor is off and no base current flows.

The response, i(t), of a series connection of R and L to a voltage source V u(t) is V / R ( 1 - e ^ ( - R / L t) ).

Now a current source, I u(t), driving the series connection of R and L develops a voltage v(t) = I R u(t) + L I du(t) / dt = a step plus an impulse.

When Vce is 4.7 V the pnp transistor is off and the current is zero. During turn on Vce is about 1 volt, which entails three times the power dissipation of a saturated common emitter transistor. However this additional dissipation is merely cause to fet.

Herbert

The difference is in the source, not the switch.

The response, i(t), of a series connection of R and L to a voltage source V u(t) is V / R ( 1 - e ^ ( - R / L t) ).

Now a current source, I u(t), driving the series connection of R and L develops a voltage v(t) = I R u(t) + L I du(t) / dt = a step plus an impulse.

Herbert

Oh dear.

Pls explain the difference between a *voltage* switch and a *current* switch. A switch is a switch is a switch....

Graham

Thanks, good stuff. Will study over weekend.

As you've no doubt seen, since posting that question Tony has kindly published his proposed simulation model, which looks rather more complex.

Did you see my query about the value of 14 uH measured by my Peak 'Atlas LCR' instrument? And that odd inconsistency of R?

Terry Pinnell Hobbyist, West Sussex, UK

Terry Given wrote: (snip)

Using a superconducting inductor as a model for a motor is a poor way to come to a valid conclusion about a motor load, since its current is unlimited and will force an average voltage (through a switching cycle) of exactly zero volts. Obviously some other component (like the transistor) must set the current limit, in that case.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required