Author Topic: Measuring the speed of a brushed motor with back EMF  (Read 9875 times)

0 Members and 1 Guest are viewing this topic.

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Measuring the speed of a brushed motor with back EMF
« on: October 13, 2017, 03:42:14 pm »
I have need to drive a brushed motor at varying speeds. I also need to know roughly what that speed is. I gather this can be done by knowing the motors resistance and its maximum speed and current draw at that speed. As anybody have any details on how I will go about calculating this?

One method I have found explained measures the voltage across the switch transistor whilst it is off so in effect measuring the voltage that the motor is self generating. I've also been told that I can do this by measuring the current draw I presume during the on period and knowing my PWM duty as this is proportional to the supply voltage and therefore gives me the voltage I am putting into the motor on average.

I'm slightly confused as you can probably see I can sort of see how it works but I could do with some practical pointers.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Measuring the speed of a brushed motor with back EMF
« Reply #1 on: October 13, 2017, 03:55:46 pm »
Do you have the possibility of spinning the motor at a known speed? Eg, a power drill or something like that, where you know the speed?

If so, just do it and measure the voltage generated by the motor. From this, you can compute KV, which is measured in rpm/V.
Internal resistance: ohmmeter across the terminals (move the shaft a bit back and forth to get the lowest reading).
Current draw is load dependent, but open-shaft (idle) current draw is of interest.

Go from there.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #2 on: October 13, 2017, 03:59:02 pm »
So how do I need to relate that speed, voltage generated and motor winding resistance? Would the voltage be proportional to speed? If so simply reading it back should tell me the speed of the motor whilst the PWM signal is low. I suppose otherwise knowing the PWM duty and measuring the current draw during the high side of the signal does give a better chance of taking a reading at high duty cycles.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Measuring the speed of a brushed motor with back EMF
« Reply #3 on: October 13, 2017, 04:55:28 pm »
For a brushed DC motor, RPM varies with voltage by a proportional constant Kv in units of rpm/volt.  The torque varies with the armature current.  This is dependent on two things:  The winding resistance and the applied voltage minus the back EMF (Kv) which is a function of RPM.

https://en.wikipedia.org/wiki/Motor_constants

 

Offline fourtytwo42

  • Super Contributor
  • ***
  • Posts: 1184
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: Measuring the speed of a brushed motor with back EMF
« Reply #4 on: October 13, 2017, 04:58:32 pm »
Hi Simon, there is both an analogue and PWM way of doing this.

The PWM method relies upon measuring the back EMF during the PWM off period however this is beset with noise, commutation spikes being the worst and as you say the available sampling period can get very short so not easy to implement.

The analogue method attempts to model the motor resistance in the power source so that the effective motor emf is constant, meaning the power source voltage rises with rising output current (to compensate for the IR loss).

Some people have also tried measuring the frequency of the commutation spikes but I don't recall seeing this suggestion recently.

By far the simplest method IMOP is mechanical feedback, this could be a tacho or slotted wheel and opto-sensor for example.  Of course there are some situations such as model railways where this is impossible due to the limitation of 2 wires from controller to motor :)

 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #5 on: October 13, 2017, 05:17:20 pm »
Unfortunately sensors won't be an option. At low frequencies I'd guess that even at 99% 1% of the 10mS period is 0.1mS. Like you say, beset with noise though, I guess a low pass filter and a short delay to let it get to nominal back emf should allow for a decent measurement, but this will all need to be done in 0.1mS, I could of course use a lower frequency like 50Hz but that still only gives me 200uS
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #6 on: October 13, 2017, 05:22:37 pm »
I would appear that one suggestion is to run the motor at whatever PWM and then just cut the PWM for some mS and take the measurement. This is an option as speed checking does not need to be done that often.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Measuring the speed of a brushed motor with back EMF
« Reply #7 on: October 13, 2017, 05:56:10 pm »
There are basically two strategies if you can't have sensor feedback.

1: Apply the voltage fitting the desired speed (KV will tell you this) and measure the current. Use this measurement to compensate for losses which are mechanical (you know this loss from the idle motor consumption you measured) and resistive (you know the motor resistance as well). Compensation is of course raising the supplied voltage accordingly.
This works well, but requires that you know all the motor parameters. Plus, it works for both DC and PWM control.

2: Insert "dead times" to measure the back EMF. You still need to know KV, but the other parameters are no longer necessary. Downside is a more complicated drive /measuring scheme. Upside is, you can interchange different motors with the same KV and still have the correct operation. Your "dead time" will normally need to be several milliseconds.


 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #8 on: October 13, 2017, 06:17:49 pm »
The second method seems the easiest, if I make a measurement once a second lasting 10mS that is still 99% power input in what never really wants to make it to 100% anyway, 20mS will still be ok. I could also take a measurement every 2 or 3 seconds. I am controlling a fan so running the motor no load is a bit hard. What might be more relevant is to block the fan which enables maximum speed (no air flow no load) and take back emf readings and speed readings to get the Kv
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Measuring the speed of a brushed motor with back EMF
« Reply #9 on: October 13, 2017, 07:24:31 pm »
You don't need to run the motor at no load to get KV. Just spin the fan at a known speed and measure the motor terminal voltage.

 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #10 on: October 13, 2017, 07:26:53 pm »
Yes that is what I was thinking.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Measuring the speed of a brushed motor with back EMF
« Reply #11 on: October 13, 2017, 07:30:27 pm »
Yes that is what I was thinking.

I'm not a 100% sure.
What I mean is, spin the fan using an other motor at a known speed. Don't apply power to the fan motor at all, just put a voltmeter across it.
The fan PMDC motor will act as a generator supplying (rpm * KV) volts.
« Last Edit: October 13, 2017, 07:32:15 pm by Benta »
 

Offline ggchab

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: be
Re: Measuring the speed of a brushed motor with back EMF
« Reply #12 on: October 13, 2017, 08:16:46 pm »
Quote
I would appear that one suggestion is to run the motor at whatever PWM and then just cut the PWM for some mS and take the measurement. This is an option as speed checking does not need to be done that often.
This is what I am doing to control the speed of the motor of my BF20 milling machine. It's a 220VDC motor.
In my case, this has no noticeable effect on the power of the machine. I bought a cheap tachometer to measure the rotation speed of the spindle and calibrate the system.
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1275
  • Country: gb
    • bitdynamics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #13 on: October 13, 2017, 09:27:01 pm »
How accurately do you need to know the speed of the motor?

For a motor, the Forward Voltage (applied voltage) is the sum of the BackEmf and (Current x Resistance).  Where the BackEMF is of course linearly proportional to the motors rotational speed.  So, if your controller measures it's DC supply voltage, then you know the forward voltage (Vsupply x PWM duty) and if it measures the current it is supplying to the motor, then you have everything you need to calculate the motors speed!  It's not highly accurate, because the DC resistance changes with motor temperature, but i've found it to be perfectly adequate for low precision requirements.

I do a fuel pump controller that estimates the fuel delivery quanity from the pump by estimating the motors speed via this method.


E.g.

