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 .
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
Bill
--------------------
"Why not the best?"
Jimmy Carter
RE: reading the encoder signal
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
" 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
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
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
RE: reading the encoder signal
RE: reading the encoder signal
RE: reading the encoder signal
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