Dynomotion

Group: DynoMotion Message: 10154 From: cnc_machines Date: 9/9/2014
Subject: KStep and Encoders
Good Morning,

I am using the Kstep and have some questions about how to hook up encoders. It appears that they are normally wired directly into JP7 on the Kflop board. This being the area with a 5V supply, and pins tolerant to 5V. Unfortunately the Kstep also uses this connector, and it converts these optically isolated 12/24V inputs.

Is there a way to use the 12/24V inputs on the Kstep board to read the encoders? Do I need to buy a separate breakout board and plug it into JP4 or JP6 on the Kflop? Obviously if I can do it with the board I have it would be preferable.

Thanks,

Scott


Group: DynoMotion Message: 10157 From: Grace McKay Date: 9/9/2014
Subject: Re: KStep and Encoders
A few years back when we were first setting up encoders to the scanner project, we used a voltage divider circuit that knocked down the logic voltage from 5v to 3.3 or close. Tom provided the circuit idea. But i have recently run across this item on ebay http://www.ebay.com/itm/3-3V-To-5V-2-Channel-Logic-Level-Converter-Bi-Directional-Module-for-Arduino-/191282004536?pt=LH_DefaultDomain_0&hash=item2c894bc238  so I am wondering if this could be used to shift the logic levels on the Kflop. It seems to me that maybe it could. Tom, what do you think?

Grace McKay
Electric Pictures
Spirit High Definition Motion Picture Telecine Scanning
ElectricPictures.tv
949-838-0001

On 9/9/2014 7:28 AM, cnc_machines@... [DynoMotion] wrote:
 

Good Morning,

I am using the Kstep and have some questions about how to hook up encoders. It appears that they are normally wired directly into JP7 on the Kflop board. This being the area with a 5V supply, and pins tolerant to 5V. Unfortunately the Kstep also uses this connector, and it converts these optically isolated 12/24V inputs.

Is there a way to use the 12/24V inputs on the Kstep board to read the encoders? Do I need to buy a separate breakout board and plug it into JP4 or JP6 on the Kflop? Obviously if I can do it with the board I have it would be preferable.

Thanks,

Scott



Group: DynoMotion Message: 10158 From: cnc_machines Date: 9/9/2014
Subject: Re: KStep and Encoders
Tom,

I was going through the IO again and noticed JP5 - GPIO on the Kflop board. I could probably connect my encoders directly to this location and not have any issues?

To make this change would I do the following on the Configuration screen:

1. Load KstepAxis1.mot
2. Axis Mode
  • Input - Change from No Input to Encoder
  • Output - Why is the Kstep normally set to "Step Dir" shouldnt it be "Microstep"?
3. Input Channel
  • Do I need to change the input to correspond to JP5 IO
  • Each encoder has two inputs, why is the second channel greyed out?
  • Gain - Is this were I set the ratio of the encoder to the motor?

3. Output Channel

  • Leave these alone.. they should be loaded correctly.


Once this is set for all of the axis - what is the procedure to get it loaded correctly onto the board?



Thanks,


Scott

Group: DynoMotion Message: 10159 From: Moray Cuthill Date: 9/9/2014
Subject: Re: KStep and Encoders
I think with a KStep, JP5 is the easiest option for adding encoders. I used it to close the loop using glass scales on my little probing machine recently, and it works well.
I made up a cable that goes from a RJ45 (JP5 / normal CAT network connector) along with power and ground to three 9-pin D sockets connecting directly to the scales. A couple pictures can be found at -
 
Details on setting up closed loop can be found at http://www.dynomotion.com/Help/ClosedLoopStep/ClosedLoopStepper.htm
Main things are change the channel input and output mode, then set the input channel and gain. Provided everything has been working OK open loop, then you shouldn't need to alter any of the other channel settings.
After that, you may want to follow the suggestions in the link regarding tweaking PID and Motion Profile settings.
 
Moray

On Tue, Sep 9, 2014 at 7:41 PM, cnc_machines@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Tom,

I was going through the IO again and noticed JP5 - GPIO on the Kflop board. I could probably connect my encoders directly to this location and not have any issues?

To make this change would I do the following on the Configuration screen:

1. Load KstepAxis1.mot
2. Axis Mode

  • Input - Change from No Input to Encoder
  • Output - Why is the Kstep normally set to "Step Dir" shouldnt it be "Microstep"?
3. Input Channel
  • Do I need to change the input to correspond to JP5 IO
  • Each encoder has two inputs, why is the second channel greyed out?
  • Gain - Is this were I set the ratio of the encoder to the motor?

3. Output Channel

  • Leave these alone.. they should be loaded correctly.


Once this is set for all of the axis - what is the procedure to get it loaded correctly onto the board?



Thanks,


Scott


Group: DynoMotion Message: 10162 From: Tom Kerekes Date: 9/9/2014
Subject: Re: KStep and Encoders
Hi Scott,

There is a FPGA register option to switch the Encoder Inputs over to JP4 and JP6.  Although those pins are 3.3V inputs I have never seen a problem connecting them to 5V encoders,  The KFLOP 3.3V Inputs should not be driven hard above 3.8V or they may be damaged because they are diode clamped to the 3.3V supply.  Most 5V TTL signals do not do this.  The are usually only specified to go over 2.8V.  Especially under relatively heavy load such as the 150ohm pull down resistors that JP4 and JP6 have. If you are concerned you can test the encoder outputs under a 150ohm load with a voltmeter before attaching them.


Defined in KMotionDef.h
-----------------------------------
// addr to r/w encoder noise rejection filter value (0..255),
// Bit8 switches Encoders Ch4-7 from JP5 to JP6,
// Bit9 switches Encoders Ch0-3 from JP7 to JP4
#define ENC_NOISE_FILTER_ADD  0x05  
#define ENC_0_3_JP4 0x200
#define ENC_4_7_JP6 0x100
#define ENC_NOISE_FILTER_DEFAULT_VAL 7 // noise rejection filter default value (100MHz/3/7/2 = 2MHz)


Example
-------------
    // Mux encoder inputs from KFLOP JP7 & JP5 to JP4 aand JP6
    FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_3_JP4 + ENC_4_7_JP6 + ENC_NOISE_FILTER_DEFAULT_VAL;


HTH
Regards
TK


From: "Grace McKay grace@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Tuesday, September 9, 2014 10:11 AM
Subject: Re: [DynoMotion] KStep and Encoders

 
A few years back when we were first setting up encoders to the scanner project, we used a voltage divider circuit that knocked down the logic voltage from 5v to 3.3 or close. Tom provided the circuit idea. But i have recently run across this item on ebay http://www.ebay.com/itm/3-3V-To-5V-2-Channel-Logic-Level-Converter-Bi-Directional-Module-for-Arduino-/191282004536?pt=LH_DefaultDomain_0&hash=item2c894bc238  so I am wondering if this could be used to shift the logic levels on the Kflop. It seems to me that maybe it could. Tom, what do you think?

Grace McKay
Electric Pictures
Spirit High Definition Motion Picture Telecine Scanning
ElectricPictures.tv
949-838-0001

On 9/9/2014 7:28 AM, cnc_machines@... [DynoMotion] wrote:
 
Good Morning,

I am using the Kstep and have some questions about how to hook up encoders. It appears that they are normally wired directly into JP7 on the Kflop board. This being the area with a 5V supply, and pins tolerant to 5V. Unfortunately the Kstep also uses this connector, and it converts these optically isolated 12/24V inputs.

Is there a way to use the 12/24V inputs on the Kstep board to read the encoders? Do I need to buy a separate breakout board and plug it into JP4 or JP6 on the Kflop? Obviously if I can do it with the board I have it would be preferable.

Thanks,

Scott