Say with a 24v supply, and a PWM at 50% duty cycle, that means you have a 12V forward voltage (24 x 0.5).  iF you measure 1 amp of current flowing to the motor, and you know the motor has a 1 ohm resistance, then you know the backEMF must be 11 Volts.  (12 - (1 x1) = 11.

On my pump controller, because the pump has a lot of friction, when the pump is stationary (at power up for example) i apply a small PWM, not sufficient to create enough torque to start the motor spinning, and measure the current, and this provides me with an adaptive DC resistance value to use in subsequent calcs.

Of course this technique works better with small motors that tend to be quite resistive rather than mainly inductive.
« Last Edit: October 13, 2017, 09:31:35 pm by max_torque »
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1275
  • Country: gb
    • bitdynamics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #14 on: October 13, 2017, 09:29:18 pm »
I should add that this assumes your PWM frequency is significantly faster than the fundamental frequency response of the motor, so the current you measure is effectively a DC value.  (For a brushed motor, that would usually be the case in order to avoid torque oscilations and noise etc).  This means you don't need to coherently (ie not aligned to PWM phase) measure the motor current, and in fact, a low pass filter will be advantageous to remove signal edge noise and other fluctuations
« Last Edit: October 13, 2017, 09:30:50 pm by max_torque »
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #15 on: October 13, 2017, 09:40:29 pm »
Well this is 12V 20A so less than 0.6 ohms if most of that 12V is to counteract back emf
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #16 on: October 13, 2017, 11:18:14 pm »
Do i need to calculate with the average current per cycle or the instantaneous current when switched on? it will have to be as accurate as i can make it or they can use the right tool for the job: a brushless one.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: Measuring the speed of a brushed motor with back EMF
« Reply #17 on: October 14, 2017, 02:06:00 am »
Brushed motors have current draw that fluctuates x times per cycle (depends on how many brushes are present and the number of commutator segments) --- you could probably get the speed far more accurately with that --- in fact, here's an interesting article and reference design about getting the position that way:

https://e2e.ti.com/blogs_/b/behind_the_wheel/archive/2017/08/16/the-seat-remembers-brushed-dc-motor-ripple-counting-drives-innovation-in-full-featured-memory-seats
http://www.ti.com/tool/TIDA-01421
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3178
  • Country: au
Re: Measuring the speed of a brushed motor with back EMF
« Reply #18 on: October 14, 2017, 04:06:44 am »
Seeing you are driving a fan, for a rough and ready rpm sensor could you not shine an LED or other light source through the fan blades and measure the chopping frequency of the blades? Or use a photoreflective sensor?
 

Offline oldway

  • Super Contributor
  • ***
  • !
  • Posts: 2172
Re: Measuring the speed of a brushed motor with back EMF
« Reply #19 on: October 14, 2017, 06:09:26 am »
There are several types of brush motors, I assume it is a permanent magnet motor.

U = E + RxI
U is the average voltage across the motor. With PWM, it can easily be obtained by filtering (low pass filter) the voltage at the terminals of the motor.
E is the electromotive force
R is the internal resistance of the motor.

If it is necessary to be able to estimate the speed of the motor for a simple indication, it would be sufficient to use the voltage U as an approximate indication of the speed.

If one wants a more precise indication, it is necessary to correct U by subtracting RI to obtain E
It is therefore necessary to have the information of the value of the current I.

Since it is a low voltage (12V) and a high current (20A), the best way to obtain this information is through a Hall effect sensor.

It is sufficient to subtract in an operational amplifier a fraction of the current information of the value of U to obtain E.

By having Kv and E, we have RPM information.

To calibrate the system, it is not necessary to measure the internal resistance of the motor.

It is enough to test the system in 2 different conditions (full load and closed output, without flow) by measuring in each case the speeds, currents and voltages at the terminals.

Based on the measurements, the value of R can be calculated (2 equations with 1 unknown R) and the correct gain of the information I can be adjusted to obtain the correct value of E in both cases.

To measure the RPM to calibrate the system, a stroboscope method can be used by painting a white line on one of the blades and using a high-brightness LED controlled by a function generator.
« Last Edit: October 14, 2017, 06:49:18 am by oldway »
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #20 on: October 14, 2017, 06:56:30 am »
I'm still trying to figure out the best of the 3 ways:

1) As max_torque suggested measure the current and know the effective supply voltage by multiplying V supply by the duty factor. If I have to measure the current only during the on time this will need timing (I assume with an interupt that fires on an event on the PWM counter), if it is the average current over the period then a low pass filter on the sense resistor or output of a current sensor will make life easy.

2) measure the back EMF voltage during a few mS of off period, I don't expect any rapid change in the system (it's a fan not a traction application) so I don't need to do it too often.

3) characterise the motor speed versus PWM drive input for the expected working conditions, this would of course give a very approximate value of speed, I have played around with fans before and found that the motors are wound in such a way that a completely blocked fan and a completely free fan go at the same speed on full supply voltage. If this is the case then this method would be not too bad and I'd simply have to characterise the fan although it would be nice to have something more robust for applications where the motor is not wound appropriately for this.

4) refuse to do so if anyone asks and tell them to man up and use a brush-less fan with precise speed control but I'd rather not have that as an option ;)
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #21 on: October 14, 2017, 06:57:41 am »
Sensors are not an option, it's just fraught with potential problems, difficult to install (I don't make the fan) and liable to failure.
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1275
  • Country: gb
    • bitdynamics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #22 on: October 14, 2017, 02:51:15 pm »
