×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

reading the encoder signal

reading the encoder signal

reading the encoder signal

(OP)
hello there ! I have kinco's motors and i am trying to read the signal of the encoders with an arduino . I searched a lot and I wrote a program that can do that, but the problem is kind unexpected.The motor drivers have a digital input so that you can enable the shaft.When i give power to the drivers without enabling the shaft the program works perfect ( i move the motor with my hand ) . When I enable the shaft then the program ( that counts the pulses from the encoders ) is reading pulses ( the sum of the pulses is increasing) without any motion done to the motor.

Does anybody have an idea why this is happening? I think that when the motors don't move then there would be no signal from the encoders? Or is it possible that the encoders send a signal at certain frequency and when they detect motion of the motors they change the frequency?i thought that because it seams like when i enable the shaft, the encoders send pulses of certain frequency .

RE: reading the encoder signal

Electro Magnetic Interference?

Bill
--------------------
"Why not the best?"
Jimmy Carter

RE: reading the encoder signal

Stepper motor? Two or more encoder channels?

You need to use gray coding to read the encoders. Likely one or both is switching due to the motor oscillating at each step. Gray code can decode the reverse motion, and subtract the count if so.

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

But EMI is another possibility. So is buggy code.

RE: reading the encoder signal

(OP)
AC servo motor . two channels A and B and there is one more that sends a pulse when there is a full rotation i think.
" Likely one or both is switching due to the motor oscillating at each step"---> the motor is not moving when i receive these signals .
So you say that when enabling the shaft there is some kind of EMI . Can you say some more about how to solve this ?
Thank you

RE: reading the encoder signal

Some encoders use two overlapping pulses. An A-B pulse is positive rotation, a B-A pulse is negative rotation. This was so much simpler than the Grey code that it was used instead of the grey code in a lot of applications.
Grey code advantage, Generally output a decimal number, eg: 0-9
Could directly feed a decade counter.
Overlapping pulse advantage, Much simpler construction.
But, pulses must be counted by software.

Bill
--------------------
"Why not the best?"
Jimmy Carter

RE: reading the encoder signal

Digital quadrature encoders ARE two-bit Gray code. This is almost surely what the OP is using.

I too suspect electromagnetic interference. Probably the power electronics, when activated, are wreaking havoc on the encoder signals. Do you have a scope available?

RE: reading the encoder signal

(OP)
yes I have a scope. So what can I do in case there is actually EMI?

RE: reading the encoder signal

You want to see whether there is noticeable "bounce" or noise on the signals as they are input to the board relative to the closest reference (GND) voltage point to these inputs. Compare the cases of the power electronics disabled to enabled. It's very common in an initial setup to have enough hash on these signals to get false counts.

RE: reading the encoder signal

(OP)
thank you !!!! smile

RE: reading the encoder signal

Some encoders are voltage sensitive or if you put the positive dc where it wants common you will blow the encoder. Make sure your wiring is correct and you do not have an encoder that fails this way. If this is the case that the encoder is voltage sensitive you might have blown the encoder.

I would also make sure that your not grounding any of the encoder signals. This has caused me problems where your grounding A or B or directional bits will cause this issue when the shaft is not moving.

Also, check your mechanical install on how the encoder is installed on the shaft of the motor. Maybe the encoder is not tight on the shaft?

Grounding is important in that the encoder cable ground can only be grounded usually at the encoder interface card. Is the encoder cable grounded at the motor and at the other end at the encoder interface card?

Check your electrical connections of the encoder. Make sure your terminations are not crimping on the encoder insulation where it should be crimping on wire.

Also, make sure that the encoder and motor leads are in separate conduit and do not touch anywhere at the motor or at the drive. This issue has caused me the most problems. Also, try to keep your encoder and motor leads in the enclosure as short as possible so that they are not creating a rats nest. Rat's nest cause noise issues in drives. Clean install is critical in drive/encoder installs.

RE: reading the encoder signal

(OP)
thank you it was the ground of the encoder ! smile everything works fine ! Thank you again !

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources