Simple 555 PWM - disappointing performance

May 25, 2005 106 Replies

I've been playing with the motor model that was suggested by someone upthread. However, the parameters required for the model are things like motor inductance and resistance, a 'back emf' constant, and torque at a particular current. I tried varying the particular values to match your dataset, but was unsuccessful. You may want to give it a try, though. It was here:

formatting link

Here is an LTSpice implementation of their model:

Version 4 SHEET 1 928 820 WIRE -384 64 -384 32 WIRE -384 176 -384 144 WIRE -224 32 -384 32 WIRE -80 32 -224 32 WIRE -80 96 -80 32 WIRE -80 208 -80 176 WIRE -80 320 -80 288 WIRE -80 432 -80 400 WIRE -80 544 -80 512 WIRE 128 80 128 32 WIRE 128 176 128 160 WIRE 208 32 128 32 WIRE 352 32 208 32 WIRE 352 64 352 32 WIRE 352 176 352 144 WIRE 352 288 352 256 WIRE 352 400 352 368 WIRE 512 64 512 48 WIRE 512 160 512 144 WIRE 512 176 512 160 WIRE 608 48 512 48 WIRE 688 48 608 48 WIRE 688 64 688 48 WIRE 688 160 512 160 WIRE 688 160 688 128 WIRE 816 48 688 48 WIRE 816 64 816 48 WIRE 816 160 688 160 WIRE 816 160 816 144 FLAG -80 544 0 FLAG -384 176 0 FLAG 352 400 0 FLAG 128 176 0 FLAG 512 176 0 FLAG 608 48 position_in_radians FLAG -224 32 Motor_Voltage FLAG 208 32 Torque SYMBOL voltage -384 48 R0 WINDOW 3 -365 194 Left 0 WINDOW 123 -361 160 Left 0 WINDOW 39 24 130 Left 0 SYMATTR Value PWL(0MS 0V 1MS 10V 1000MS 10V 1010MS 0V 2000MS 0V) SYMATTR Value2 AC 1 SYMATTR InstName V_AMP SYMBOL ind -96 80 R0 SYMATTR InstName LM SYMATTR Value {La} SYMBOL res -96 192 R0 SYMATTR InstName RM SYMATTR Value {Ra} SYMBOL bv -80 304 R0 SYMATTR InstName B_EMF SYMATTR Value V=I(VSENSE2)*Kemf SYMBOL voltage -80 416 R0 WINDOW 0 43 48 Left 0 SYMATTR InstName VSENSE1 SYMATTR Value 0V SYMBOL bv 128 64 R0 SYMATTR InstName B_TORQ SYMATTR Value V=I(VSENSE1)*Kt SYMBOL ind 336 48 R0 SYMATTR InstName LJ SYMATTR Value {Jm} SYMBOL res 336 160 R0 SYMATTR InstName RB SYMATTR Value {Bm} SYMBOL voltage 352 272 R0 SYMATTR InstName VSENSE2 SYMATTR Value 0V SYMBOL bi2 512 64 R0 SYMATTR InstName B1 SYMATTR Value I=I(VSENSE2) SYMBOL cap 672 64 R0 SYMATTR InstName CPOS SYMATTR Value 1 SYMBOL res 800 48 R0 SYMATTR InstName RPOS SYMATTR Value 1MEG TEXT 24 -24 Left 0 !.param Kemf 25m TEXT 24 -184 Left 0 !.param Ra=0.5 TEXT 24 -152 Left 0 !.param La=1.5mH TEXT 24 -120 Left 0 !.param Kt=50m TEXT 24 -88 Left 0 !.param Jm=250u TEXT 24 -56 Left 0 !.param Bm=100u TEXT 24 -224 Left 0 !.tran 10ms 2000ms TEXT 528 16 Left 0 !.ic v(position_in_radians)=0 TEXT -296 -280 Left 0 ;

formatting link
TEXT 224 -24 Left 0 ;ratio of back EMF to angular speed of the motor TEXT 224 -184 Left 0 ;Internal resistance of the motor TEXT 224 -152 Left 0 ;Internal inductance of the motor TEXT 224 -120 Left 0 ;Ratio of torque to motor current TEXT 224 -88 Left 0 ;Inertia of motor + load TEXT 224 -56 Left 0 ;Coulomb Friction of motor and load TEXT 112 248 Left 0 ;current here is \\nangular speed of motor

