Thanks for everything that you write before i have learnd a lot of from this group.
I am designing a circuit which uses a 18f452 and DAC0800 for analog output. Each DAC drives an TIP31 type BJT. Could we use this analog signal to control a DC motors speed? will this be efficent as PWM ? If not so why not ?:)
To a first approximation, the speed of a DC permanent magnet motor is proportional to the voltage across it. The two most common ways to provide a variable voltage to a motor are linear and PWM regulation. Linear regulation starts with the highest voltage you will need, and burns the extra voltage, at slow speeds, as drop across some variable resistance device (i.e. transistor). A PWM regulator lowers the voltage by switching it to zero part of the time, and averaging the result over time. It is noisier and more complicated than linear regulation, but involves no intentional energy waste.
The PIC18F452 includes two PWM pulse generators (programmable total cycle time, and programmable duty cycle). All you need to add to those outputs is a switch (mosfet of transistor, catch diode, and possibly some filter components and isolation between motor supply and processor supply) capable of translating the pulses up to the required voltage and current needed by the motor.
Ok i got it. i have some coding/compiler difficulties using multiple pwm outputs (sending the PID output to a 8 bit port seemed a bit more easy to me :)) but the using PWM output (CCP1 CCP2A) is the best sollution as you said.
Thanks for *all* replies you cleared my m> snipped-for-privacy@gmail.com wrote:
If you run out of PWM outputs, there are simple ways to take the analog voltage output from a DAC and use a comparator to produce a PWM output that produces a motor voltage proportional to the DAC voltage. But it certainly is not a simple as using the firmware PWM output.
An added benefit of PWM control is smoother starting of motors. Usually a motor driven by an analog voltage has to be overdriven to overcome starting friction and then throttled back to prevent over-speeding. This is not a problem in PWM control.
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.