ClearPath Servo and Masso Step/Direction Output?

safeairone

safeairone
I was having great difficulty setting the PID settings on the Gecko 320X servo controllers and Chinese servos on the machine I'm building so I got rid of them and went with Teknic's Clearpath Step/Direction (SD) servos which have integrated controllers and position encoders. I searched the Masso forums and see that other folks have had good success with these servos and Masso controllers. I'm using a 5 axis G3 controller.

I installed the servo on my Y axis and figured it'd be a simple auto-tune of the servo using Teknic's tuning software then connect to the Masso and all would be fine, I figured I'd be OK based on this thread: https://www.masso.com.au/forums/topic/masso-with-teknic-servo-motor/ This was not the case for me and I'm wondering if there's a cure for this. Here's my issue; The documentation for the servo has the following note:
Engineer s Note: 5V differential outputs are not directly compatible
with ClearPath inputs because differential drivers' guaranteed output
voltage swing is typically not guaranteed to meet the ClearPath input
minimum input voltage requirements.
While differential drivers may work initially, they may fail over time as the
environment changes, i.e. the motor heats up, components age, and so
forth. This can result in erratic operation that is difficult to debug.​

The servo moves just fine through the tuning software--I can jog forward and backward just fine using my laptop and USB cable connected to the servo. I can also connect a 9v battery to the motor's step and direction leads and get it to step and change direction when those circuits are energized with the 9v battery (this is a troubleshooting procedure Teknic recommends to confirm that the servo is processing the step and direction signals it receives).

The problem is that when I connect the step/direction leads to the G3 controller and jog the axis, the servo doesn't move and the step/direction indication in the tuning software is erratic (direction changing/flickering when no direction change is commanded and step signal reception only occasionally activate despite continuous cranking of the MPG or holding of the jog button on the screen). The result is the same no matter which axis on the G3 I use as the source for the step/direction signals.

So the servo and its controller responds to step/direction signals correctly but the G3 isn't putting out a sufficient step/direction signal to the servo controller. Here's where the servo engineer's note, above, comes into play: I put my voltmeter between the axis D+ and D- terminals and cranked the MPG and got + and - 3.48 volts. I did the same between the +S and -S terminals and also got +3.48 volts. Both of these values are relatively close to the +/-4v differential that the Masso is supposed to put out.

I suppose my first question is: How are other folks getting their ClearPath servos to work with their Masso controllers, and my second question is: Is there some device out there that can boost these 3.48v outputs to the 5-24v step/direction signals necessary to trigger the servo's step/direction action? For what it's worth, the voltmeter is right at 24v on the power input/ground terminals on the G3.

Thanks!



--Mark
 

zombieengineer

ZombieEngineer
@safeairone

How many axis do you need to convert?

There are several ways this problem could be tackled but I would need to know how good you are at soldering.

Option 1 - Use opto-couplers (search for "optocoupler module -relay" on eBay)

Option 2 - Use a transistor and two resistors per signal, this is a real DIY solution (cost effective - yes, not so professional looking)

Option 3 - Use the 20 pin side connector of the Masso G3 controller. This has true TTL outputs, would require a length of 20 wire IDC cable, 2 of 20 pin IDC crimp connectors (use a vice to crimp) and a IDC 20 pin terminal board. As for the voltage on the 20 pin side connector - 4.95V when measured open circuit.

If you are looking at servo motors I think option #3 is going to be your best choice for a nice clean wiring setup. Option #1 would require a number of modules which may not be DIN rail mounted. Option #2 is really something I would only recommend to a hobbyist (however the resulting output could easily be "over engineered" :)

I can provide details for option #2
 

safeairone

safeairone
Thanks for the suggestions. I ve got 4 axis that I need to immediately run (X, one slaved to X, Y, Z), with a rotary axis somewhere in the future.

I m not particularly good at soldering, but my wife is (or at least was, when she did it for a living a decade ago).

Let me digest your 3 suggestions and see how they work and try to figure out which one makes the most sense for my situation and also conforms as closely as possible to my policy of general laziness. ;)

Thanks!
 

zombieengineer

ZombieEngineer
Option #2 (as someone is probably going to ask for it).

For up to 7 signals (hence the earlier question about number of axis, each axis requires 2 signals therefore max of 3 axis).

