Searching \ for 'Motor Speed with back EMF..' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/motors.htm?key=motor
Search entire site for: 'Motor Speed with back EMF..'.

Truncated match.
PICList Thread
'Motor Speed with back EMF..'
1998\08\13@125624 by Dan Larson

flavicon
face
Can any OP amp experts help me out with something please?

I want to make an "absolute value" amp to output the same positive
voltage for a negative input as it does for a positive input.

My back EMF idea:

Both sides of the motor are fed to the two inputs of a
differential amp.  The output of the differential amp is fed
to the input of the "absolute value" amp.  The output of the
"absolute value" amp is fed to the input of a sample & hold amp which
is gated by the inverted PWM gate signal. The output of the sample & hold
amp is fed to a voltage to frequency converter.  The output
frequency of the converter is sampled or timed using a single
pin on the PIC (RA4?).  The period measured is inversely proportional
to the motor speed, hopefully....

This sounds a bit "Rube Goldberg'ian" to me though.  Is there
a simpler way?  I have not seen any other schematics of anything
like this yet so I can't decide myself....

If the PIC had an A/D I could skip the F-V step. Then the sample
& hold amp could be dropped because the PIC knows when to read
the voltage from the "absolute value" since it generates the PWM
signal.

But how do I simply this with a 16F84 with no A/D?

Anyway, I need an op amp circuit that an perform an absolute
value operation so I can experiment with this idea.  I'd
ask for a sample & hold amp too, but I am sure I can look one
up somewhere else.



Thanks in advance for your feedback.

Dan

1998\08\13@172504 by Thomas McGahee

flavicon
face
part 0 2794 bytes content-type:application/octet-stream; name="absolute.sch"http://www.cadsoftusa.com/

Follow the instructions and download the license.key and version
of Eagle appropriate for your computer. Install. Under File enter the
schematic layout part of the program and load the file
I have attached here called ABSOLUTE.SCH (after you have moved the
file to a subdirectory, of course).

I think it would be a good idea if we *all* downloaded a copy of
EAGLE Light so that we all have a common, FREE method for
exchanging ideas in schematic form.

Under Windows 95 you can associate the file type .SCH with the
EAGLE.EXE program and have it automatically launch whenever you
click on a file with the .SCH extention.

Hope this helps.
Fr. Tom McGahee

----------
{Quote hidden}

Content-Type: application/octet-stream; name="absolute.sch"
Content-Description: absolute.sch (Schematic)
Content-Disposition: attachment; filename="absolute.sch"

Attachment converted: wonderland:absolute.sch (????/----) (00013035)

1998\08\13@175627 by Ake Hedman

flavicon
face
> I think it would be a good idea if we *all* downloaded a copy of
> EAGLE

I sure can agree on this. This is the best schematic capture & PCB program i
have tested so far.

/Ake

> {Original Message removed}

1998\08\14@100303 by Mike Keitz

picon face
On Thu, 13 Aug 1998 11:53:31 +0000 Dan Larson <dlarsonspamKILLspamcitilink.com>
writes:

>I want to make an "absolute value" amp to output the same positive
>voltage for a negative input as it does for a positive input.

Circuits with this function are commonly found in op-amp application
circuits or op-amp cookbook type of books.  It is often called a
"precision full-wave rectifier" instead.

>
>But how do I simply this with a 16F84 with no A/D?
>
The back emf voltage could be used with a single-slope ADC (capacitor
charge timer) often used with PICs.  If the charging cycle is short enugh
to fit in the motor off period, no sample and hold would be required.
Another way to look at it is it is a synchronous voltage to frequency
converter where the period of one cycle at a time is measured.


>Anyway, I need an op amp circuit that an perform an absolute
>value operation so I can experiment with this idea.

If your motor always turns the same direction, of course the motor
voltage is always the same polarity.  Another way to avoid the absolute
value amp would be to use two differential amps wired so one is positive
and one is negative, and choose the one required via two sample gates ro
two ADCs.  If the motor doesn't reverse very often, consider a
single-ended driver and a relay to reverse the motor connections.

If you use a full "H-bridge" to drive the motor, during the emf sampling
interval turn on one of the bottom transistors only.  The other end of
the motor is the emf referenced to ground so no differential amp is
required.  If you connected both ends of the motor through resistors to
the ADC, then turning on the right transistor would always result in a
positive voltage.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\08\14@174157 by paulb

flavicon
face
Mike Keitz wrote:

