DMM Servo Spindle Trouble

steelcogs

steelcogs
Hi, still having trouble getting my DMM .75kw servo motor set up for spindle use. I have the 0-10v part working, but not the direction or encoder. I'll explain the DMM settings and how I have it wired. The encoder part in particular is sort of confusing. Here is the DYN4 servo driver documentation.

Firstly, DMM settings:
  • Input - Analog
  • Mode: Speed Servo
  • Gear setting - 5000
  • Encoder PPR - 96 (for 5000 RPM max)

Wiring to Masso/Masso settings
  • Masso set to VFD, 5000RPM Max, and 96 PPM so I can use 5000RPM
  • Masso spindle pin 1 to 10v in on driver
  • Driver 0-10v ground to Masso ground (As of right now 0-10v works)
  • Encoder A+,B+,Z+ to their respective Masso inputs
  • Encoder ground to Masso ground.
  • Driver CW+ (pin 11) to Masso spindle pin 4
  • Driver CW- (pin 23) to Masso spindle pin 5
  • Driver pin CCW+ (pin 22) to Masso spindle pin 6
  • Driver pin CCW- (pin 10) to Masso spindle pin 7

Both the encoder and direction connections seem to confuse me.

The encoder seems like it should be simple enough but I don't get any feedback. For a brief moment I had some sort of feedback but it was nowhere near correct and it obviously wasn't working correctly. The documentation doesn't list whether or not any inputs should be inverted or not. This is "A/B/Z Quadrature Differential Line Driver" encoder, per the DYN4 doc. I believe I have the ground correct since the doc says "Ground of JP5 connector is connected to D-Sub 9 shell. When using encoder output, make sure ground between host device and DYN4 servo drive is connected together." How I understand this is that the outer D shape of the connector is the ground and the wire it's continuous with should be the one wired to the Masso ground, or am I incorrect? There are also the 3 pins listed in the doc that all show "NC" and I have no clue what these do/if I'm supposed to do anything with them.

The direction is also slightly confusing since I can't seem to find anywhere in DMM doc saying 0-10v direction can be controlled with the 4 pins when in speed servo mode. It's possible I'm glossing over this. The Masso doc also doesn't list the polarity for pins 4-7, if it matters. Or should I be using the positive servo driver pins into Masso spindle pins 2/3 and putting the negatives to Masso ground? Again, just confused. Any help would be great, I'd like to have this working by this weekend, thanks.
 

testyourdesign

testyourdesign
@steelcogs this problem looks like a similar problem as I was experiencing with my BLDC servo drive. I ended up using the spindle output signal pins 2 & 3 instead of pins 4-7. Take a look at the diagram in DMM manual section 2.3.3 you will see that they are using an opto-coupler on the input pins.

I could be wrong but based on the DMM wiring diagram my guess is:
  • Connect Masso Spindle Pin2 to DMM Pin 11 .
  • Connect DMM Pin 23 to Masso (-).
  • Connect Masso Spindle Pin 3 to DMM Pin 22.
  • Connect DMM Pin 10 to Masso (-).

That should allow Masso activate the optocoupler circuits in the DMM. I believe that Masso's TLL output is limited to 20mA based on the 74HC14 chips data sheet. The 270 ohm resistor in the DMM with a 5V output from Masso should equate (V/R = I) to 18.5 mA so its close to the limit of the Masso TTL chip, You need advice from Masso before proceeding with this approach but it looks like the way you have it now you basically have a circular loop with no signal to drive the DMM.

Please wait for feedback from @masso-support before doing anything as I am not an expert.

Do you have any input on this @clover?

Cheers, Stephen Brown
 

steelcogs

steelcogs
@testyourdesign You sure you're not an expert? Your CNC conversion craftsmanship says otherwise haha.

But yeah my only other guess was that it should only be using pins 2-3 instead of 4-7. Most of the super technical stuff is way over my head.

By chance, do you have a working differential encoder too? There's so little info out there of people actually having working encoders installed (that I can seem to find anyway) vs. just having the documentation as a reference.
 

testyourdesign

testyourdesign
Thanks for the compliment @steelcogs but I am old school. These new controllers using direct connection to unprotected TTL chips just plain freak me out! Expensive smoke occurs to easily for my liking...