Require:
  • Small breadboard prototype board (Altronics & Jaycar parts)
  • 1 x ULN4003 integrated circuit (Altronics & Jaycar parts)
  • Pull-up resistors to suit your servo driver inputs (suggest 2.7K)

Construction:
  1. Connect Pin 8 of the ULN4003 to ground / 0V (Leave pin 9 disconnected)
  2. Connect the inverted Step and Direction (S- and D-) to the inputs of the ULN4003
  3. Connect the output of the ULN4003 to your servo motor driver, add appropriate pull-up resistors
  4. Test the circuit

Ratings for the ULN4003 integrated circuit
  • For 0V input the output is effectively open circuit
  • For 3V input the output can sink 300 mA of current
  • Maximum sink current: 500 mA per output (subject to thermal limits of chip)
  • Maximum input voltage: 30 volts
  • Maximum pull-up voltage allowed: 50 volts

Pin-out of the ULN4003 (see attached picture).
 

Attachments

  • ULN4003.png
    ULN4003.png
    18.7 KB · Views: 64

safeairone

safeairone
Super, Thanks!



Having briefly looked at all the options, option #3 REALLY appeals to my sense of laziness. Since there's no (-)step or (-)direction circuit on that TTL IDC connector on the G3 controller, I presume it's it simply a matter connecting the -A and -B (direction and step) terminals on the servo to the the ground terminals on the G3?

This would be a wonderfully elegant solution to my problem if the TTL output is strong enough to trigger the servo controller.
 

zombieengineer

ZombieEngineer
@safeairone

I did some digging and found the Clearpath driver manual (Models MCVC, MCPV, SDSK, SDHP) - the 8mA at 5V input requirement (page 44) is more than what the G3 controller can supply with the TTL outputs.

The most reliable option will be to use the ULN4003 chips.
  • Connect the "Input +" to the 24V supply rail
  • Connect the "Input -" to the output of the ULN4003.
  • Connect the input of the ULN4003 to S+ / D+ as appropriate.
  • No pull-up resistors required unless wiring is more than 10 feet in length (page 47 of the Clearpath driver manual - NPN / Sinking circuit)
 

segoman-designs

SegoMan DeSigns
Mark,

Have you read this thread yet?


Post 3 has a PDF you can download, that is the wiring schematic I used for my setup:

G3 with Clearpath SDSK's

Z -23, X&Y - 34's

I went with the hi resolution models (which was probably overkill for a plasma environment), they work just fine with Masso w/ no amplification needed. Make sure you turn off the auto tune in the clerpath software when your done or it will ignore the Masso signals. Search the Masso documentation page for testing your opto-couplers for proper function.
 

safeairone

safeairone
@zombieengineer

Thanks for the explanation of what to do with this chip I wish there was a breakout board for this chip layout that d make life easy, though soldering up a breadboard isn t too complicated.

Looking at the attached image, could you please confirm that my understanding of your great explanation is complete? Please forgive my crude drawing; This shows how a typical step or direction circuit will be configured. The -S and -D outputs on the Masso are NOT used (?)


Quote from SegoMan DeSigns on June 9, 2021, 2:17 am

Mark,

Have you read this thread yet?


Make sure you turn off the auto tune in the clerpath software when your done or it will ignore the Masso signals. Search the Masso documentation page for testing your opto-couplers for proper function.

I did see that thread thanks. It s one of the reasons I thought the ClearPath servos would be a plug and play affair despite Teknic s warning otherwise.

Im definitely in enabled status (not software enabled ) when I m failing to make the servo operate; Good suggestion though. I m 100% confident that it s the 3.48v step/direction output from the G3 that is failing to trigger the servo controller (a bold statement that I hope not to regret ?).
 

Attachments

  • 0AF6B54D-7CC3-410A-9E85-25EB58751140.jpeg
    0AF6B54D-7CC3-410A-9E85-25EB58751140.jpeg
    1.9 MB · Views: 81

safeairone

safeairone
@zombieengineer

It just occurred to me that you re likely talking about drawing the +S and +D signals off the TTL outputs available on the 20 pin connector and not from the +/- 4v differential output shown in my crude drawing.
 

zombieengineer

ZombieEngineer
@safeairone

Your sketch is good and should work.

