Back-EMF speed detection in motors

On Sun, 31 Mar 2013 09:12:37 -0700, Jim Thompson wrote:


Clever sampling can save you a lot of grief. 'course, I may be outsmarting myself.
The point of the sampling is to pick the time where the current reading represents the average current in the motor. The current in the motor coils is a sawtooth + DC; sampling in the center of the bottom FET on- time gets you right in the center of the rising segment of the sawtooth, which gets you the average motor current that cycle. (Again, assuming I'm not outsmarting myself).

Yes. When the motor is pulling current in the "+" direction the current on the "+" bottom FET is negative and the current on the "-" bottom FET is positive. So the "subtraction" is really an add.

See the data sheet for the LM5109 -- that's representative. Basically most of the H-bridge gate driver chips out there have a charge pump for the high-side gate, to allow you to use N-channel high-side transistors. When the bottom FET turns on it charges up the boost cap for the high side through a diode; when the driver turns on the top FET it uses that boost cap to supply the gate voltage for the top FET.
It's all very clever, and on a bazzilion different gate driver chips. If there's someone out there doing something different I can't call it to mind.
--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

That'll be an logarythmic curve, right? what's the time constant?
--
?? 100% natural

--- news://freenews.netfront.net/ - complaints: snipped-for-privacy@netfront.net ---
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Unless it's a very crappy motor the time constant will be long enough to consider the segment linear.          ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mon, 01 Apr 2013 11:38:33 -0700, Jim Thompson wrote:

Took the words out of my mouth. My answer was going to be "very large compared to the PWM frequency".
If there's curve there it's undetectable on an O-scope.
--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Not true in the presence of losses, and of course, any time you've got current going on a ramp or some other curve, it all goes out the window.
Eddy current losses cause an "instant" jump in current, proportional to the change in voltage, while DCR introduces an L/R time constant, shifting the average-crossing point a little earlier than half. Think of the transformer equivalent model:
. Rdc Lleak . o---RRR----LLL---+--------+ . | | . L Lp R Reddy . L R . | | . o----------------+--------+
Plus (in the case of a transformer proper) whatever secondary load connects across Lp. (Note that Lleak and Lp are divided proportionally, strictly speaking; an L-equivalent circuit like this is only reasonably true for k ~= 1.) In a motor, this might amount to harmonics induced from the finite number of rotor poles and how their exact magnetic profile differs from an ideal circle, but that's all slow-rotatey-stuff that gets averaged and lumped in with DC current (which does most of the real work).
If you sliding-average a pair of "middle" samples (one up, one down), it automatically accounts for the DCR sample error.
I would just as well sample frequently and filter down (takes lots of sampling + DSP), or slow it down analog (a couple analog poles isn't all that fast in response) and sample it at my leisure. Trying to do tricky sample-in-the-middle business is going to get awkward around variable slopes and timing (how do you know you've sampled in the middle of both halves of a 2% or 98% duty cycle waveform, and how is that affected by the sample-and-hold aperture?).
I doubt this is the problem you're having, just... nuts and bolts, eh?
Tim
--
Deep Friar: a very philosophical monk.
Website: http://seventransistorlabs.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mon, 01 Apr 2013 15:02:09 -0500, Tim Williams wrote:

I considered things like this as potential problems. Pragmatically, though, the current sense line (A) looks nice and flat on the O-scope, except for the wingwazzle right at the bottom FET turn-on, and (B), the microprocessor's current measure matches the multimeter.
Point (B) trumps a lot of other arguments for me.
--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

There are chips specifically for sensing motor currents in situations like this. Avago has some.
--

John Larkin Highland Technology, Inc

jlarkin at highlandtechnology dot com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Le Mon, 01 Apr 2013 12:58:25 -0500, Tim Wescott a crit:

Hmmm... I suppose you have some (1st order?) LPF between the current sampling shunt and the ADC input. With a ramp input that amounts to some delay which translates into a fixed offset at sampling time.
Did you check the order of magnitude?
--
Thanks,
Fred.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mon, 01 Apr 2013 21:38:52 +0000, Fred Bartoli wrote:

Yes. All such filtering is parasitic and minimized as much as I can.
--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

g
or

in,

ttdesign.com- Hide quoted text -

Seems you should have solved this issue. Have you tried other motors, changed this and that. What's the effect of a bigger external magnetic field? What happens if you hit it with a heat gun, cool spray... (something else)?
George H.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mon, 01 Apr 2013 20:24:55 -0700, George Herold wrote:

We've kludged in a solution that's satisfactory -- the problem cropped up at the end of the project when the customer is more interested in shipping product than having everything being theoretically perfect, and we had something that would work well enough (this sort of speed control doesn't work well unless your expectations are low at any rate).
I was mostly asking to find out if my customer and I were being insanely picky, if this was one of those "oh yea, that happens all the time" sorts of things, or if I'd invented some new and unique problem that I just wasn't able to find.
It sounds like the last one, unfortunately.
--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Probably just because you're trying to "code" an Analog solution ;-)
I've figured out, at least in my head, how to model brushes straddling commutator bars. When I get time to go back to it, I'll simulate that and see if it matters. Two arguers in my head, one says nay, one says yea ;-)          ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

in

g
y
.
,
tic

That's too bad. I've been hoping you'd chime in one day and tell us you'd solved it. In my limited experience if you don't chase down that last unexplained bump or wiggle, then the law of Murphy guarantees that the wiggle will come back and bite you in the future.
(Knock on wood, I don't want to jinx you :^)
George H.

ttdesign.com- Hide quoted text -

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Tue, 2 Apr 2013 12:15:33 -0700 (PDT), George Herold
[snip]

That's why I was hanging in here so intently... so far ;-) my motor drivers were essentially one-sided with a "reverse" switch. So this full-H problem intrigued me... I was hoping for a solution before I'm facing it all by myself ;-)          ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

the

immaterial

Now if i only believed that is where you are sampling. I think you are hitting near the peak. 'Nuff said.
?-)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

I don't have access to IEEE, but this paper may point you in the right direction....
Xplore
IEEE
Modeling of universal motor performance and brush commutation using finite element computed inductance and resistance matrices
http://tinyurl.com/d77rqpe          ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.