Normally a differential encoder has a 5 Volt input, a 0V com and the 3 connections to A B & Z. I don't see the 5V input in your list. Do you have schematic for the encoder?
 

steelcogs

steelcogs
@testyourdesign I believe this is the correct documentation for the encoder on my motor. The motor page says its an ABS-16-01 but I believe it would be, more specifically, ABS-16-ML1C5-01.

To my knowledge, the DYN4 driver powers the encoder via the JP5 connector, so it's likely they just left that out in the driver documentation.
 

clover

clover
@testyourdesign

Do you have any input on this @clover?

Sorry Stephen I haven't been following this thread and I am unfamiliar with the DMM.
I believe that Masso's TLL output is limited to 20mA based on the 74HC14 chips data sheet. The 270 ohm resistor in the DMM with a 5V output from Masso should equate (V/R = I) to 18.5 mA so its close to the limit of the Masso TTL chip,

While your theory is correct your assumptions are not quite on the money. A 74HC part will only source (output) about 4 mA current and even then its output voltage is likely to drop about a volt to about 4V.

Additionally, the Opto-isloator itself will require a minimum of 1V. Therefore the actual voltage across the 270 ohm resistor will be closer to 3V giving a current of 11.1 mA. But because the 74HC14 will only source 4mA trying to drain 11mA from it will reduce it output voltage below the aforementioned 4V! this in turn will reduce the current supplied to the Opto - we can only guess at the resultant current.

Now not all Opto-isloators have been created equal. The one in the DMM may operate with the current supplied by the circuit. Without knowing the part number it is difficult to say - chances are it will. You really can't do any harm by trying it.

You talk about being scared by TTL stuff - it's pretty foolproof as long as you don't introduce into either inputs or outputs any voltages higher than the operating voltage (5V in this case). Also they are not particularly happy about having their outputs shorted Low or High (0V or 5V).
 

steelcogs

steelcogs
@clover Good news, it worked! Another thing to cross off my list, complete. Mostly just need dialing in at this point, I think.

It seems the encoder is partially working too. It gives a reading at low RPM but not more than 400-500 RPM. It actually reads downwards the more RPM I give it. My Masso is set to use 96PPM and that's what I set in the DMM software. Weird...

Side question. What resolution does the 0-10v follow, 0.01 increments, or is it less accurate? This may just be something with me only using 110v with this motor when it actually steps 240v down to 150v but I seem to notice the RPM (checking it with a handheld tach) is ~50-60 below what it should be.

Double side question for @testyourdesign. When you upgraded your mill's motor, did you stick with the stock pulleys (or gears if that's what uses) or did you swap to a custom belt drive system? I swapped to a belt drive on my G0704 clone and I can't get this pulleys aligned correctly for the life of me. Belt is always slippling one way or the other, not to mention the noise/vibration.
 

testyourdesign

testyourdesign
@steelcogs that is really great news.... I wish I had better luck with mine on the first go around.

As for the motor upgrade I put a new pulley on the motor to slow things down at the spindle but I kept the same timing belt type. The motor turns at 7500 RPM and the spindle is turning roughly 5000 rpm. It does vibrate a little but its not any worse than it was with the old 1800 rpm motor and the reduction gives me a little more torque at the lower end.

Your problem sounds like it could be caused by the motor not being perfectly parallel to the spindle. A slight tilt one way or the other and the belt will ride up the pulley. Maybe shim the motor mounts with washers to see if it helps. Take a look at CNC4XR7's pulley setup on him PM727m. I think he uses a Poly V Serpentine belt instead for better alignment and less vibration. Might give that a try myself if I get tired of the vibes.

Are you running with PWM or VFD setup?

Cheers, Stephen Brown
 

steelcogs

steelcogs
@testyourdesign I'm using the VFD setup. The servo driver doesn't take modbus otherwise that would've been my first choice.

Googling Poly V Serpentine belt I get a couple different things popping up. I assume you mean the Micro rib one? That's what it looks like in Sam's videos anyway. I'd actually thought those and the normal V belts bridgeports often used would be better and quieter (and harder to run off track) than the timing pulleys. Honestly the reason that I went with timing pulleys is because they're so readily available from SDP/SI and I (sadly) don't have a lathe to make pulleys that are the correct size. The angle of both of my pulleys is constant to their respective shafts within a few thousandths and I used a straight edge to try to align them as parallel as possible. I might go over to CNCzone and ask since they have people who've been at this for years lol.
 

clover

clover
Good news, it worked!

That is good news @steelcogs.
Side question. What resolution does the 0-10v follow, 0.01 increments, or is it less accurate?

It looks like the DAC (Digital to Analog Converter) is a 1/3 section of a 10 bit part an SDA7123. If this is so then it has a resolution of 1023 increments (2?10 -1). Therefore incremental steps would be (10V 1023) =0.009775 Volts or about 9.77 mV each. In software it is possible to use more DAC's to increase the resolution - or a lesser number of bits to decrease the resolution but I think it unlikely that MASSO have done either.

So your 0.01 (V) increments is pretty much bang on!
 

steelcogs

steelcogs
@clover Honestly I'm fine with 0.01v resolution. That means, theoretically, with 5000RPM, I should be able to dial it to getting within 5RPM of what I set it too. Pretty solid for home hobby use. Again, it seems like as of right now I'm getting about 55 less rpm than I'm sending it a command for. This is what I'm getting with my handheld tach at least. Once I get help with the encoder (or figure it out myself on accident, lol) I can know for sure what RPM I'm getting.

It's weird, I can dial in settings between the Masso and DYN4 driver to hit a certain RPM (say, 2000) but if I tell it to go 1000, it's off then and only about 980. Does the Masso use the encoder just as RPM feedback, or does it try to compensate for programmed RPM vs. actual RPM by adjusting the voltage level on the fly? I suppose if that was the case, an improper encoder setup could cause this.

My original thought was that I had it set up for a higher RPM than I could achieve with 120v while I wait for my 240v outlet to get installed, but I brought it down within the limits of 120v (set everything up for a max output of 3500RPM instead of 5000) with the same result.
 

clover

clover
I can dial in settings between the Masso and DYN4 driver to hit a certain RPM (say, 2000) but if I tell it to go 1000, it's off then and only about 980.

As an electronics guy I can see many reasons why you are getting these numbers but I will have to leave it to @masso-support to say if these are out of spec. I suspect though your weak link might be the handheld Tacho.
 

steelcogs

steelcogs
@clover Yep, you're absolutely correct. There are a couple more things I can test out that I hadn't done yesterday after I had the CW/CCW issue sorted out. The tach is definitely not the most reliable test method (a working encoder would be lol) but I will say it did pretty much match up to the stock tach that came with the mill, and when setting up the motor through the software I could command X RPM and IIRC it was spot on. I'll need to re check that and maybe check actual voltage out per command.
 

masso-support

MASSO Support
Staff member
answers to a few things in this topics:
  1. The optocouplers will need minimum 5v input on the MASSO as there is a resistor on the opto input. Measure this voltage from the encoder when its connected as the 5v from the drive might not have enough current, if this voltage drops then MASSO will not be able to see the input signal.
  2. Yes the 0-10v output on the MASSO is 10 bit.
  3. Have you checked the encoder page info and also the mention about removing capacitors? https://www.masso.com.au/docs/masso...on/setup-and-calibration/spindle-rpm-encoder/
 

masso-support

MASSO Support
Staff member
Quote from steelcogs on November 30, 2018, 6:16 am

Hi, still having trouble getting my DMM .75kw servo motor set up for spindle use. I have the 0-10v part working, but not the direction or encoder. I'll explain the DMM settings and how I have it wired. The encoder part in particular is sort of confusing. Here is the DYN4 servo driver documentation.

Firstly, DMM settings:
  • Input - Analog
  • Mode: Speed Servo
  • Gear setting - 5000
  • Encoder PPR - 96 (for 5000 RPM max)

