Encoder for stepper motor - Page 4


Page 4 of 5 FirstFirst 12345 LastLast
Results 37 to 48 of 52

Thread: Encoder for stepper motor

  1. #37
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    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

    TK
    http://dynomotion.com


  2. #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.


  3. #39
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    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

    TK
    http://dynomotion.com


  4. #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



  5. #41
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    Thanks for all the good info.

    3.7V will not cause damage to KFLOP inputs.

    Because the Encoder can source -20ma you should be able to use IO 16-21 that have 150 ohm pull down resistors for the Index pulses. But you can not have 220 ohm series resistors because the voltage will be divided to too low of a level. A minimum of 2.5V is required at the pin. 47ohms should work.

    I don't understand your statement about ReadBit(24) always reads true. How would you know that? it should be very simple. If the voltage at the pin is < 0.5V then the Digital IO Screen should show off, and ReadBit should return false. If those are not all correct then you are making a mistake somewhere. With noise the ReadBit may sometimes detect an invalid state, but not always.

    Note:your diagram doesn't show any connection to Bit 24. It also is missing one of the 5 input connections.

    Regards

    TK
    http://dynomotion.com


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

    Default Re: Encoder for stepper motor

    Hi Tom,

    Quote Originally Posted by TomKerekes View Post
    Hi ssjantonio,

    Thanks for all the good info.

    3.7V will not cause damage to KFLOP inputs.

    Because the Encoder can source -20ma you should be able to use IO 16-21 that have 150 ohm pull down resistors for the Index pulses. But you can not have 220 ohm series resistors because the voltage will be divided to too low of a level. A minimum of 2.5V is required at the pin. 47ohms should work.
    Ok, I will to connect with 47ohm to the pins 16-21 and with 0.1uF capacitor, that it is what I have.

    I don't understand your statement about ReadBit(24) always reads true. How would you know that? it should be very simple. If the voltage at the pin is < 0.5V then the Digital IO Screen should show off, and ReadBit should return false. If those are not all correct then you are making a mistake somewhere. With noise the ReadBit may sometimes detect an invalid state, but not always.
    I know because I'm running this code:
    Jog(AXIS,100);
    while(!ReadBit(25));
    Jog(AXIS,0);
    And the motor, simply does not move, but it is history, I will to test with the rc filter, I have attached dthe diagram, can you help me to see if its ok?

    Note:your diagram doesn't show any connection to Bit 24. It also is missing one of the 5 input connections.
    Yes I'm sorry, it was because I was probing with pin 16-21. Thank you, I have added the missing connection .


    What about the GND connections of the last diagram? It is ok?


    I have tried to connect the shield of the encoders to earth ground instead of GND in KFlop, together to the shield of the cables, and the noise reduces almost 30% with out the filter, but I dont know if that is ok or it can damage the encoders?


    Thank you very much for your help and your patience!

    Encoder for stepper motor-diagrama_rc_filter-png
    Encoder for stepper motor-board_rc_filter-png



  7. #43
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Ok, I will to connect with 47ohm to the pins 16-21 and with 0.1uF capacitor, that it is what I have.
    good

    What about the GND connections of the last diagram? It is ok?
    You didn't label the signals. I assume pin6 of the encoders is the shield? If yes, then yes, connecting to KFLOP GND Lug should be a good choice.

    I have tried to connect the shield of the encoders to earth ground instead of GND in KFlop, together to the shield of the cables, and the noise reduces almost 30% with out the filter, but I dont know if that is ok or it can damage the encoders?
    I doubt if it would cause damage to Earth Ground the shields. But I'm surprised Earth GND is quieter than KFLOP GND. It may depend how you are connecting/grounding the scope. The noise relative to KFLOP GND is what matters be cause the input is to KFLOP. I would ground the encoder shields to KFLOP GND.

    I will to test with the rc filter, I have attached dthe diagram, can you help me to see if its ok?
    The circuit with 8 RC Filters looks good to me.

    Regards

    TK
    http://dynomotion.com


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

    Default Re: Encoder for stepper motor

    Hi Tom, it is working now, perfectly. But I have another problem :S.
    When the motores are working with closed loop, they heath a lot more than working without CL, and when the motors are stoped they oscilate between +/- 7 micro steps, maybe that is causing the overheating?
    The motors are stepper Nema34 1600oz-in, the driver is DQ860MA configured for half current, 5.6A Peak and 800 pulses/rev. The maximum. velocity of the motor is 4500 pulses/s. The power supply is 60VDC.
    Do you think that the oscilation is also caused by the noise?

    The PID is:
    P = 0
    I = 0.1
    D = 0

    The encoder is 1024pulses/rev.

    Thank you!
    Best Regards!



  9. #45
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    Oscillation should not cause the motors to run hotter unless you are counting on the motors shutting down when idle which doesn't happen when oscillating. In this case a long running job would overheat your motors anyway.

    Any closed loop servo will attempt to drive the error to zero and tend to constantly oscillate. It is probably caused by mechanical dynamics rather than noise. You might read this from our wiki.

    Servo Dither/Hunting - (oscillation around zero error)


    You didn't include the rest of your settings, the filters, or a plot. Reducing the I Gain may reduce the severity of the oscillation. There is also a Dead Band Range and Gain settings that can sometimes get the system to sit still. For example a range of 7 counts with zero gain will cause the servo to not make any corrections when the error is less than 7 counts. Of course this may increase your total errors by a small amount.

    There are also some "anti-dither" C Program Examples that can watch for no motion and small errors and change the gain settings as an attempt to get the axis to sit still.


    HTH
    Regards

    TK
    http://dynomotion.com


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

    Default Re: Encoder for stepper motor

    Quote Originally Posted by TomKerekes View Post
    Hi ssjantonio,

    Oscillation should not cause the motors to run hotter unless you are counting on the motors shutting down when idle which doesn't happen when oscillating. In this case a long running job would overheat your motors anyway.

    Any closed loop servo will attempt to drive the error to zero and tend to constantly oscillate. It is probably caused by mechanical dynamics rather than noise. You might read this from our wiki.

    Servo Dither/Hunting - (oscillation around zero error)


    You didn't include the rest of your settings, the filters, or a plot. Reducing the I Gain may reduce the severity of the oscillation. There is also a Dead Band Range and Gain settings that can sometimes get the system to sit still. For example a range of 7 counts with zero gain will cause the servo to not make any corrections when the error is less than 7 counts. Of course this may increase your total errors by a small amount.

    There are also some "anti-dither" C Program Examples that can watch for no motion and small errors and change the gain settings as an attempt to get the axis to sit still.


    HTH
    Regards
    Hi Tom, the over heating was fixed with the program anti dither, now is working fine. I have a trifasic async motor controled with a standar VFD driver with 0-10V input.
    I'm testing now the example KonnectPWMToAnalog, it works fine, but the voltaje at the output of the konnect oscillates always +/- 0.2V, The velocity oscillates +/-3rpm (measured every 0.05s with a encoder), do yo think that is enough for ridgid tapping? Or there is a way to have a better control on the speed with this method? I was looking for a driver with Pulse Train input as second option.

    Thank you very much!



  11. #47
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    Downloads
    0
    Uploads
    0

    Default Re: Encoder for stepper motor

    Hi ssjantonio,

    Strange that the Analog Output would oscillate that much. In our setup we only measured ~ 10mv peak-peak. It also seems odd that the RPM would vary that rapidly? Maybe you explain in more detail what you are seeing.

    But it is likely to be ok for rigid tapping as the Z axis should follow the Spindle motion regardless of the Speed.

    Pulse Train would be another option as long the result is closed loop in a manner that the spindle position is properly tracked without drift that would break the tap.

    HTH
    Regards

    TK
    http://dynomotion.com


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

    Default Re: Encoder for stepper motor

    Quote Originally Posted by TomKerekes View Post
    Hi ssjantonio,

    Strange that the Analog Output would oscillate that much. In our setup we only measured ~ 10mv peak-peak. It also seems odd that the RPM would vary that rapidly? Maybe you explain in more detail what you are seeing.

    But it is likely to be ok for rigid tapping as the Z axis should follow the Spindle motion regardless of the Speed.

    Pulse Train would be another option as long the result is closed loop in a manner that the spindle position is properly tracked without drift that would break the tap.

    HTH
    Regards
    Hi Tom, now is working fine, I wrote a C program to control the Vc with PID using the encoder, and it works very good, it only oscilates 0.5rpm. It was a problem with noise in the 12V power source.

    But now, I have another problem.

    I have 3 siemens contactors (3RTU1035 coil of 24VDC), the coil has a reversed diode, the negative is connected to A2 of the coil, and the A1 is connected to the Konnect board.
    When the coil is activated multiple times (between 3 and 10 times) Kmotioncnc freeze with error "Read Failed Auto Disconnect".
    I need to kill the process of KmotionCnc and reconnect the USB from Kflop.
    It looks like Kflop does not reset because all the programs continue working.

    If I run a long gcode from KmotionCnc it can be working for hours without problems, only if I never operates the contactor.

    Te homing with index is working fine, the Closed Loop, the coordinated motion, etc.

    -The USB of KFlop is connected with an USB Isolator from olimex.
    -KFlop is connected to a power source of 5V, the earth ground is connected.
    -The GND Hole of Kflop is only connected to the Shield of the encoders and to the GND Hole of the Konnect board.
    -There is not connection between Earth ground and DC ground in any component (I haved checked it with a ohmetro).
    -The computer is connected to a no-break, and the power source of kflop is connected directly to the line, using an EMI Filter.

    I have noticed that when it happends in the board menu of kmotion says "0x0 0xFFFFFFF" instead of display nothing.

    As you can see in the pictures I have 4 bifasic 220V fans, when I connect them there is a continuity between the phase line 1 and Earth Ground (700-900ohm), and the same with the phase line 2, its normall?

    I have attached some pictures of the installation.

    I'm sorry for my English! :S

    I really appreciated your help. Thank you very much!!

    Encoder for stepper motor-20161209_201009-1008x756-jpg
    Encoder for stepper motor-20161209_201023-1008x756-jpg
    Encoder for stepper motor-20161209_201132-756x1008-jpg
    Encoder for stepper motor-20161209_201154-1008x756-jpg

    EDIT: I forgget to mention that sometimes the PC goes to blue screen with error "KERNEL SECURITY CHECK FAILURE"

    Last edited by ssjantonio; 12-10-2016 at 02:57 PM.


Page 4 of 5 FirstFirst 12345 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