> If you connected both ends of the motor through resistors to the ADC,
> then turning on the right transistor would always result in a positive
> voltage.

 Clarification:  You connect both ends of the motor through resistors
to the same ADC input; you get half the voltage (which is probably the
scaling you wanted anyway) but by switching the lower transistors in the
H-bridge, the voltage is always positive and ground-referenced.
--
 Cheers,
       Paul B.

1998\08\26@113714 by Dan Larson

flavicon
face
On Fri, 14 Aug 1998 09:50:19 -0400, Mike Keitz wrote:

>On Thu, 13 Aug 1998 11:53:31 +0000 Dan Larson <.....dlarsonKILLspamspam.....citilink.com>
>writes:
>
>>I want to make an "absolute value" amp to output the same positive
>>voltage for a negative input as it does for a positive input.
>
>Circuits with this function are commonly found in op-amp application
>circuits or op-amp cookbook type of books.  It is often called a
>"precision full-wave rectifier" instead.

Ah, terminology!

>
>>
>>But how do I simply this with a 16F84 with no A/D?
>>
>The back emf voltage could be used with a single-slope ADC (capacitor
>charge timer) often used with PICs.  If the charging cycle is short enugh
>to fit in the motor off period, no sample and hold would be required.
>Another way to look at it is it is a synchronous voltage to frequency
>converter where the period of one cycle at a time is measured.

Hmmm, I think I understand.  Wouldn't the resulting value be non-linear?
If so, it probably doesn't matter too much since the actual value isn't
so much important as its use in a software feedback loop is.

I'll have to take a look at the uChip app notes again for this.

{Quote hidden}

Yes, this *is* a better idea than using the absolute value amp.  I've
looked at one of these absolute value amps and it doesn't seem too easy
to pull off with a single ended supply.  Your suggestion makes the use of
the single ended supply amp seem practical.  Can single supply amps
indeed accept an input below zero?


>
>If you use a full "H-bridge" to drive the motor, during the emf sampling
>interval turn on one of the bottom transistors only.  The other end of
>the motor is the emf referenced to ground so no differential amp is
>required.  If you connected both ends of the motor through resistors to
>the ADC, then turning on the right transistor would always result in a
>positive voltage.
>

This is the *key* right here to simplifying it.  Referencing the back EMF to gro
und
using the bridge transistors didn't come to my mind.  I'll have to go back
and muck about with my h-bridge "anti-self-destruct" logic again, but gates
are much easier to work with.

Geez, You've simplified it right down to zero OP-AMPs, although using
one to buffer the motor back EMF from the ADC might help, I'll have to
take a good hard look at this after drawing it up and looking at the app
note for the single slope or "charge timer" ADC.


You have supplied more than enough in "tips" to help me along here!
You have just about done all of the work for me.  My question about
how to simplify this was more of a question to myself than anything
because I knew I had just described an overly complicated mess!

Thanks again!

Dan


'Motor Speed with back EMF..'
1998\09\13@125427 by RCGipson
flavicon
face
thomas, could you send me a schematic of the back-emf cirecuit for motor
feedback in postcsript format?

thanks for your time.

roger

1998\09\13@141156 by goflo

flavicon
face
Must have missed this thread - Sounds interesting...

RCGipson wrote:
>
> thomas, could you send me a schematic of the back-emf cirecuit for motor
> feedback in postcsript format?

1998\09\14@150454 by John Payson

flavicon
face
One thing I was wondering about but didn't really see mentioned: if one is PWM'i
ng a motor while
trying to measure its speed (via back EMF) what is the preferred way of handling
inductive kick-
back from the motor?  I'm particularly curious about a model-railroading applica
tion where there
is an unknown and variable amount of resistance between the supply unit and the
motor.  If the
PWM outputs a constant current when on, and if inductive kickback can be filtere
d out so as not
to skew the measurements, it would seem that gunk on the rails would be a 99.44%
non-issue with
regard to maintaining constant speed provided only that the current supply had a
dequate compliance
voltage.

Is such a design practical/feasible?

1998\09\15@051003 by Stefan Sczekalla-Waldschmidt

flavicon
face
John Payson wrote:
>
> One thing I was wondering about but didn't really see mentioned: if one is PWM
'ing a motor while
> trying to measure its speed (via back EMF) what is the preferred way of handli
ng inductive kick-
> back from the motor?

This could be done by a short delay preceding the measurement.

But I4ve 2 more problems:

The Moror is a series-wound-type ( mdrklin ) so how to get backemf
without a constant field.
A much bigger problem is the realy unsteady behavior at low speeds.