Regards, Bob Monsen

You're right that I've not so far managed to do that. I'm still working at it though, as it interests me. What practical further advice do you have on measuring this motor's dynamic torque?

You really do have a bee in your bonnet about this, don't you, Ban! Are you on some sort of worldwide commission scheme for promoting the bridge approach? I explained this at least once up-thread. One more time: the project was finished a YEAR ago. Past tense. So, with due allowance for your english, it makes no sense to say 'he also seems to insist to use the "quarter-bridge"...'

If you want to criticise a decision I took a year ago, fine, but that's OT from this thread. FWIW, I was fully aware then of the relative advantages and disadvantages of different approaches, including the half and full bridges. Ever think there might have been reasons for going the relay-based route? Ever think there might be practical reasons for not now scrapping a successfully working project and starting from scratch, to achieve a minor improvement?

And what's this all about: "he has found somewhere on the web together with the 3055."? Have you got something against 'the web', BTW? And what makes you think I 'found' that trivially simple 555/3055 PWM circuit anywhere? I've been building circuits with 555s and/or 2N3055s for over 25 years, so why would I need to 'find' it?

English may not be your first language, but you're not bad on the personal insults! Lighten up, Ban, you're a grandad now, remember? And maybe read the threads a little more carefully, and consider the background, before taking such a patronising and sanctimonious tone.

BTW, I'm curious what 'the final result' is supposed to mean? Do you mean the improvement of my curtain controller - i.e. slowing it down while maintaining adequate torque, the stated objective? Or my ultimate personal destiny as an electronics hobbyist?

Have a nice Sunday!

Terry Pinnell Hobbyist, West Sussex, UK Sun 29 May 2005, 05:56 UK time

No obvious place in the thread to post these, the latest results of my static tests with the motor under discussion.

MISC NOTES: No PWM involved. Tests were performed in the reverse order to the more logical sequence shown. IOW, I started with the four-battery set, so battery source voltage declined as nicads were discharged heavily. Used a set of D-type NiCads, wired with taps. Current measured with a vintage 0-15A analog meter I've been trying to use for a decade or so. Voltages with a couple of DMMs. Forward and reverse polarity made no significant difference. Stalling was with motor spindle locked and held for a second or so (less on the potentially damaging 4-battery test). By 'Motor unloaded' I mean with the motor running freely, but driving its built-in gear train. I've rounded amps to 1dp.

Voltage (DC V) Test description At source At motor Current (A)

---------------- --------- -------- -----------

1 x NiCad: - No load 1.28 - Motor unloaded 1.18 0.96 1.8 - Stalled 0.98 0.34 4.4

2 x NiCads: - No load 2.60 - Motor unloaded 2.35 2.12 2.1 - Stalled 1.67 0.67 8.5

3 x NiCads - No load 3.95 - Motor unloaded 3.64 3.41 2.3 - Stalled 2.19 0.95 11.5

4 x Nicads - No load 5.35 - Motor unloaded 4.97 4.74 2.5 - Stalled 2.77 1.26 14.1

Finished these last night, so have yet to attempt any conclusions on how they help me model the motor. Any observations would be welcomed please.

Terry Pinnell Hobbyist, West Sussex, UK

That's great, thanks. I had seen the model and article (linked by Mike Monett) but not had time to study it. Your LTSpice circuit will make that easier, although I'm not very skilled at working with LTSpice. Have you now switched from Circuitmaker, BTW?

Did you also see Tony's earlier LTSpice model up-thread?

Terry Pinnell Hobbyist, West Sussex, UK

The motor looks like this;

I Rmotor Lmotor V-Atmotor +->----/\\/\\----))))---[Vback-emf]---+0v

Under steady state (dc) conditions the motor equation is. V-Atmotor = I*Rmotor + Vback-emf.

When stalled, Vback-emf = Zero.

So V-Atmotor = I*Rmotor, or Rmotor = V-Atmotor/I.

So Rmotor = .34/4.4 or .67/8.5 or 0.95/11.5, or 1.26/14.1 which nicely averages out to Rmotor= 0.08 ohms. ~~~~~~~~~~~~~~~~~

When running, the equation is V-Atmotor = I*Rmotor + Vback-emf.

eg, 0.96 = 1.8A*0.08ohms + (Vbemf at that speed, = 0.816V).

The added things in brackets are the calc'd internal Vbemfs that the motor generates at the various rpm's.

That gearbox-only load will have a fixed current representing the fixed friction, in parallel with a speed-dependant load, ie, proportional to the Vbemf.

It roughly looks like Imotor = 1.7A + Vbemf/5.3ohms in the unloaded condition. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I 0.08R Lmotor V-Atmotor +->----/\\/\\----))))-+-[Vback-emf]-+-+0v | | Fixed loss--> +--[ 1.7A ]---+ | | Speed-dependant loss--> +----/\\/\\/----+ | 5.3R | | | . . . . +---[I-Ext]---+

An external torque load will be another current in parallel with Vbemf.

Tony Williams.

Touche.

Cheers Terry

PS nice work on the TANH circuit.

It\'s called experimentation, and the fun is often in the journey, not necessarily in just getting to the destination with a cut-and-dried solution.

I have switched. I was using the student version of CM, and was tired of not being able to do temperature simulations. I admit to liking the user interface of CM a bit more, but LTS isn't bad once you get used to it. It's also far more flexible, and allows bigger circuits.

I did see it, but I haven't tried it out.

Regards, Bob Monsen

Excellent, thanks. Will get stuck into that asap.

Terry Pinnell Hobbyist, West Sussex, UK

Yeah, your last measurements confirm what almost everyone has noticed, the

555 together with the 3055 are not up to the job. It was not only the power supply as you thought, but the whole concept. When making a motor controller, you first collect data on the motor, so 0.08 ohms DC-resistance is the most important, because only with at least 25A you will reach the desired starting torque, no need to measure this mechanically. The number comes from your desciption of 2.4V supply with 2NiCads in series. Just this single number will already give the amount of inadaequacy of your concept. No need to solder and measure much. It is a pity when so much thinking soldering and measuring is wasted to get an unusable circuit. When I make a little circuit like this, I want to have a better result than what can be commercially bought or at least equal, otherwise it would be smarter to buy a RC-racing car motor controller or some industrial circuit. How can a hobby be fun, if you arrive at the situation that you better had left this alone? Your other responses also show that despite all the help here, you have not understood the function of a motor let alone the idea of PWM. It is not an insult if somebody expresses this, or do you want to become a Burridge? Better to read up a bit, with the Net giving so much useful information. When you feel insulted than just because I expressed what everyone else thought too, and I happened to press the button. :-)) What I consider insulting is when someone writes: His stupidity is so gross, that also here he chose a completly wrong concept, a waste of bandwidth etc.etc. compare that with my words above. I apologize for suspecting that you found the circuit "on the Net", when you made it up yourself. Maybe a smaller motor will even do with it, despite the fact that there is no regulation, which requires some sort of feedback. Terry, take it easy. I just felt to express a bit of critics and you feel insulted? Have a good laugh and accept that, next time "JT" might press the button... I have heard the English humour is famous, look how Mr Atkinson can express it by making fun with himself. Nevertheless I can appreciate your contribution to this group. I'm going swimming now, so I will have a nice sunday. You will see me passing on the left webcam in a couple of minutes.
formatting link
ciao Ban Bordighera, Italy

You married her before you knew what she was really like?^)

Thanks again for that model, Tony, and your worked examples. I've made real progress as a result of your practical help. Using the second set, here's my first attempt at a simulation, with some explanatory notes.

formatting link

As you see, quite a gap to resolve though! Had to finish this in rather a hurry (my wife just asked me in frosty tones why I didn't marry my computer - always a bad sign!), so I suspect an error. Can you or anyone else see any obvious slip please?

Terry Pinnell Hobbyist, West Sussex, UK

Something like that! Or maybe the reverse...

Terry Pinnell Hobbyist, West Sussex, UK

You have a slight misunderstanding Terry.

Vbemf is a *result* of what happens when the motor spins, so you can't force a value for it. You can only apply power to the motor and use the resultant Vbemf to see what speed the motor runs at, at that torque load.

Suggest: Remove Vback entirely. Increase C1 to 100,000uF. Reduce L1 to 100uH. Raise Vsupply to 4v at least, and give it an R-source of 0.1 to 0.2 ohms.

Run the simulation again, and you should see something rather nasty happening to the 2N3055. At that low base current it operates as a constant current sink of about 3A and will be pulled out of saturation above that.

It means that you are on a hiding to nothing with the circuit at present.

Tony Williams.

Thanks, Tony, appreciate your patience. I'd assumed I could plug that previously calculated value of V back into the sima, so clearly I had indeed misunderstood.

Do you mean like this?

formatting link

Understood, but my immediate interest is seeing how closely I can simulate the circuit's actual waveform, channel B (red) in

formatting link

Terry Pinnell Hobbyist, West Sussex, UK

Re-run the simulation with R1= 10 ohms, get some base current into Q1.

Make sure the simulation runs long enough (5-10 secs) for the 'motor' to run up and reach a steady speed.

That collector waveform is odd.

When On; that 2N3055, (with only 150mA of base current) bottoms nicely at about 0.5V. It suggests either a super 2N3055 or a collector current of less than 3A.

When Off is the real oddity though. Your scope picture shows the collector voltage going to a nice flat Vsupply, which suggest no Vbemf. If there were a back-emf the Off collector voltage should initially rise from the saturation voltage to (Vsupply - Vbemf). Then it should ramp up slightly as Vbemf falls (as the torque slows a motor without power).

Tony Williams.

OK, thanks. I've made both those changes and they do make a significant difference to the simulated waveform, as you see here:

formatting link

During a repeat experiment today I was apparently getting a minimum of only around 1.8-2V at 2N3055 collector, so now unsure about that previous waveform. Tomorrow I'll repeat yet again, more carefully. I suspect positioning of 'scope return probe was not correct.

BTW, are those 'spikes' on the leading and trailing edge of the base voltage (yellow plot) OK?

Terry Pinnell Hobbyist, West Sussex, UK

That's it Terry. When the transistor goes Off there is the initial big spike from the inductor, clamped by the flyback diode. Then the collector settles at about 1.4V, (Vsupply - Vbemf), followed by a slight upward ramp as the gearbox load torque slows the rotor slightly. The Vbemf voltage across C1 should should show a triangular voltage with about 2.5Vdc average value.

Simulate an external load by increasing that 1uA second cc sink, and watch the Vbemf reduce as the 'motor' slows down. You can go up to 2A before my model goes wrong.

[snip]

That's it. That 2N3055 is being pulled out of saturation.

It means that you either have to drastically increase the base current or move to a low Rds-on MOSFET.

I think so, yes. The inductor means that the collector voltage has fast edges and these may be being capacitively coupled onto the base.

Tony Williams.

At last, a result! Much appreciated your help on this, Tony. I'll experiment a bit further along the lines you suggest.

Terry Pinnell Hobbyist, West Sussex, UK

By the way. Your actual scoped spikes are much shorter than the simulated spikes (with Lm = 100uH). That does suggest that your 12uH measurement may have been in the right ballpark.

With such a low L/R time constant, clocking the PWM at 300Hz is not good news. The motor runs in discontinuous current mode, (poor torque-speed characteristic), and the repetitive high peak currents results in higher power losses in all resistive components (Rmotor!).

For smooth and efficient running the PWM should be clocked at a period which is small compared to the L/R. 12uH/0.08R is 150uS, and 1/5th of that is 30us. So the PWM should be clocked at about 30KHz for this motor.

This is reminiscent of another dc motor thread some months ago, where the OP was using a 24Vdc Maxon motor, which was running hot when clocked at 7.8KHz. The motor had an L/R of 0.08mH/0.318R, which suggests a clock of not less than 20KHz, and (afair) Maxon's own driver did turn out to be at 50KHz.

Tony Williams.

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required