Shop OBEX P1 Docs P2 Docs Learn Events
PWM Signal VS R2R latter or DAC chip for motor speed. — Parallax Forums

PWM Signal VS R2R latter or DAC chip for motor speed.

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2012-11-27 19:38 in General Discussion
So i had this idea and i was unable to find much on the topic via google. What if one were to generate motor control signal via a propeller/resistor based dac, or a nice 12 bit stand alone dac chip instead of just sending a PWM signal off to the hbridge? It seems to me like maybe you could get alot more accuracy and a very smooth ramp using a 12 bit dac chip to generate the motors speed signal. Is there any reason people dont genrally use a nice dac in motor control applications?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-27 08:03
    Yep ... torque and efficiency. Why do you think that variable speed tools use PWM for speed control? The speed is proportional to the average current through the motor while the torque is roughly proportional to the maximum current. If you use a DAC and use the DAC's output to drive a switching circuit like an H-Bridge, the H-Bridge's transistors will be dropping the supply voltage internally while the speed is low. That'll result in a lot of power being dissipated as heat in the H-Bridge ... avoided when the H-Bridge transistors are driven hard on or off by PWM pulses.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-11-27 08:37
    Adding a little to Mike's observations, the inductance in the motor windings can give you the smoothing you're after for free. When a pair of H-bridge transistors first turn on, current begins to build in the motor coils; it doesn't just hit max right away. When one or both transistors turn off, current continues to circulate through coil via the protection diodes, tapering off as the magnetic field in the coils collapses. At a high-enough PWM frequency, this will result in an almost steady motor current that's proportional to the PWM's duty cycle.

    -Phil
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-11-27 10:10
    So can I ask whats a high enough pwm frequency? right now my easiest option would be running a 1khz to 32khz signal becuase im using an arduino to do the motor stuff, thats it there are going to be 2 props controlleing the rest of the robot. The thing is i have two different hbridge chips here the l293e and l6205, both will work well for me depending on the trade off I want to make. They are both capable of switching at 100khz, would I gain much at 100khz vs 32khz besides the added complexity of a dedicated pwm chip? Ive made a seperate pcb for each motor which has 3 .1uf decoupling caps on it and 4 3amp shottkeys for back EMF, im also using nice sheilded cables for most of my motor signaling. So im sure the set up ive devised can Handel 100khz if not more without alot of issues except wiring in a new chip
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-11-27 10:14
    Any frequency above the human audible range should be okay. At too high a frequency, the transistors will spend too much time in their linear region transitioning between states. At audible frequencies, the motors will emit an annoying squeal. I'd start at around 20 kHz. or so.

    Going beyond that vague advice, you'd have to know the inductance of the motor windings and how much ripple current you could tolerate, then compute the frequency that would give you that. IMO, it's not worth the trouble.

    -Phil
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-11-27 19:27
    Any frequency above the human audible range should be okay. At too high a frequency, the transistors will spend too much time in their linear region transitioning between states. At audible frequencies, the motors will emit an annoying squeal. I'd start at around 20 kHz. or so.

    Going beyond that vague advice, you'd have to know the inductance of the motor windings and how much ripple current you could tolerate, then compute the frequency that would give you that. IMO, it's not worth the trouble.

    -Phil

    Phil, if you go too high on the frequency, the windings being inductors will have an increasing impedance to the point your motors performance will begin to degrade as well?
    FF
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-11-27 19:38
    Phil, if you go too high on the frequency, the windings being inductors will have an increasing impedance to the point your motors performance will begin to degrade as well?
    That would be true of pure AC. But don't forget that PWM has a strong DC component equal to the duty cycle multiplied by the peak voltage.

    -Phil
Sign In or Register to comment.