0
\$\begingroup\$

I have a DC motor that needs to be RPM regulated, that is, it needs to turn at constant RPM regardless of the load. I've read this can be done by monitoring current thru the motor windings and appropriately linearly increasing the motor driving voltage.

I have a triangle oscillator and a comparator to generate the PWM. Reference voltage (goes from 0 to 10 V) on the comparator 'selects' desired duty cycle. PWM is running at 20 kHz. Motor is driven by this PWM through PMOS with low-side current sensing done via OPAMP.

Linear current increase linearly increases the reference voltage which again linearly increases the duty cycle.

The problem is when the PMOS is turned off, there is no current thus no voltage sensed and no reference voltage set (for duty cycle). I want previous duty cycle (reference voltage) to stay unchanged for a couple of PWM pulses (lets say 5ms for now) and then change to a new value.

I could have current sensing OPAMP with offset to generate some general duty cycle (reference voltage) with no current. But that would still cause drops in the duty cycle when PMOS turned off.

I'am thinking PI regulator done with OPAMP integrator, would that work, how would I go about implementing it?

Best regards!

EDIT: Its a PMOS with motor and current sensing resistor on low-side.

\$\endgroup\$
  • 1
    \$\begingroup\$ sounds a bit like this whole thing would get easier with a microcontroller thrown at the problem :) \$\endgroup\$ – Marcus Müller Aug 20 '18 at 16:33
  • 1
    \$\begingroup\$ If you want regulated motor speed, DON'T sense the current as the current will depend on the load. Measure the speed of rotation, as either one pules per rev or via a multi pulse sensor. You then increase the PWM on cycle to hold the speed constant. Measure the current only if you want over current detection. \$\endgroup\$ – Jack Creasey Aug 20 '18 at 16:36
  • \$\begingroup\$ If you don't want to sense speed, control armature voltage. Armature voltage is proportional to speed. For better speed regulation, you can use the current sensor to calculate a voltage addition to compensate for the voltage drop due to armature resistance. \$\endgroup\$ – Charles Cowie Aug 20 '18 at 16:49
  • \$\begingroup\$ @MarcusMüller I only have 8bit AVRs, ADC with 15 kSa/s which is too slow. \$\endgroup\$ – Golaž Aug 20 '18 at 16:52
  • \$\begingroup\$ @JackCreasey I dont have access to the shaft and cannot mount the encoder. \$\endgroup\$ – Golaž Aug 20 '18 at 16:54
1
\$\begingroup\$

As @JackCreasey pointed out, current sensor by itself will not give you correct RPM, since current depends on a load.

From your comment you don't have an access to motor shaft and cannot put encoder on it. But any motor is supposed to drive something. If you have an access to that you can measure RPM there.

  • For example inductive proximity sensor can be used with metal gear or turbine.
  • Hall effect sensors can be used with ferrous rotating parts or with plastic parts if you can embed tiny magnet into them.
  • Infrared or laser diodes can be used practically with anything. Usually you need two surfaces with different reflection (e.g. by sticking reflective tape somewhere), but with careful arrangement of focal points and sensitivity it can be done without it. Another configuration is to have direct light path interrupted by rotating part.
  • Finally you might be able to put an encoder on the rotating part. If you have gearbox and the rotation speed is much slower than motor shaft it just means you need encoder with more PPR.

If nothing of the above works for you, there might be a way to use either current or voltage sensor after all, although not by measuring RMS, but by measuring and filtering fluctuations.

You've mentioned that you are worried about condition when PMOS is turned off. But that is exactly when back-EMF kicks in and can be measured to detect the commutation of the brushes.

See here and here for examples and theory.

Update: Found couple more examples for you. These do not count commutational fluctuations but simply measure back-EMF during FET off time: AB-021, AN893

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.