Encoder for stepper motor - Page 2


Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 52

Thread: Encoder for stepper motor

  1. #21
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi Tom, our kflop board was damaged, I think because of some voltage peaks. I have purchases Kflop + konnect, can you send it by another express priority service? Does not matter if it cost more.
    Thank you!



  2. #22
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi Tom. I want to use the Z index of the encoders for homing, but this is 5V, it is possible connect it to a LVTL 3.3V input with a resistence? wich resistence could work?
    Thank you!

    Last edited by ssjantonio; 10-14-2016 at 03:30 PM.


  3. #23
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    KFLOP 3.3V inputs will be damaged if driven hard above 3.8V. Most 5V TTL signals do not drive that high as they are only required to drive above 2.8V. Unfortunately the maximum is not usually specified.

    You might measure the voltage with a voltmeter. JP4 and JP6 have 150ohm pull down resistors which make it more unlikely for the voltage to be above 3.8V. I have never had a case where there was a problem connecting directly.

    But to be absolutely safe you might add a 47ohm series resistor. Combined with the 150ohm pull down resistor will reduce the pin voltage to ~75% of the output voltage. You should check if the pin voltage is still at least 2.4V

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  4. #24
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom. I have checked the output voltaje of the encoder. A and B have 2.4V max. But i cant measure any voltaje in Z, but in Z- it reads 3.4V.
    I have done 2 tests:
    1.- With the konnect input common to digital GND and IO1051 connected to Z of the encoder.
    2.- Z phase connected directly to IO16 in Kflop.
    The code that Im using is this simple:
    Jog(0,100);
    while(!ReadBit(16 or 1051));
    Jog(0,0);
    In the first case it works nicely but only when the encoder is not connected to ground earth.
    In the second case it does not work in any way. I cant understand why if the digital io windows shows io16 as low, the function ReadBit(16) always return high.
    Maybe i'm not grounding correctly the encoder?.
    The machine is connected to ground and the encoder receives ground from the machine, the cable is not connected to earth, maybe that is wrong.
    The encoder is a chinesse clone of Omron e6b2-cwz1x.
    I forgott, kflop counts correctly the pulses of the encoder.
    Can you suggest what can I do?
    Thank you very much for your help!



  5. #25
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    The voltages seem safe to connect directly to 3.3V inputs as expected. 2.4V seems a bit low. Is that connected to KFLOP JP4 with the 150ohm termination? 8 of 10 of the I/O on JP4 have the termination. What pin is Z connecting to?

    Its difficult to check Z with a voltmeter because any pulse will be very short. That is why you seem to always observe the negative state.

    Konnect isn't a good choice for Index pulses because it is slower and requires higher voltage.

    It seems you have noise. You won't usually see narrow noise glitches on the Digital IO Screen because the sampling rate is relatively slow.

    Encoders should not normally be connected to earth GND at all. There should be a clean DC GND connection from KFLOP to the Encoder GND. Ideally it should also be shielded with the shield connected to the clean KFLOP DC GND on the KFLOP end only.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  6. #26
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Thank you so much, you are right, the problem is the noise, I have connected a oscilocope to the A and Z phase in the encoder, I have attached the image. The machine is connected in a warehouse that has almost 50vfd drivers. How do you think that it can be solved?, all the drivers are connected to earth ground. I have isolated the machine and the encoders from earth ground.
    Maybe a EMI filter can solve the problem?Encoder for stepper motor-sin-t-tulo-png



  7. #27
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    An EMI filter may help.

    Why are the signals at different levels ~ 0V and ~0.4V? Or are you using 10X Probes and that is really 5V per grid?

    Since you have a scope you should be able to see the index pulse if you trigger on it.

    Is KFLOP Isolated from earth GND?

    Are the cables shielded?

    How are things wired?

    Regards

    Regards
    TK http://dynomotion.com


  8. #28
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Edit: yes the probe is 1:10 , and it was not configured in the software. I make a mistake. It looks closer to 0.4v displaced because it was at +5v, I'm sorry!. I will to take a new picture tomorrow.

    Hi tom, Kflop is counting correctly the pulses of the encoder, and yes, I can see the index pulse of Z, but it looks terribly noisly, I will try tomorrow to take a picture of the pulse.
    Yes, KFLOP is isolated from the earth GND, but the "GND holes" of kflop are disconnected from everthing. I have checked that all the electronics was isolated from earth ground. Only the power supply are connected to earth.
    The cables are shielded, but the shield is not connected.
    I have attached some pictures of the instalation. I have disconnected all the pumps, motors, valves, lamps, etc, and also I have changed the ATX supply, that is why it looks not wired.
    I have also tested connecting the power supply to a pc regulator, and the noise is still present.
    I really appreciated a lot your help, because I'm lost :S

    Encoder for stepper motor-20161027_194745_resized-jpg
    Encoder for stepper motor-20161027_194803_resized-jpg
    Encoder for stepper motor-20161027_194827_resized-jpg
    Encoder for stepper motor-20161027_194911_resized-jpg

    Last edited by ssjantonio; 10-27-2016 at 10:50 PM.


  9. #29
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    Are you feeding in the signals into that 2 foot long ribbon cable dangling down?

    An ATX power supply normally has an internal connection from DC GND to Earth GND. I'd suggest getting a separate isolated regulated 5V supply. Probably 15W would be enough and are very low cost.

    The long and looped encoder cable is probably not helping.

    The Shield should be connected on the KFLOP end to KFLOP DC GND.

    The mounting holes for KFLOP are not electrically connected to anything.

    Regards

    Regards
    TK http://dynomotion.com


  10. #30
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi Tom, I have followed your recommendations:
    I have an isolated 5V power supply for the encoders only.
    KFLOP is connected to the ATX power supply (the noise at the output of the ATX is negligible 147mA max).
    The long and looped encoder cable has been cut off.
    The shield is connected to the GND of the 5V power supply instead of KFLOP (The blue cable of the encoder is connected also to the shield of the encoder and the shielded cable), because I was affraid to danger the KFlop board. (If I connect the shield to earth ground insted of the DC GND the noise is reduced almost 30%)
    I have used a new shorter cable (4inches) for input JP4.

    I have attached two pictures:
    The first is with the osciloscope connected directly to the output of the encoder.
    The second one is connected directly to the input to KFlop (is still disconnected because I'm not sure if the voltaje peaks cause a damage to the board).
    If I connect the Z phase to Konnect, it works perfectly, but only at low feed speed.

    Encoder for stepper motor-sin-t-tulo-png
    Encoder for stepper motor-sin-t-tulo2-png

    With this configuration it works on konnect, but like you say it is not good because the low voltaje, I have noticed that at high speeds it does not detect the pulse.

    There is a posibility to use an active rc filter before the connection to kflop? Or what else can we do to reduce the noise?

    Thank you again!



  11. #31
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    I have an isolated 5V power supply for the encoders only.
    The encoders require a common GND to KFLOP. So the encoders will not be isolated from KFLOP. I guess by isolated you are referring to isolated from Earth GND?

    KFLOP is connected to the ATX power supply (the noise at the output of the ATX is negligible 147mA max).
    Like I said before ATX power supplies have an undesirable Earth GND connection. So you shouldn't use them if possible. I assume you mean 147mV?

    Is your scope isolated? If not connecting the scope will make a GND connection and change things.

    The long and looped encoder cable has been cut off.
    Good

    The shield is connected to the GND of the 5V power supply instead of KFLOP (The blue cable of the encoder is connected also to the shield of the encoder and the shielded cable), because I was affraid to danger the KFlop board. (If I connect the shield to earth ground insted of the DC GND the noise is reduced almost 30%)
    You should be able to connect the shield to KFLOP GND without any Danger of damaging KFLOP (if the shield is isolated from everything else).

    The second one is connected directly to the input to KFlop (is still disconnected because I'm not sure if the voltaje peaks cause a damage to the board).
    I don't understand. You state it is wired to KFLOP and then say it is not wired to KFLOP?

    What input pin are you using?

    If I connect the Z phase to Konnect, it works perfectly, but only at low feed speed.
    Do not use Konnect

    Measure the pulse time at your highest RPM.

    An RC filter would be a good idea. Assume Tau = 5us = RC. Assuming R=100 ohms:

    C = 5us / 100ohms = .05uF

    Regards

    Regards
    TK http://dynomotion.com


  12. #32
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    To avoid mistakes, I have attached a diagram showing my wiring. The Earth ground is isolated from everthing. I'm sorry for my bad picture jeje I'm just a chemical engineering having fun con Kflop .
    Encoder for stepper motor-pieza13-jpg



  13. #33
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    A picture is worth a thousand words

    KFLOP doesn't need 12V and the way you have it connected with no GND would mean the power supply wouldn't do anything.

    So it seems you changed from using an ATX supply?

    You have not connected the encoder index signal?

    Regards

    Regards
    TK http://dynomotion.com


  14. #34
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi Tom,
    Yes I Have changed the ATX, I'm using 12V for Inductive sensors. I have tested and yes, with that wiring the sensors does not work . I will to connect them directly to the 12V.
    If I connect the encoder index signal to IO16 with a 47ohm resistence, the function ReadBit always returns HIGH. I have tested with a clean 3.3V from KFLOP to IO16 and the ReadBit works fine.

    Thank you!



  15. #35
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    If I connect the encoder index signal to IO16 with a 47ohm resistence, the function ReadBit always returns HIGH. I have tested with a clean 3.3V from KFLOP to IO16 and the ReadBit works fine.
    I don't understand what you are saying. Do you mean it is always low? What is the voltage level of the encoder index signal before connecting it? After connecting it? Scope the KFLOP Input pin to see the pulse. Determine the voltage level and pulse length.

    IO16 has a 150 ohm pull down resistor. The encoder signal may not have enough output current to drive that heavy of a load load. You might use IO24 or IO25 which do not have the pull down resistors.

    Regards

    Regards
    TK http://dynomotion.com


  16. #36
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by TomKerekes View Post
    Hi ssjantonio,

    I don't understand what you are saying. Do you mean it is always low? What is the voltage level of the encoder index signal before connecting it? After connecting it? Scope the KFLOP Input pin to see the pulse. Determine the voltage level and pulse length.

    IO16 has a 150 ohm pull down resistor. The encoder signal may not have enough output current to drive that heavy of a load load. You might use IO24 or IO25 which do not have the pull down resistors.

    Regards
    Edit: it was working, but now the function ReadBit(24) always return true. And I cant see any peak in the osciloscope. The pulse mas frequency is 6.95khz and the pulse duration 144uS.

    I have tested in IO24 and it work perfectly. But there is only two available ports and I have 5 encoders. If I using only for homing, can I connect all of them in a single IO?

    Last edited by ssjantonio; 11-02-2016 at 09:05 PM.


  17. #37
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    You can not short multiple outputs together as they will fight each other when one is trying to drive low and one is trying to drive high. You could add a diode to each one and add a weak pull down (ie 2Kohms). The diode results in each output being able to pull the pin high but not low. Therefore if any signal drives high the pin will be pulled high. Because none of the signals can pull the pin low the resistor is needed to pull it low.

    Note when connected together in this way the homing will only work if one encoder at a time drives the signal high. In the highly unlikely chance that on power up one or more encoders happen to be right on the index mark there will be a problem. In that case (index active high with all motors stopped) you might move each axis a little until the index is no longer active high.

    Otherwise KFLOP JP5 has 8 inputs and JP7 has 16 inputs without pull down resistors (series 47ohms instead). Are those all used?

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  18. #38
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom. I have 6 axis and 5 encoders. So there is no available ports. The IO24 can be damaged? Because it was working fine, and now it always return true. If I disconnect the encoder and then connect IO24 to 3.3v it works fine.
    The same happend with IO25.
    EDIT:
    Do you think that we can use a simple optoisolator 6N137 with rc filter, 5V at the output, and connect it to konnect board? Or RC Filter + 6N137 + OP-AMP with 12V? Or maybe it can be solved usign Kanalog?

    Thank you!!

    Last edited by ssjantonio; 11-02-2016 at 09:47 PM.


  19. #39
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    The IO24 can be damaged? Because it was working fine, and now it always return true. If I disconnect the encoder and then connect IO24 to 3.3v it works fine.
    The same happend with IO25.
    I don't know. Did you ever apply more than 3.8V? If you connect 3.3V and the input goes true and if you apply 0V the input should go false. It his works then the input is most likely good.

    If the encoder doesn't generate a pulse on the scope then the problem is with the Encoder not KFLOP.

    Do you think that we can use a simple optoisolator 6N137 with rc filter, 5V at the output, and connect it to konnect board? Or RC Filter + 6N137 + OP-AMP with 12V? Or maybe it can be solved usign Kanalog?
    I don't think your Encoder outputs will drive the 7.5ma needed for a 6N137. Maybe they can sink 7.5ma. Do you have a specification?

    Earlier you said the pulse width was 144us? You also specified a frequency of 6.95khz. What is that? The pulse must be longer than 180us to be detected. Why cant you move slower when homing?

    Please make a wiring diagram so we can see what IO you have connected where. You have a KFLOP+Konnect. Correct?

    Please answer each question separately so we can understand what you are referring to.

    Regards

    Regards
    TK http://dynomotion.com


  20. #40
    Registered
    Join Date
    May 2013
    Location
    México
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi Tom, sorry for my mess .

    Quote Originally Posted by TomKerekes View Post
    Hi ssjantonio,

    I don't know. Did you ever apply more than 3.8V? If you connect 3.3V and the input goes true and if you apply 0V the input should go false. It his works then the input is most likely good.
    I have never connected more than 3.8V, but with the voltaje peaks of the noise I dont know :S.
    The input works correctly like you say, so I think that it is not damaged.

    If the encoder doesn't generate a pulse on the scope then the problem is with the Encoder not KFLOP.
    I mean that the pin IO25 returns always true with the function ReadBit(25), but maybe that is effect of the noise like you explain before. The scope shows correctly the peak. i have attached a picture of the scope with the RC Filter (220ohm and 0.1uF).

    I don't think your Encoder outputs will drive the 7.5ma needed for a 6N137. Maybe they can sink 7.5ma. Do you have a specification?
    AM26LS31 equivalent
    Output current:
    High level: IO = −20 mA
    Low level: IS = 20 mA
    Output voltage:
    VO = 2.5 V min.
    VS = 0.5 V max.


    Earlier you said the pulse width was 144us? You also specified a frequency of 6.95khz. What is that? The pulse must be longer than 180us to be detected. Why cant you move slower when homing?
    I have taked a new picture of the scope, lower speed. The results is pulse width = 519uS, the frequency is a value reported by te scope.

    Please make a wiring diagram so we can see what IO you have connected where. You have a KFLOP+Konnect. Correct?
    I have attached a diagram, it looks terrible but it was my best effort. Can you tell me if the connections to GND and 0V are correct?

    With the RC filter the noise has been controlled, but I can read in the scope a peak of 3.7V, there is any risk to damage the LVTL 3.3V IO? Because of the noise?. It can be resolved with a higher value resistence?

    Thank you very much!!


    Encoder for stepper motor-sin-t-tulo4-png
    Encoder for stepper motor-diagrama_conx-jpg



Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Encoder for stepper motor

Encoder for stepper motor