no requirement to measure current coherently.  Just just a hall effect or shunt type sensor, low pass filter the output.  Assuming you are not driving the load motor over a massively dynamic speed profile, then you can low pass filter down in hardware into the single Hz without issue.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #23 on: October 14, 2017, 02:56:00 pm »
Rightho, no fan control does not require fast reaction times so yea sounds simple enough but you think it will become hard to use your method with high inductance low resistance motors? I'll have to measure some see what they are like.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: Measuring the speed of a brushed motor with back EMF
« Reply #24 on: October 14, 2017, 03:53:27 pm »
Measuring the ripple of the supply current is probably the easiest and most accurate, since it's basically using the commutator as a rotary encoder.

https://www.romanblack.com/encoder.htm
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #25 on: October 14, 2017, 03:58:24 pm »
You will find larger motors have more armature coils so the counts per rev go up increasing the frequency to sample. It also means looking very carefully at each motor i may use and potentially having o alter a circuit that needs to be pretty universal. I can of course give this a go with a sense resistor and scope and see what I get. Of course this all becomes nightmarish with PWM control and near impossible as I may end up counting my PWM pulses.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Measuring the speed of a brushed motor with back EMF
« Reply #26 on: October 14, 2017, 09:48:26 pm »
Simon, you're overthinking this and making it much more complicated than needed.

You need to go back to the basic model of a PMDC motor, which is in the attached pic.

R is the lumped resistance of armature, brushes etc. L is armature inductance; e is the back EMF from the armature rotating.
It's simple. For dynamic system response, L is negligible compared to the mechanical time constants, but is of course helpful for PWM smoothing.
« Last Edit: October 14, 2017, 09:58:23 pm by Benta »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: Measuring the speed of a brushed motor with back EMF
« Reply #27 on: October 14, 2017, 10:44:46 pm »
Monitoring the back EMF from a DC motor, is a common way to regulate the speed. Various ICs are available to do this, but none of them for the kind of power level you required. See link below for an example:
http://pe2bz.philpem.me.uk/pdf%20on%20typenumber/I-L/LA5586.pdf
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #28 on: October 15, 2017, 09:03:29 am »
Simon, you're overthinking this and making it much more complicated than needed.

You need to go back to the basic model of a PMDC motor, which is in the attached pic.

R is the lumped resistance of armature, brushes etc. L is armature inductance; e is the back EMF from the armature rotating.
It's simple. For dynamic system response, L is negligible compared to the mechanical time constants, but is of course helpful for PWM smoothing.

Well yes and no. As max_torque pointed out if the motor resistance is low this gets hard, I expect that with a very low resistance the inductance totally dominates so the back emf will always yield a result that is very close to the supply voltage making it hard to pick out changes in speed.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Measuring the speed of a brushed motor with back EMF
« Reply #29 on: October 15, 2017, 11:20:15 am »
This is where your instinct is wrong. Totally dominant is the back EMF and it will tell you the speed quite precisely.
If, for instance, KV is 500, your back EMF will be:
0 V @ 0 rpm
1 V @ 500 rpm
2 V @ 1000 rpm
3 V @ 1500 rpm
and so on.

For practical motors, L is insignificant. Think about it in power terms. If the motor would be mainly inductive, it would'nt deliver any mechanical power.
« Last Edit: October 15, 2017, 06:43:43 pm by Benta »
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #30 on: October 15, 2017, 12:28:53 pm »
Well I shall experiment and see.
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1275
  • Country: gb
    • bitdynamics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #31 on: October 15, 2017, 04:53:36 pm »
As the DC resistance of the motor gets smaller, the smaller the voltage term of I x R becomes, so your PWM applied voltage (the Fwd voltage) actually gets proportionally closer to the back emf.  Hence, the smaller the R, the closer you can get to just considering the speed of the motor to be linearly proportional to the applied PWM duty cycle.

Consider a motor of Kv equal to 1000 rpm/volt and with a DC resistance of 1 ohm.  With a forward voltage of say 12V (50% DC on a 24V supply), and for 1amp current.

Vfwd (voltage applied by pwm to motor) = 12
Vi (the voltage driving the current) = 1  (1 amp x 1 ohm)

Therefore
Vbemf must be 11V, and the motor must be doing 11,000 rpm.  (91.7% of the basic PWM duty applied)


If the motor only had a 100 mOhm resistance, and everything else was the same, then Vi is just 0.1v  (0.1 ohm x 1 amp), Vfwd is unchanged at 12v, so Vbemf is now 11.9V and the motor is therefore doing  11,900 rpm. (99.1% of the basic PWM duty applied)


So, as the resistive component gets smaller, then although you need to measure current more accurately, the error caused by that measurement reduces commensurately!

In fact for a Fan Load, which has a power consumption proportional to the cube of it's speed, you could not even measure current and just estimate the speed from a correction factor to the PWM applied.  Of course, if you want to be able to detect a blocked fan, then you need to measure the current, so you can detect a stalled motor etc
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #32 on: October 15, 2017, 07:02:05 pm »
I have just experimented with a 24V fan that has a 3.5 ohm resistance and uses 2.97A at 24V, easy enough to measure with a meter and confirmed by my power supply in constant current mode, (I figure with mV and 10mA resolution the power supply makes a higher resolution ohm-meter ;))

Indeed with this fan estimating speed was a piece of cake with 10mA resolution which if my measurement range had been 3A would have been a 0.3% resolution. This is less than I'd get with a 10 bit ADC (0.1%) but of course with the time i have oversampling what is a ripply voltage anyway off the current sense resistor would gain plenty of resolution.

I got 5.175mV/rpm

Given that most brushed motors seem to have a 10-20 times start up current I guess that for 12V 20ish A that is 30-60 m-Ohm resistance. Yes I'd want to measure current anyway to protect against potential fan blockage so a current sense resistor will have to go in, a whopping 800uR with a 20mV full scale if i want to keep dissipation down to 0.5W normal running. Would running off a 30mV ADC reference be asking for trouble? I guess I'd have to amplify that result but it's probably a cheaper option than a nice LEM current sensor for £10-12 a pot
« Last Edit: October 15, 2017, 08:19:29 pm by Simon »
 

Offline oldway

  • Super Contributor
  • ***
  • !
  • Posts: 2172
Re: Measuring the speed of a brushed motor with back EMF
« Reply #33 on: October 16, 2017, 12:55:03 pm »
Sincerely, I can not understand !!!!  :palm:

I was already working in 1981 in power electronics and we were making the speed control (thyristor converters) of  independently excited DC motors (same as permanent magnets motors)  using either the electromotive force obtained by performing the U-RxI operation, or using the information of a tacho-generator RE0444 Radio Energie.

Why do you have a problem for obtaining the electromotive force of a DC motor in 2017 ? We already solved this problem in the years 80's....
Nb: with electromotive force, you have easily the RPM information.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #34 on: October 16, 2017, 12:57:37 pm »
Well I'm sorry "old" man but i'm a newcomer, I have much to learn. As I explained above, gen the help received and my experiments I too now understand this and hopefully how to achieve it.
 

Offline oldway

  • Super Contributor
  • ***
  • !
  • Posts: 2172
Re: Measuring the speed of a brushed motor with back EMF
« Reply #35 on: October 16, 2017, 04:18:33 pm »
That is so easy !!!!

I have already explained how to do it, but it does not seem to interest you.

The voltage U is the voltage at the terminals of the motor duly filtered by a low-pass circuit to eliminate the AC component of your PWM.

It is necessary to know the current of the motor.
It does not matter how you measure that current. (shunt + amplifier, Hall effect sensor, ...)

It is then necessary to subtract a fraction of this current information from U to perform the operation E (electromotive force) = U - R x I

You subtract it using an operational amplifier.

The number of RPM's is proportional to E.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #36 on: October 16, 2017, 04:33:51 pm »
Yes and i have got it now thank you and will be using a micro controller.
 

Offline oldway

  • Super Contributor
  • ***
  • !
  • Posts: 2172
Re: Measuring the speed of a brushed motor with back EMF
« Reply #37 on: October 16, 2017, 04:42:46 pm »
With this method, speed control accuracy of 1 to 2% was achieved and with a tach generator, an accuracy of 0.1%.

This gives an idea of the accuracy of the speed measurement. (1 to 2% accuracy)
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #38 on: October 16, 2017, 04:44:52 pm »
Yes 1-2% is fine, the current sense resistor has a tolerance of 1% to start with so really if I can read the speed out with 5% accuracy I'd be happy.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Measuring the speed of a brushed motor with back EMF
« Reply #39 on: October 16, 2017, 05:42:36 pm »
Quote
It is necessary to know the current of the motor.

