Encoder simple 1 channel to check ac motor stall

Go To Last Post
34 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HI!
i want to check any motor stalls while my motor is energized, motor is AC, i would like to use an encoder!
but i am not certain how to use it! i dont need any positioning or angle checking so only 1,0 encoder would work, how should i use it in my AVR, i have no interupt pin available, and i have to use it with polling ,

what i want is just to be sure that while my AC Power is On to the Motors , i would check if motor is rotating or it has been stalled

Plz guide me with the algo and the better encoder approach,

on idea that i just got is to check the encoder output at a certain pin 4-5 times at different location of the polling loop, if the reading is same as that of previous i add a counter, if its different the counter is reset, and whenever a counter value exceeds 20 , it means it is a stall!

any suggestions??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sherazi wrote:
HI!
i want to check any motor stalls while my motor is energized, motor is AC, i would like to use an encoder!
but i am not certain how to use it! i dont need any positioning or angle checking so only 1,0 encoder would work, how should i use it in my AVR, i have no interupt pin available, and i have to use it with polling ,

what i want is just to be sure that while my AC Power is On to the Motors , i would check if motor is rotating or it has been stalled

Plz guide me with the algo and the better encoder approach,

on idea that i just got is to check the encoder output at a certain pin 4-5 times at different location of the polling loop, if the reading is same as that of previous i add a counter, if its different the counter is reset, and whenever a counter value exceeds 20 , it means it is a stall!

any suggestions??

Pick out the stepper from a diskette drive. Use it as a speed sensor.

HM

HM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tape a piece of foil to the motor shaft. Bounce an led off the foil to a detector. Should pulse once per rev.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hall sensor (salvage from cdrom or floppy) or sense bemf...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what about teh comercial encoders taht are available a simple one chanel magnentic encoder!.... any idea?

and is the way i mentioned for polling Ok or is theer another better approach ,[without Interrupts]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Investigate a retriggerable monostable. Every time your encoder produces a pulse, retrigger the monostable. Read the monostable output. If it is high, the encoder is still providing trigger pulses. If the monostable output is low, there are no trigger pulses, so the motor is not turning.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would glue a mic to the motor, and hear if it's at a stand still.

If it's a 1 phase motor the you should be able to see a stall by compare the voltages over the cap. and main power.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ Ross ...

your idea attracts me !

need some more advice ...
should the high time be very small or a bit larger !i mean should i keep it in few milliseconds or some hundred millisecond ...

have almost no experience with 555... and am asking such foolish questions ... hope u would guide me ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sherazi,

It depends upon your actual needs. How quickly do you want to know of failure? How often is the shaft turning?

For example ... let's say your "shaft-is-turning detector" outputs a pulse for 1 millisecond once every 100 milliseconds and your retriggerable monostable has a pulse length of 110 milliseconds. If it is turning continuously at its correct speed, the mono will be retriggered every 100 milliseconds and therefore never time out; the output will be continuously high. If it misses one trigger pulse, the output will go low 10 milliseconds after the expected retrigger pulse. If you checked the output every millisecond, you would know about the missing trigger pulse a maximum of 10 milliseconds after the failure to retrigger.

Now you think about your actual shaft speed and how quickly you need to react ...

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

got that! 1 more query!

what if the motor stalls in such away that the output is a high pulse from the encoder, that means the the trigger is continuously high! would the 555 be continuously triggered or not?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So put the pulse through a differentiator ( an RC network; series cap with resistor to ground and reverse biased diode in parrallel with the resistor ) that only allows a positive change (low to high) to trigger the monostable. If it stalls there is still only one pulse ...

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

can u post the circuit plz! that will help alot !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sure.

Because the voltage across a capacitor cannot change instantaneously, the first part of a long pulse on the input will appear at the output. As the capacitor charges up via the resistor, the output voltage will decrease exponentially until the cap is fully charged and the output is zero volts.

When the input returns to zero volts, the output will be pulled towards negative input volts until the diode starts to conduct and clamps the output to -0.6 volts thus limiting the voltage passes to your following citcuitry..

So this circuit acts as a "pipper" (a short pulse producer); only one pulse is generated for each input state change.

Attachment(s): 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i found this solution ! didn't tried it yet!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i used the circuit as in the attached Proteus file!

i am using 2 secs for the timer just to see the animation! using this circuit i would get the negative edge triggering but the problem is that when the timer is triggered once , if the push button is pressed again it doesn't restart the timer ! instead the led goes off and then have to press gain to again start the timer!

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

this is the schematic diagram

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't have/use Proteus. Nor do I use NE555 chips ... but the principle should work if you have configured the 555 as a retriggerable mono ... not just an ordinary mono.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is a retriggerable 555 circuit. Try it in Proteus.

http://www.doctronics.co.uk/555....

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks alot all of U !

I had solved the problem and thought to post the solution here, as Ross suggested i used a monostable with RC at I/P and used a transistor for triggering the monostable,
schematic
http://teeblog.blog.com/files/20...

Last Edited: Mon. May 16, 2011 - 05:54 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you sure that diagram is correct? You have the PNP transistor with its emitter grounded.

You also don't have any current limiting resistor in the led side.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but i got the correct results in the simulation , have it changed now,

the led there is just for simulation and i will be feeding the output input pin of my microcontroller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thatlooks better, but ... the 555 Vcc does not appear to be connected to your supply to R3, R1 and D1. Does that affect the way the simulation works ... remember I don't have Proteus :lol:

Now you just need something to provide the grounding signal when your shaft turns. Uncle Bob's suggestion is good.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well the proteus software has the pin 8 VCC attached to the the power internally and is not shown ...

i have got single channel magnetic encoder.. it has 3 wires i guess 1 is for power other for gnd and third one is encoder o/p pulse ... would use that

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok Proteus is thinking for us mere mortals then.

You should check if your magnetic encoder pulls low ... because that is what your circuit needs.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what should be done if it doesnt???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simply invert your sensor's output signal and feed the existing 555 design.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

invert using a transistor would be good?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i guess this is the solution !

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

NO!

Apart from shorting the power supply to ground through the base emitter junction and destroying your transistor ... this does not invert the signal.

Keep the NPN transistor. Connect its collector to the C1 and R3 junction. Disconnect the base from the power supply and connect it to two resistors. One resistor goes to ground. The other goes to your switch ... or the magnetic sensor. The other side of the switch goes to the positive supply. When you press the switch (connecting the positive supply to the base resistor), it turns on the NPN transistor and pulls the C1/R3 junction low (that is inversion).

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

can u suggest me values of both resistors i am realy weak in transister theory !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

10K and 100K would be OK i guess

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yep they should be fine.

In your final design (using the magnetic sensor), the sensor pulse input would connect to the junction of the switch and your R4. I guess Proteus has a square wave signal generator that you can "connect" there for simulation.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so after the corrections

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

NO!

Like below.

And ... you forgot to connect pins 6 and 7 together.

Now test it in Proteus or real life.

You only use the switch to test that the retriggerable monostable gets triggered. Normally you would drive the circuit with your positive pulse output shaft sensor.

Cheers,

Ross

Attachment(s): 

Ross McKenzie ValuSoft Melbourne Australia