I'm particularly curious about a model-railroading application where
there
> is an unknown and variable amount of resistance between the supply unit and th
e motor.  If the
> PWM outputs a constant current when on, and if inductive kickback can be filte
red out so as not
> to skew the measurements, it would seem that gunk on the rails would be a 99.4
4% non-issue with
> regard to maintaining constant speed provided only that the current supply had
adequate compliance
> voltage.
>
> Is such a design practical/feasible?

Well, is practically already done, but with a true DC-Motor.

Any ideas how to adress the behavior at realy low speeds ? Thought about
a reflex-sensor sfh 900 to do real speed regulation.

WBR Stefan

1998\09\15@115028 by Peter L. Peres

picon face
On Mon, 14 Sep 1998, John Payson wrote:

> One thing I was wondering about but didn't really see mentioned: if one
> is PWM'ing a motor while trying to measure its speed (via back EMF) what
> is the preferred way of handling inductive kick- back from the motor?

By getting rid of the kick first, then reading. A differentiator or a
micro-controller help a lot here. The differentiator can be used to detect
the end of the 'rise' after the kickback to actuate a sample & hold
mechanism.

> I'm particularly curious about a model-railroading application where
> there is an unknown and variable amount of resistance between the supply
> unit and the motor.

In remote controlled model railroading with active engines (i.e. smart
engines) one NEVER regulates the far away supply, one regulates the motor
directly in the engine from constant rail voltage. The variable resistance
(which is actually a pretty bad contact in practice)  does not normally
come into play.

> If the PWM outputs a constant current when on, and if inductive kickback
> can be filtered out so as not to skew the measurements, it would seem
> that gunk on the rails would be a 99.44% non-issue with regard to
> maintaining constant speed provided only that the current supply had
> adequate compliance voltage.
>
> Is such a design practical/feasible?

Mostly, no. Model railroad rails (and air lines) are among the noisiest
electrical contacts I know of. Someone has apparently suggested once, to
use this noise source for cryptographical purposes... ;)

Peter

PS: The gunk on the rails should not be there anyway. There are small
gizmos that can be mounted on the engines to clean the rails as they run.
There are also expensive rail-cleaning engines that look like the real
thing. Most use copper brushes, some have them turn...

1998\09\15@131944 by Peter L. Peres

picon face
On Tue, 15 Sep 1998, Stefan Sczekalla-Waldschmidt wrote:

> But I4ve 2 more problems:
>
> The Moror is a series-wound-type ( mdrklin ) so how to get backemf
> without a constant field.

By making a constant field ;) The stator should be polarized all the time
for best results, but that means a 2nd PWM switch.

imho, the best idea is a reflective opto coupler. Alternately, if there is
a ferromagnetic gearwheel in the gearing, use a SMT Hall sensor. This is
real easy to use, you'd need a small magnet glued to it and a pole piece
to close the field behind it. You also need a little 'L'-bent piece of
soft steel sheet in front to act as concentrator (read one tooth as
opposed to 2 or more). The signal is conditioned by a 358, one section is
a differential voltage amp, the 2nd a self-biased comparator. The airgap
needs to be <= 1/2 tooth pitch for good results.

hope this helps,

Peter

1998\09\16@053039 by Stefan Sczekalla-Waldschmidt

flavicon
face
Hi Peter,

> By making a constant field ;) The stator should be polarized all the time
> for best results, but that means a 2nd PWM switch.

Did you have tested something like this ?

A all time constant field may also have a further disadvantage:  When
due to dirt or any weird condition the power lacks, the engine will
instantly brake.

>
> imho, the best idea is a reflective opto coupler.

Yes, a Siemens SFH900 is already tested and will do a good job.

Tried it with serveral Hall-Sensors too, but the mechanic issuses
attetion need to be payed to made me using a simple to apply SFH900
(glue) .

Also the gearweels are rather small.

WBR
       Stefan

1998\09\16@121614 by John Payson

flavicon
face
|> I'm particularly curious about a model-railroading application where
|> there is an unknown and variable amount of resistance between the supply
|> unit and the motor.

|In remote controlled model railroading with active engines (i.e. smart
|engines) one NEVER regulates the far away supply, one regulates the motor
|directly in the engine from constant rail voltage. The variable resistance
|(which is actually a pretty bad contact in practice)  does not normally
|come into play.

If one is using smart engines, then the voltage/speed control can be located in
the engine.
Piece of cake.  If one isn't going to use smart engines (e.g. one wishes to run
older locos
without modifying them) then outputting a constant voltage at the supply end is
not a good
way to ensure constant speed at the engine end.

|> If the PWM outputs a constant current when on, and if inductive kickback
|> can be filtered out so as not to skew the measurements, it would seem
|> that gunk on the rails would be a 99.44% non-issue with regard to
|> maintaining constant speed provided only that the current supply had
|> adequate compliance voltage.
|>
|> Is such a design practical/feasible?

|Mostly, no. Model railroad rails (and air lines) are among the noisiest
|electrical contacts I know of. Someone has apparently suggested once, to
|use this noise source for cryptographical purposes... ;)

My thinking would be that if the power supply goes into a high-impedance state w
hen it's
trying to read the back-EMF voltage, the rapidly-changing resistance on the rail
s would
have little effect on the reading.  When driving with a constant-current source,
there
again the rapidly-changing resistance would also have little effect.

>From my understanding, the normal problem with driving model railroad locomotive
s is that
since the rails are driven with constant voltage, hitting a bit of gunk results
in an inc-
rease in series resistance; this in turn reduces instantly the current "availabl
e" to the
motor.  Since motors are inductive, the current flowing through them can't chang
e instantly,
ergo they generate a flyback pulse.

On the other hand, if the power supply switches rapidly between being a constant
-current
source and a high-impedance measurement circuit (with a brief moment of inductiv
e clamping
between) the noise induced by the dirty rails should be minimal.  True the volta
ge on the
rails will bounce up and down a lot, but the current flowing through them will b
e constant
during the "on" cycle and zero during the "off" cycle.

|PS: The gunk on the rails should not be there anyway. There are small
|gizmos that can be mounted on the engines to clean the rails as they run.
|There are also expensive rail-cleaning engines that look like the real
|thing. Most use copper brushes, some have them turn...

True, or there exist rail-cleaning cars that have similar function.  Nonetheless
, it would
be nice to have a power-supply design that could tolerate effectively a less-tha
n-spotless
track.  My thinking here (though I'm probably not going to go through with this
project) would
be that it would be useful for model railroad displays that are run unattended f
or long per-
iods of time (e.g. in museums and such).  I had one person in a museum tell me t
hat there were
certain areas of the track they didn't let trains use unattended because the tra
ins would some-
times stall and overheat.  A back-EMF-sensing controller would be able to detect
this condition
and either restart the locomotive or (if that failed) shut it down entirely.

1998\09\16@123715 by Peter L. Peres

picon face
On Wed, 16 Sep 1998, Stefan Sczekalla-Waldschmidt wrote:

> > By making a constant field ;) The stator should be polarized all the time
> > for best results, but that means a 2nd PWM switch.
>
> Did you have tested something like this ?

Yes. I used a constant current source that put current into the stator all
the time and was over-ridden by the main power. Actually, the stator was
towards GND and the rotor 'floating' above it. The current generator
injected a small current into the stator at the stator/rotor contact and
the voltage was read differentially from the rotor. The PWM was injected
into the other end of the rotor. This was not for a train, it was a
low power speed servo loop.

2 caveats: pick an op-amp that does not latch up easy and use voltage
dividers on BOTH inputs (i.e. also on the + input). Switched coils eat
silicon ;)

> A all time constant field may also have a further disadvantage:  When
> due to dirt or any weird condition the power lacks, the engine will
> instantly brake.

No! It's not enough to have the excitation on to brake, you also need the
rotor shorted. The magnetic braking should not be strong (due to variable
reluctance and eddy losses) for short periods of time. If you want a
smooth slow run you'd better think of adding a goodly flywheel anyway.
Maybe a small stack of small denomination coins drilled through and glued
to a suitable gear... alternately, fill all the free space in the loco
with fishing weights (lead) ;). This is a proven way to improve the
'wheels turning in place' effect when braking and accelerating abruptly.

Someone who was much deeper into model rail than me once told me that he
thinks the waggons and engines should be weighted down to get to the same
density as the real ones. He said that this makes the trains much more
realistic in movement. You can obtain the figures for the real waggons and
engines, they are published in rail enthusiast's papers and books. You
want the loaded weight and the scale. Remember that you reduce scale by
surface (I know that this sounds weird but you try to get the same loading
per surface/axle as the real thing). For material resistance reasons only
the loco should be scaled like this and weighted. Believe me, a HO scale
steam loco with 200 g of fishing lead on board moves VERY realistically.
You better reinforce the bridges and overpasses in your diorama ;)

Peter

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...