When I was referencing the S+ / D+ it could either be the terminals of the differential pair or the 20 pin connector (your choice). The DLN4003N will start conducting once the input voltage starts exceeds ?1.2V (every 6 mV higher than the threshold the output will sink an additional 1 mA) - by the time the input reaches 1.3V the output is already sinking enough current for the ClearPath optocoupler. With a 3V input the output is sinking enough current to drive 25 optocouplers in parallel.

In an earlier post you mentioned that you wanted a more "off the shelf" solution - you could potentially use a L298 based H bridge driver board (4 channels per board, 46V maximum voltage). The maximum pulse rate according to the datasheet of 40 kHz. This is getting well into the "over engineered" zone as a single L298 output could drive >160 optocouplers in parallel. There is also a L9110 based H bridge driver board (12V maximum voltage).
 

mr-ben

Mr. Ben
This is very troubling. I built two CNC machines using Teknic Clearpath servos (sd/sk model) controlled with Masso. One is G2 and is about 3 years old. The other is G3. I have had NO indication of missed steps

or any other problems with position control. What is different? I used Teknic power supplies and cables.

Ben
 

safeairone

safeairone
@zombieengineer

Before I order parts, just want to make sure I ve got it right; You referenced ULN4003 and DLN4003N. These numbers hardly exist on the internet and Google returns many sources for ULN2003, which I think will work (TTL level input, up to 48v output, DIP 16 format).

I have found a great DIN-mount DIP 40 breakout board that ll make this project easy and neat (DIP 40 because I ll need to use 2 of these chips). Nice thing about it is that it also has 2 lines that I can use as an onboard +24v bus and a ground bus.

@mr-ben

If your ClearPath servos are currently working with your Masso step/direction outputs, I think you ll be just fine. My case is kind of unique let s just say that I won t be able to return my controller to Masso for a warranty claim anytime soon.
 

zombieengineer

ZombieEngineer
Quote from Mr. Ben on June 9, 2021, 11:04 pm

This is very troubling. I built two CNC machines using Teknic Clearpath servos (sd/sk model) controlled with Masso. One is G2 and is about 3 years old. The other is G3. I have had NO indication of missed steps

or any other problems with position control. What is different? I used Teknic power supplies and cables.

@mr-ben

Short answer: Probably a different batch of optocouplers within the Teknic driver.

Optocouplers are good at high voltage isolation but poor in many other respects. One key parameter is the "Current Transfer Ratio" or CTR for short. The CTR is the ratio of current through the output transistor compared to the current through the input photodiode. Many optocouplers have an allowable range of 50% to 600% with an option to have devices from a narrower band of CTR (for example 80% to 160%). There is a massive amount of variability in these devices that is a real headache for circuit designers.

I suspect Teknic have not done themselves any favors with the current limiter component choices. The threshold voltage at which the current limiter kicks in is a little high (4.5V by graphical interpolation) when TTL logic allows for 2.7V. The optocoupler photodiode forward voltage is typically 1.5V leaving only 1.2V margin for the actual current limiter to be compliant. The simplest current limiter is a "N-channel JFET" where the "Gate-Source cutoff voltage" determines the voltage at which the current limit kicks in. The really cheap components have a threshold voltage of 3V ($0.184/device) while a device with a 1.2V threshold costs $1.21/device. The lower voltage threshold devices have less supply options (only one part number from one manufacturer vs 18 part numbers).

Back to the CTR issue - the optocoupler should trigger 100% of the time with a 8 mA input current, if Teknic have gone for a narrow CTR band device then the input should trigger somewhere between 3.0V (4mA) and 4.5V (8mA).
 

zombieengineer

ZombieEngineer
@safeairone
Quote from safeairone on June 10, 2021, 6:01 am

@zombieengineer

Before I order parts, just want to make sure I ve got it right; You referenced ULN4003 and DLN4003N. These numbers hardly exist on the internet and Google returns many sources for ULN2003, which I think will work (TTL level input, up to 48v output, DIP 16 format).

I have found a great DIN-mount DIP 40 breakout board that ll make this project easy and neat (DIP 40 because I ll need to use 2 of these chips). Nice thing about it is that it also has 2 lines that I can use as an onboard +24v bus and a ground bus.

My mistake - ULN2003 is the device I was looking at (apologies for the confusion - currently a little sleep deprived, truly a zombie engineer).

When I say the "DIP 40" my first reaction was "No" as typically a DIP 40 has wider spacing between the two rows of pins (0.4" vs 0.3").

However the breakout board you have quoted actually has holes for both row spacing so it will work for you. The extra "pins" (40 - 2 x 16 = 8) could also be used for a common rail for pull-up resistors.
 

teknicservo

TeknicServo
Hello @safeairone, @zombieengineer, and @mr-ben,

Thank you for using ClearPath servos and your interest in how they work.

There are any number of reasons why a certain wiring configuration may or may not assert ClearPath s 4V and 7.5 mA input minimums. Regardless, ClearPath servos can reliably be made to work with MASSO CNC controllers and most any other CNC controller. If you are having issues with differential step and direction, or run into any other issues, please reach out to Teknic s customer support by either giving us a call at (585-784-7454) or leaving us a message at https://www.teknic.com/contact/. We are more than happy to help you get up and running.

Best regards,

Trent T. Teknic Servo Systems Engineer
 

zombieengineer

ZombieEngineer
@teknicservo

Really short answer - The Masso differential outputs are true TTL and are unable to deliver 4V in either differential or single ended with respect to ground.



Longer, far more technical answer:

In the last couple of days I managed to perform some tests to benchmark the axis outputs of a Masso G3 controller:
Current (mA)​
V-Low​
V-High​
dV​
0.0​
0.14​
3.75​
3.61​
0.7​
0.14​
3.67​
3.53​
1.7​
0.15​
3.59​
3.44​
3.4​
0.16​
3.57​
3.41​
6.7​
0.18​
3.55​
3.37​
16.3​
0.23​
3.49​
3.26​
28.6​
0.28​
3.14​
2.86​
42.4​
0.35​
2.47​
2.12​
47.5​
0.35​
2.25​
1.90​

Masso_Axis_Output.png


The curve that has the most potential is the "Low" state as the voltage remains consistent regardless of the current.

My recommendation for wiring would be connect the plus side of the optocoupler to 5V and the negative side of the optocoupler to the Masso G3 axis output (probably S- or D-). This would provide 4.5V at reasonable current levels (anything up to 30 mA).

Teknic_Wiring.png
 

Attachments

  • Masso_Axis_Output.png
    Masso_Axis_Output.png
    16.9 KB · Views: 81
  • Teknic_Wiring.png
    Teknic_Wiring.png
    198 KB · Views: 72

safeairone

safeairone
Quote from ZombieEngineer on June 14, 2021, 11:49 pm

My recommendation for wiring would be connect the plus side of the optocoupler to 5V and the negative side of the optocoupler to the Masso G3 axis output (probably S- or D-). This would provide 4.5V at reasonable current levels (anything up to 30 mA).

Teknic_Wiring.png

@zombieengineer

Just back from vacation and re-read your latest suggestion based on your research--That is absolutely brilliant! Other than needing a 5vdc source, there's really nothing extra to buy/do. I'm going to give this a spin before I go with plan "B", for which I received all the parts while I was away. Unfortunately, the screw terminals on the DIP-40 breakout board come UNsoldered, doubling my work there. I'll update when I have tried one or both solutions.


Quote from TeknicServo on June 14, 2021, 10:57 pm

If you are having issues with differential step and direction, or run into any other issues, please reach out to Teknic s customer support by either giving us a call at (585-784-7454) or leaving us a message at https://www.teknic.com/contact/. We are more than happy to help you get up and running.

Best regards,

Trent T. Teknic Servo Systems Engineer

@teknicservo

Thanks Trent...I have nothing but good things to say about Masso Controllers and Teknic Clearpath servos and it looks like I have a couple of good options to cure my unusual situation here. Teknic customer support is superb; Ian replied immediately to my request for help in servo sizing and when my big fingers accidentally hit the wrong servo when ordering, Teknic swapped the servo out quite painlessly.

It looks like I have a couple of great options to fix my issue here, but I'm certain to get in touch when it comes time to tune my dual rack/pinion X axis (Y axis = ballscrew).
 

Attachments

  • bob1.jpg
    bob1.jpg
    128.4 KB · Views: 70
Top