Wiring to Masso/Masso settings
  • Masso set to VFD, 5000RPM Max, and 96 PPM so I can use 5000RPM
  • Masso spindle pin 1 to 10v in on driver
  • Driver 0-10v ground to Masso ground (As of right now 0-10v works)
  • Encoder A+,B+,Z+ to their respective Masso inputs
  • Encoder ground to Masso ground.
  • Driver CW+ (pin 11) to Masso spindle pin 4
  • Driver CW- (pin 23) to Masso spindle pin 5
  • Driver pin CCW+ (pin 22) to Masso spindle pin 6
  • Driver pin CCW- (pin 10) to Masso spindle pin 7

Both the encoder and direction connections seem to confuse me.

The encoder seems like it should be simple enough but I don't get any feedback. For a brief moment I had some sort of feedback but it was nowhere near correct and it obviously wasn't working correctly. The documentation doesn't list whether or not any inputs should be inverted or not. This is "A/B/Z Quadrature Differential Line Driver" encoder, per the DYN4 doc. I believe I have the ground correct since the doc says "Ground of JP5 connector is connected to D-Sub 9 shell. When using encoder output, make sure ground between host device and DYN4 servo drive is connected together." How I understand this is that the outer D shape of the connector is the ground and the wire it's continuous with should be the one wired to the Masso ground, or am I incorrect? There are also the 3 pins listed in the doc that all show "NC" and I have no clue what these do/if I'm supposed to do anything with them.

The direction is also slightly confusing since I can't seem to find anywhere in DMM doc saying 0-10v direction can be controlled with the 4 pins when in speed servo mode. It's possible I'm glossing over this. The Masso doc also doesn't list the polarity for pins 4-7, if it matters. Or should I be using the positive servo driver pins into Masso spindle pins 2/3 and putting the negatives to Masso ground? Again, just confused. Any help would be great, I'd like to have this working by this weekend, thanks.

are you able to change the direction by connecting the direction signals on the DMM manually without using MASSO? because then you can check firstly if the DMM is even taking the directions signals.
 

steelcogs

steelcogs
@masso-support

I have forward and reverse direction working now.

For the encoder, I believe it uses 150ma, according to page one on this PDF. Page 40 on this PDF for the driver shows the encoder output, which is 5v. In DMM settings I have LINE_NUM set to 24 as the documentation states LINE_NUM*4=PPR so I have it set to use 96 accordingly in Masso.

Is it necessary to remove capacitors if I'm not doing the opto-coupler upgrade? I'd like to avoid any modification if possible, when I bought my mill the Masso was very neatly wired and packed into a very small space with everything else. I can still wire things in but I'd have to disassemble everything in order to make a modification like that.
 

testyourdesign

testyourdesign
@steelcogs the capacitor removal and optocoupler upgrade is for Spindle RPM readings above 4800 RPM. If you follow the link to the calculator you will see that an encoder of 100ppr can't exceed 4800 without exceeding the optocoupler 8kHz frequency limit. The new ones are good for 20kHz or 12000 RPM.

Did you change how the encoder was connected in order to get it working or was it only a software setting in DMM?

Cheers, Stephen Brown
 

steelcogs

steelcogs
@testyourdesign That's what I thought. That's why I lowered the encoder PPR output down to 96 so I can get away with the 5000 my motor outputs without making any hardware changes to the Masso.

The encoder still doesn't work properly, just forward and reverse motion commands do and the motor mostly responds well to commands. By that I mean it's within 50 or so RPM of what I give, but that's a WIP. That may be more accurate when I actually apply the voltage the motor is rated for. Not holding my breath but who knows.

One other thing worth noting is that when I went out to turn on the mill and motor today I just gave it a command for 300CW RPM and it did actually read that out correctly (I got a reading of 260 from both the encoder and my hand held tachometer). Going above that it kind of just crapped out and quit working.
 

testyourdesign

testyourdesign
My spindle has an encoder output that is connected to its servo drive. Its pure chinese tech so the manual is impossible to figure out but I bet there is an output like yours built in. For now I'm like you... its a WIP but it accepts the spindle speed and I can I can calibrate it fairly well to my trusty hand held tach so I am happy. The tach is really just a point of reference just like all those charts and calculators. Just use it to get in the ball park and dial in the results with a chosen reference speed on the Masso. Being +/- 50 RPM from actual is not critical. Knowing the speed that gives the perfect finish for parts made on your machine is really all you want.

Cheers, Stephen Brown
 
Top