I disagree. There's no need to know the current for accurate speed control.
It is necessary for an analog control loop, where you have no option to measure the pure back EMF and thus have to compensate for the ohmic losses.
But for a smarter loop, where you have the option of having small time breaks in the drive voltage, measuring pure back EMF is possible. The advantage is of course that you do not need to know the internal motor resistance.

The drive current is naturally interesting for other reasons (overload, torque etc.).
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Measuring the speed of a brushed motor with back EMF
« Reply #40 on: October 16, 2017, 05:58:51 pm »
Yes i will reserve myself the option to measure back emf but when doing a design it's nice to have all the options there are avoiding board redesigns for different projects. Indeed I would very much want to measure current anyway to determine if there is an over-current or blocked motor situation plus the option of reporting power consumption (one day when I get round to doing coms software).
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8168
  • Country: fi
Re: Measuring the speed of a brushed motor with back EMF
« Reply #41 on: October 16, 2017, 07:26:13 pm »
A bit OT:

You also kinda "need" the current measurement and current-mode feedback loop anyway to form a proper motor controller...

... unless you do it the "stupidly dumb & the old way", size all the components for the stalled rotor current defined by the motor lumped R & DC bus voltage, and let the motor iron saturate and the motor run at maybe 10% efficiency while spinning up (+ all the corner cases). Then you write some control logic to shut it down if this unsafe (but completely normal everyday) situation lasts "too long", and buy FETs 10x sized over your need, and spend time building proper drive for them.

The lower the motor R (and hence, the better the nominal efficiency), the harder it gets to make it work the dumb way (meanwhile, it works very well for very small motors)

The proper, modern, well designed alternative is to implement the normal current mode feedback, which always runs the motor at good efficiency, and provides fairly accurate torque limit in case you'll ever need it. The "overcurrent" detection is not for faults, it's part of normal operation, since, contrary to common misbelief, this "overcurrent" is not any kind of fault but happens all the time; the most prominent example being the startup!

Properly designed drive gives the same (or nearly so) torque, but with much lower current, much better motor efficiency, and for much cheaper, since it 100% guarantees no blown fets without carefully oversizing everything.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Measuring the speed of a brushed motor with back EMF
« Reply #42 on: October 16, 2017, 07:44:15 pm »
I don't think anyone has said that current monitoring is not a good idea. Just that it's irrelevant to speed control.

Quote
Properly designed drive gives the same (or nearly so) torque, but with much lower current, much better motor efficiency

Really? So a PMDC motor supplied with a DC voltage and operating at, say, 70% efficiency will suddenly become 85% efficient with the right drive?
I think you need substantiate that. References, please.

 

Offline oldway

  • Super Contributor
  • ***
  • !
  • Posts: 2172
Re: Measuring the speed of a brushed motor with back EMF
« Reply #43 on: October 16, 2017, 07:52:42 pm »
A DC motor drive, whether done by phase control or by PWM, must have a current limitation and a soft start circuit.

The reasons are multiple, not only for the protection of semiconductors but also for that of the motor. (for exemple, to avoid flash to the collector because commutation becomes bad and brushes begin sparking during overcurrents)

And we forget one thing with the permanent magnet motors: the demagnetization of the magnets by the armature reaction during overcurrents.

So, as I said, we need the current information anyway.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8168
  • Country: fi
Re: Measuring the speed of a brushed motor with back EMF
« Reply #44 on: October 17, 2017, 08:05:28 am »
Quote
Properly designed drive gives the same (or nearly so) torque, but with much lower current, much better motor efficiency
Really? So a PMDC motor supplied with a DC voltage and operating at, say, 70% efficiency will suddenly become 85% efficient with the right drive?
I think you need substantiate that.

Sure.

Think about the extreme case: When you apply the full voltage in a stalled DC motor, it basically takes current only limited by the R of the windings and brushes, hence massive I^2R losses, without providing more torque than the iron magnetization can support anyway. This is the "diminishing returns" area of operation - double the current, only get slightly more torque. Typically the efficiency starts to drop considerably after about 150-200% the nominal torque (~ current) of the motor - (of course depending on the motor!) You can check the efficiency curves on the motor datasheets if you don't believe this.

Now, when you apply a controlled, i.e., limited current, which takes into account what the motor can actually do, you get the same (or nearly the same) torque with much less current, much less losses, better efficiency.

Of course, a totally stalled motor will never do any work, and the efficiency, by definition, is always 0%. The absolute losses are still important; with a proper driver, the motor can survive while giving this torque indefinitely.

