Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: flyingmike on July 18, 2011, 03:37:07 PM

Title: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 18, 2011, 03:37:07 PM
Hi Guys,

After a few mods I have finally got my Denford Novamill up to the stage of configuring mach3. I have added new stepper motors, Nema 23 double stack motors on the X and Y axis and a Nema 34 single stack motor on the Z axis. The control I am using is from Rhonmac cnc with the controllers set to 8 microsteps.

The machine has a belt drive on each axis giving a reduction ratio of 1:2.5, the pitch on the ballscrew is 5mm. From this I worked out the steps per unit should be 800 (for a metric setup) I set this for each axis and when I commanded a movement of 1mm I got a very small movement on the machine. To get the machine moving the same amount as that commanded I had to set the steps per unit to 25889.97. I`m confused as to why my calculated number of 800 is so different to the actual one required?

Also, with such a high steps per unit the max speed is reduced to 57.94 which is about right from a crude measurement I did with stopwatch.

One thing to note is I`m only using the demo version of mach3 as I wanted to see if it was all going to work before I bought the license. Would this make a difference?

Any help would be much appreciated, thanks in advance!

Mike
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 18, 2011, 05:04:26 PM
Sounds like you may have your native units set to Inch. You will see that from the Config menu, if its at Inch change to mm then reset your steps per unit etc to the 800.
Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 18, 2011, 05:24:08 PM
Hi,

I have just checked the 'select native units' in the config drop down box and they are set to MM. Is this the only place I need to set the units?

Thanks
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 18, 2011, 05:28:05 PM
Look on Settings page to the lower right and see if the mm LED is lit, if it is then I am not sure whats going on, if you attach your xml I will have a look and see if I can find the problem.
Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 18, 2011, 05:55:19 PM
Just checked and MM is green.

I have attached the xml file from the backup folder, is this the right one? Thanks for your help on this..

Mike
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 18, 2011, 06:04:19 PM
No its the one from the main Mach3 folder that is the current one, make sure you shut down Mach first before you copy it as Mach only writes to the xml on shut down.
Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: angel tech on July 18, 2011, 06:10:35 PM
Mike does it sound smooth when moving or really rough?
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 18, 2011, 06:16:02 PM
ok, I think this is the correct file.

It doesnt sound smooth to be honest. When my steppers move on the novamill is sounds more like a 'stepping' noise if that makes sense, same noise in both directions. I`m not sure what these are suppost to sound like so its hard to describe.

I have a step four cnc router and the motors on that have got a more high pitch constant noise when moving.

Thanks
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 18, 2011, 06:16:41 PM
best if I attach the file...ha
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 18, 2011, 06:21:47 PM
I would say your acceleration may be on the high side, lower that and see if it helps, also worth lower the Velocity as well whilst testing things.
What kind of drives are you using? You may need a wider pulse or even need Sherline mode.
Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: angel tech on July 18, 2011, 06:22:49 PM
is the sound of the motors constant or varying, like a grumbling sound
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 18, 2011, 06:35:49 PM
The Sound it fairly constant. I would say that a grumbling sound was not far off to be honest.

I have tried different velocity and acceleration settings. The acceleration I have set from quite slow were I could hear the motor speeding up and slowing down then to the max acceleration I try to keep is max speed in 0.1s. Changing the velocity doesnt seem to do anything as I seem to be capped at a relatively low speed. I can make it go slower in  the MDI but not faster.

The Drivers are QJ5045 2-Phase Microstepping Motor Drivers. I have attached the data sheet that I was sent.

The switches are currently set to 8 microsteps, Full Current, and the current choice being 4.2A
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 18, 2011, 06:43:22 PM
I have used the big brothers of these drives and they are quite good, not quite as good as Geckos in my opinion but not far behind. Make sure you have the microstepping set right as the manuals can often be misleading, for example mine had the settings for Step/Dir and CW/CCW round the wrong way.
Also increase your pulse width on Motor Tuning to 3 or 4 and see if that helps.
Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 18, 2011, 06:59:54 PM
The only part I have touched on the drivers is the switches for micro stepping and current. I bought the control unit as a complete ready to go unit along with the steppers. Attached is a photo of the inside of the controller unit. I cant same I`m overly impressed with the quality so far but thats another story and I just want to get the thing working now.
I have asked the guy the same questions but he is a little slow to respond and he has been sorting other problems I had like incorrect cables. Maybe I should check all the wiring to the driver.....

I noticed on the drawing for the wiring of the stepper motor the wires are labelled A and A (with a bar over the top) and on the controller they are A- and A+ is it important which one is which?
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 18, 2011, 07:04:28 PM
A and A+ are the same and A with - over the top is the same as A-.

Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 18, 2011, 07:08:59 PM
Does it matter which way around the cables are connected? I noticed on my unit that the guy has not been consistant with the A and B wiring.

i.e A+ going to either A or A with the bar over?
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 18, 2011, 07:48:13 PM
It may or may not, as long as the wiring is consistent on a drive it wont really matter but best really having it as per wiring diag.

Just double check the dip switches are set correct for the microstepping as it does sound as if they might be wrong but could also be the wiring if the coils in the motor are connected wrong I suppose.
Been a long time since I messed with steppers so a bit out of touch with the wiring.
Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 19, 2011, 03:26:48 PM
Today I tried it all on a different PC but its still the same.

I have checked the driver and the micro steps are set to 8 based on the table they print on the case. I tried lowering the speed and the acceleration and they did as expected but I`m still capped at this slow max travel of about 60mm/min.

I have attached a short video I took with my phone so you can hear the Y axis stepper motor in action.

The only thing I can find wrong in the control unit is that pin 25 on my breakout board is not used and in the diagram supplied with the unit pin 25 should be logic ground. Does anyone know if this would make a difference?

Thanks
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 19, 2011, 04:31:01 PM
Flip the switches to the opposite way and see if its any better or worse.
Hard to tell from the vid, doesnt sound right but its so slow it may be.
Wont matter about 25 not being connected as long as the other Gnds are.
Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 20, 2011, 05:39:40 PM
All sorted now! :)

I was having a senior moment and read the 0 as off instead of on when setting the switches on my drivers. So after setting all of them correctly all is working well. :)
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 20, 2011, 05:54:37 PM
Thought that might be the case, thats why I suggested you flip the switches to the opposite in my last post ;)
Done the dip switch wrong way myself a few times ;D
Hood
Title: Re: Setting Steps Per Unit in Mach3
Post by: flyingmike on July 21, 2011, 04:20:57 AM
Following your suggestion it was the next thing on my list to try, before I had a chance the guy I got the controller off sent me a photo of what the dip switches should look like and I thought....hmmmm ok...haha Great when the problem can be found though!

The next minor issue I have to solve is the random cutting out of the estop and limits. I have put my debounce up to 5000 and they still have a habbit of tripping out. Can I put a capacitor across my switches and estop to solve this?

Mike
Title: Re: Setting Steps Per Unit in Mach3
Post by: Hood on July 21, 2011, 04:42:58 AM
Could it be vibration triggering the switches?  5000 is quite a bit and if its noise you have real problems, are your switch wires shielded and properly grounded at the control end?
Some people use capacitors, 0.1uF is the norm I think but no electronics expert.

Hood