Newbie needs help getting my setup working

More
22 Oct 2015 03:22 #64109 by Hypnotoad
I'm doing a CNC conversion on a small milling machine. I've got everything wired together and am trying to get a stepper to turn.


My setup consists of:

I've wired this all up according to the X axis portion of this diagram .

And I've used the StepperConf tool to configure the parallel port to talk to this. When I use the jog buttons in the tool to test out the motor the motor does not turn.

I've verified that I see ~5.5 V pulses at the output of the breakout board on the "step" output (pin 8 in the diagram) but I don't see the "direction" output (pin 9) pulse. I think this is an important issue, but the motor should still turn (just potentially the wrong direction), right? I briefly looked at a different set of pins on that board that I configured for the Y axis and I think saw the direction pulse once.

There are some things about the breakout board configuration that I am unsure of. The common terminals can be configured to be either ground or +5V. Also the outputs can be configured to be either pull-ups or pull-downs. At an electrical level I understand this but am unsure what the proper configuration for my setup is. I think I've tried all the combinations and didn't see anything move. The driver is also configurable from 1.5 A to 5.0 A and I've tried both ends of that as well as various microstep settings on the driver.

I did get the stepper to turn briefly when I put a scope probe across one of the windings at the motor driver output. I think the probe impedance was low enough to sink some current and let it turn. So I think the stepper is ok.

Any advice would be appreciated, I'm eager to get this machine moving.

Please Log in or Create an account to join the conversation.

More
22 Oct 2015 03:43 - 22 Oct 2015 03:45 #64110 by cncbasher
to start with use as little microsteping as possible , they default to half step
so long as you have 5v going to the + side of the stepper driver optos and the neg sides going to the bob , then all should be well

however this could be a error in your config file , so you need to get the steps per mm or steps per inch calculated first
you dont mention what your using for a powersupply , this is usually 34 - 64 v depending on the stepper driver specs

you dont need the direction pin for the steppers to work and it is either logic high or low depending on direction of the motor
the step pin however is one that is pulsed

post your full config as an archive , is the easy way to get this resolved , give that the above is correct

also beware of the amp enable some breakout boards need the enable pin to work , once you have the motors moving correctly then and only then connect the stepper driver
-en pins to one pin on the breakout and link that to amp enable .

as you dont have anything connected then for testing set the steps in the ini file for the equiv of 400 steps per rev
and make sure the stepper drivers are also set to half step ( 400 )





hope that helps
Last edit: 22 Oct 2015 03:45 by cncbasher.

Please Log in or Create an account to join the conversation.

More
22 Oct 2015 09:30 #64122 by Hypnotoad
Thanks for the quick response!

you dont mention what your using for a powersupply , this is usually 34 - 64 v depending on the stepper driver specs


It's a 48 V supply.

post your full config as an archive , is the easy way to get this resolved , give that the above is correct


Attached.

File Attachment:

File Name: G0704-3-axis.tar.gz
File Size:3 KB

also beware of the amp enable some breakout boards need the enable pin to work , once you have the motors moving correctly then and only then connect the stepper driver
-en pins to one pin on the breakout and link that to amp enable .


Yes, I caught that and wired the enable high for now.

I'll give it a shot with 400 steps per rev... I think I have it set to 200 steps per rev currently so I doubt there will be a difference. Let me know if you see anything fishy in my config.
Attachments:

Please Log in or Create an account to join the conversation.

More
22 Oct 2015 10:32 #64123 by Hypnotoad
Ok, I got the stepper to move. The driver has step pins labeled CP+ and CP-. Per the diagram provided I wired CP+ to ground and CP- to the X step output. Reversing these resulted in the motor moving. Doing the same for the DIR+/DIR- connections resolved the direction issue. Sweet! I don't understand why this was the other way on the diagram -- I think if I invert my 5v/GND and PU/PD settings on my board it would be equivalent, I may not have tried that combo.

I still need help understanding some configuration options. My motor driver has a microstep table selecting a whole bunch of microstep settings. The highest is 256 (there are power of two values and 5, 10, 20, .. 200 also). What do I want for this? My motor is 200 steps per rev. Also there are options in the stepper conf tool that say "motor steps per revolution" and "driver microstepping". What do I want for those?

Please Log in or Create an account to join the conversation.

More
22 Oct 2015 16:29 #64127 by cncbasher
so you have all the + connection to +5v yes ?
and all the - connections -cp -dr -en to approprate pins on the bob thats fine .

difficult for me to answer the question as i do not know what your connecting the motors too , in the way of belts or ballscrew or rod etc
as the turns per inch will determine that , but 400 steps will do fine for now , dont worry about microstepping for a mill or lathe you dont really need it , but that can be adjusted
once you have them all up and running

most of what you need is in the documentation of linuxcnc , once you have a machine to connect to etc
what mill is it you are converting ?

Please Log in or Create an account to join the conversation.

More
22 Oct 2015 17:11 #64128 by Rick G

Please Log in or Create an account to join the conversation.

More
23 Oct 2015 10:07 #64167 by Hypnotoad
Got it moving correctly. The drivers have an annoying feature in that the microsteps are set by some DIP switches but the polarity is inverted (switch in position "ON" = 0). So I had the microstepping set at 200 instead of 2. With that straightened out and my steps/rev set to 200 (1.8 deg steppers), microstepping set at 2, and the 5mm pitch of the ballscrews plugged in it seems to be moving the appropriate distance in the test dialog. Good times.

The mill is a Grizzly G0704 benchtop mill. Very happy with it, glad to see it dancing finally :).

Please Log in or Create an account to join the conversation.

More
29 Oct 2015 11:05 #64424 by Hypnotoad
Ok, started with my first program tonight. It's just a fake part I made up to do some testing. The first thing it does after some setup is go to Z0. This starts moving the head down past the material (I homed and touched off the material). I'm testing with a 2x4 and no cutter right now so no harm done, but I'm confused.

Here's the snippet of the gcode:
%
(1001)
(T1  D=0.5 CR=0. - ZMIN=-0.875 - FLAT END MILL)
N10 G90 G94 G17 G91.1
N15 G20
N20 G53 G0 Z0.

I generated this from Fusion 360. I've set the coordinate system origin in Fusion 360 to a top corner of the part and touched off that same corner.

I may be confused about things... my belief is that homing tells LinuxCNC that the machine is at its home location (as specified by the config) and touch off tells LinuxCNC the machine is at the origin of the part's program.

I've configured my Z axis to run from 0" to 11" with a home location of 11". So G0 Z0 taking it down makes sense.

Advice?

Please Log in or Create an account to join the conversation.

More
29 Oct 2015 12:27 - 29 Oct 2015 12:30 #64425 by Rick G
N20 G53 G0 Z0.
G53 tells the machine to use the G53 coordinate system (ignoring the touch off), That is the machine coordinates. in your case Z0 is the bottom of the Z travel.
If you touched off in G54 try changing the line to G54.

wiki.linuxcnc.org/cgi-bin/wiki.pl?CoordinateSystems
linuxcnc.org/docs/html/gcode/coordinates.html

Rick G
Last edit: 29 Oct 2015 12:30 by Rick G.

Please Log in or Create an account to join the conversation.

More
29 Oct 2015 23:12 #64462 by andypugh

N20 G53 G0 Z0.

Advice?


Set the Axis limits in the INI to 0 at the top and a negative number at the bottom.

CAM systems seem to assume that G53 Z0 will always take the machine to the the top of travel, and your machine is set up differently.

Please Log in or Create an account to join the conversation.

Time to create page: 0.144 seconds
Powered by Kunena Forum