But when the motor is driven at low RPMs - sometimes this happens only during spin-up, sometimes this operating mode is continuous (such as in an EV when driving in city traffic) - the choice of dumbly applying full voltage, vs. "just apply some PWM based on speed control, using current measurement only as a safety thing", vs. "use a proper current mode", might mean motor efficiencies such as 10%, 60%, and 90%, respectively. The middle one of those three examples is hard to predict and analyze, and the solutions typically have much more "safety" logic (and, hidden state) than anybody expected when they chose to use such a "simple" system :). And this safety logic often gives unnecessary "nuisance trips", when the user actually wanted a torque control.

It really depends, in many cases with constant, light loads and easy dynamics, there is of course absolutely no difference between a current mode control and "simply" using speed information as a feedback signal for the PWM, except for the short inrush at spinup, which may be totally insignificant in the total energy consumption.

When building the inverter & motor for a test EV years back, one of the first things to notice between the control algorithms was the heating of the motor, while the PWM scheme stayed the same. This was hard to see on the lab table, but when driving a real 600kg vehicle at walking speeds, motor running at some hundred RPM only, this was a total showstopper. Sure, this was an induction motor, so there is the extra challenge of controlling the magnetization, so it's not a good example, but wanted to mention it anway since the effect was very dramatic. The first control scheme was a stupid speed regulation loop, the latter one was a torque control based on slip feedback.

With small motors, having high resistance anyway, and designed to work near the full speed most of the time, with a rather constant load, this is often ignored. A proper current-controlled source can really spin up a motor with 90% average efficiency, while a "dumb" solution may have average efficiency at 45% (ramping from 0% to 90%), but does this matter if the spin-up time is limited anyway, and there is a protection scheme that prevents the stalled motor running all the time?

BTW, since I sometimes like to give analogies, even though they are not 1:1 identical: this is analoguous to charging a capacitor from a voltage source through R, which always gives 50% efficiency by definition (there was a huge thread about this, it's hard to grasp to some!), vs. charging it with a current-controlled switch mode supply which doesn't have such 50% limit. In this analogy, the inductance of the "converter" (motor) saturates, and the system is back to the resistive nature only. Now, if you only charge the capacitor (spin up the motor) once, this 50% efficiency might not be an issue, but if you are have an extra load, draining the "capacitor" (BEMF), keeping it at 20% voltage all the time (i.e., driving an EV with motor running at 20% nominal speed), the control scheme must ensure that it stays a proper "converter", i.e., the core doesn't start to saturate. And by this, I don't only mean the "fully saturated" condition, but the area of operation which is kinda ok, but with diminishing returns and poor efficiency. You don't need to do that, just like you don't need to drive LEDs at absolute maximum ratings, since, even though they'll give you the most lumens out that way, the lm/W figure will drop.

But this is why each and every brushed DC motor controller driving large motors will always have a fast current regulation loop, which is the inmost, primary loop. It's the right thing to do, and it isn't even more complex - it's actually a lot simpler once you get rid of the old notions, since it makes sense -- just like we are finally starting to accept the current mode as a right thing to do when talking about switch mode converters, but the same is happening slower with motors, even though it's exactly the same case (imagine a huge output capacitor on a synch buck converter to simulate the inertia and BEMF).

Doing the Wrong Thing is often good enough, and doing the Right Thing is sometimes wrong in real engineering, but you need so stop and think about these things.

Hope this helps.
« Last Edit: October 17, 2017, 08:12:27 am by Siwastaja »
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2572
  • Country: us
  • Not An Expert
Re: Measuring the speed of a brushed motor with back EMF
« Reply #45 on: October 17, 2017, 08:37:23 am »
Brushed motors have current draw that fluctuates x times per cycle (depends on how many brushes are present and the number of commutator segments) --- you could probably get the speed far more accurately with that --- in fact, here's an interesting article and reference design about getting the position that way:

https://e2e.ti.com/blogs_/b/behind_the_wheel/archive/2017/08/16/the-seat-remembers-brushed-dc-motor-ripple-counting-drives-innovation-in-full-featured-memory-seats
http://www.ti.com/tool/TIDA-01421

How is this not the "right" answer?  That's a pretty square wave you can count.  Not sure how much better you'll get than that.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf