Circuit to simulate PWM?

Does anyone know of a circuit design that will simulate PWM (pulse width modulation) for controlling DC motors? I've looked into this, and I know this can be done fairly easily with microcontrollers, but I figured there must be a way to do this without a logic controller.

I'm thinking a variable resistor to control the frequency of the pulses/capacitor charging, capacitors to hold the charge between pulses.

Uh, yes.. I'm a total newbie.. but I'm very interested in learning.

I had some electronics theory (minimal) in physics when I went to University, but that was a good number of years ago. I was thinking of picking up a couple of those 'Evil Genius' books. Anyone have any comment on them?

Thanks in advance!

Troy

Reply to
Newt
Loading thread data ...

Should be able to do it with a 556 dual timer. One for the period, one for the pulse width.

So learn microcontrollers ;-)

Something as simple as an R8C (16 bit, internal flash, 20 pin DIP, $4-5) gives you, for example, either PWM outputs (software generated) with I2C or serial control, or you could use the A/D inputs for control, and the I2C/serial pins for more PWM outputs.

Larger chips like the M16C have three-phase PWM motor control built in.

Reply to
DJ Delorie

The classic analog circuits are...

generate a triangle or sawtooth waveform and run it into a comparator, comparing against the desired DC setpoint. The comparator output is the PWM.

fire a one-shot at a fixed rate, and vary its pulse width

there's also a single-comparator oscillator that's pwm-able, but too much hassle to draw in ascii.

a delta-sigma modulator

Digitally,

spin an n-bit binary counter and stuff it into a magnitude comparator. The other comparator input is the desired output level. The comparator output is pwm.

Lots of microprocessors have integral PWM generator blocks. The 68332 has 16 of them (each of which, rc lowpass filtered, makes a decent slow dac)

you can also do a digital delta-sigma.

If you pwm a motor, it whines. If you do delta-sigma, I guess it would growl or hiss or something, but would sure sound different. (I'm into d-s lately, as in adding effective bits to dacs by d-s dithering.)

John

Reply to
John Larkin

I think you might do well to build this function from the simplest blocks. A dual comparator such as an LM393 and an output buffer switch should allow you to build various versions of a PWM to drive a small motor.

formatting link
Page 8 shows how to make a square wave oscillator with a section. The capacitor in the circuit has a triangle voltage wave across it. Use that triangle as one input to the second stage, and your PWM control voltage to the other input. As the control voltage swings through the triangle wave, the output will represent the intersection of the two inputs. Beef that output up with a transistor or mosfet and drive the motor through that switch. Don't forget to add a diode across the motor to carry the inductive current when the switch is off.

Reply to
John Popelish

Sounds like you are thinking about implementing an analog computer so what you need is an operational amplifier with its gain set to the gain you expect from the part that converts your PWM signal to the voltage that drives your motor.

Mind you, if you scale things elswhere then you don't....

As for the 'Evil Genius' books I'm still working on the simulations so I'd suggest you ignore anything written about me that claims to be biographical.

DNA

Reply to
Genome

Hello Newt,

Ok, you've got all the options from John and others. Let me add one, in case you want to get away with the minimum of work:

Look around in your lab if you can find (or borrow) a function generator. Many of these offer a TTL compatible output (or even higher voltage) where frequency and duty cycle are selectable. I use the old Wavetek-13 for that stuff. Now all you need is a power device like a big FET that drives the motor. Its gate can be driven by that function generator. Just make sure there is enough drive amplitude to thoroughly switch the FET. The data sheet will say whether it's happy with 4-5V or needs more. If you only have a TTL output buy a "logic-level" power FET.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

Yep.

Take your basic 74hc14 schmitt trigger. Hang a capacitor to ground on pin 1.

Put a pot from pin 2 to pin 1. Voila! a variable frequency oscaillator.

To add adjustable duty cycle, hook the pot instead with the wiper to pin 2, then a diode from either end of the pot to pin 1 (diodes facing in opposite directions.).

So one side of the pot will control the charge time, the other side the discharge time. Sweet.

No op-amps, function generators, counters need apply.

Reply to
Ancient_Hacker

Actually, that's not simulating PWM, that is PWM.

I agree with DJ, simplest to design and build is a 556 (dual 555) or two 555 timer ICs. One set up as a clock, the 2nd set up as a monostable.

You can control the On time with a potentiometer on the Monostable, or you can control it by varying the voltage on Pin 5 (assuming two 555's rather than a 556). It won't be linear, but not far off.

If you want it to be a linear voltage controlled PWM, instead of a resistor on the Monostable, use two PNP transistors set up as a current mirror, to charge the capacitor with a constant current.

I've not read the "Mad Scientist" books, but from the reviews I don't think I'd spend the money on them.

Read data sheets online, and buy The Art of Electronics by Horowitz and Hill. Fantastic book, and a lot less expensive than it used to be.

Any books by Forrest Mims are good for beginners, too. It pains me to say this, but Radio Shack carries (carried?) them.

Steve Greenfield

Reply to
polymorph

Only one 555 needed

formatting link

Reply to
GPG

View in Courier font

+12 ---+---+----------+--------------+-----+ | | | | | | | | | | [1K] | ---------- [D2] [Motor] | | | 8 | a| | | +-----|4 | | | / | | +-----+ 25K \\
Reply to
ehsjr

"GPG"

** That is widely used 555 circuit for manual, PWM control.

With a 10 kohm pot and C = 22nF ( on pins 2 & 6 ) oscillation is at about 5 kHz.

The PWM duty cycle is variable from 0 to 100% with the pot.

DC supply range is from 5 to 15 volts - add a regulator IC to the 555 supply if higher voltage is wanted.

....... Phil

Reply to
Phil Allison

On Wed, 27 Sep 2006 18:27:03 GMT, Joerg wrote in Msg.

...and don't forget that freewheel diode to protect the FET.

robert

Reply to
Robert Latest

use a 555.

google for 555 and PWM and you'll get dozens of hits.

Bye. Jasen

Reply to
jasen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.