Direct Phase-Driving of Stepper Machines?

More
28 Jan 2014 11:00 - 28 Jan 2014 11:01 #43260 by unicornswag
Hey guys, new to the forum! So a little background to my situation:

I recently built a small cnc machine (currently 2 axis) from hardware store parts and a few old 5 1/4" floppy drive unipolar steppers. As I am 17 y/o and a little strapped for cash, I opted not to buy sophisticated stepper drivers, but rather use simple Darlington transistors (ULN2003) to amplify my i/o signals to the required 12 volts. This setup is very cost effective, however, this complicates matters as the transistors require direct phase signals, not step and direction pulses.

Since I am a long-time linux user, LinuxCNC seemed the natural choice when choosing my control software. I actually went with a version of Puppy Linux that has an older version of Emc2 installed, as my 13 y/o laptop isn't exactly up to par for the ubuntu version. However, I was disappointed to find that stepconf's support for phase-stepping is quite difficult to make sense of. For the last few weeks, I have been dabbling with TurboCNC running in FreeDos. TurboCNC does have a wonderfully simple interface for configuring custom phase-driven systems, however as a linux user, using DOS is like pulling teeth (not to mention the lack of usb support). So here I am, back to LinuxCNC.

So my question is, how would I go about convincing emc2 to produce the direct phase signals that I need? I tried simply modifying the "core_stepper.hal" and changing step type from 0 to 5. But then when I tried to load a machine config, it complained about not being able to use my core stepper file. So where do I begin? I'm a total noob when it comes to the software side of CNC, so any help would be greatly appreciated!
Last edit: 28 Jan 2014 11:01 by unicornswag.

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

More
28 Jan 2014 16:05 #43264 by cmorley
Stepconf doesn't support phase stepping at all.

But it may be a good base to start from.
build a config with stepconf.
after look in the HAL file and change the step gen to what ever type you wish eg type 5:

eg:
loadrt stepgen step_type=0,0,0
to
loadrt stepgen step_type=5,5,5

then look for the HAL pins like:

net ystep => parport.0.pin-04-out
net ydir => parport.0.pin-05-out

net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir

since your not using step and direction you need to change them to (for type 5):

net y-phase-a <= stepgen.1.phase-A
net y-phase-b <= stepgen.1.phase-B
net y-phase-c <= stepgen.1.phase-C
net y-phase-c <= stepgen.1.phase-D

and the same for the parport pin names

net y-phase-a => parport.0.pin-04-out
net y-phase-b => parport.0.pin-05-out
etc

This is how you connect the stepgen phases to the parport output pin.

and the same for all the other axes

Surely I have missed some details.
run the config and if it errors and you can't figure it out, post the error somewhere and point to it from here.
Then we might have a chance to figure out what the problem is.

Chris M

reference:
www.linuxcnc.org/docs/2.5/html/hal/rtcomps.html#sec:Stepgen
www.linuxcnc.org/docs/2.5/html/hal/parallel_port.html
The following user(s) said Thank You: unicornswag

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

More
28 Jan 2014 17:08 #43265 by ArcEye
Hi

Additionally, I suspect that if you have a file called 'core_stepper.hal', that you are trying to modify a simulator config, which is not going to work on many levels.

You need to create a config as Chris details, or at least pick a suitable sample real world config and modify that based upon his information

The version of linuxcnc (emc2) you have with puppy linux is liable to be ancient.

If at all possible, use the Ubuntu 8.04 based version and it will be upgradable to the latest version of Linuxcnc.
You can strip out all the gnome rubbish and install a light display manager and window manager, which will work far better.

Then we will all be talking about the same things, if you use emc 2.2 or similar, that will not be the case and there is scope for some misunderstanding.

regards

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

More
29 Jan 2014 09:26 #43284 by cmorley
Good catch on the puppy version - I missed that.

If you wish to use that version anyways, then just make sure you reference the right documentation.
www.linuxcnc.org/docs/

I can't remember the version puppy used - though I have it somewhere...

Chris M

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

More
29 Jan 2014 11:02 #43286 by unicornswag
Thanks for the link to those older manuals Cmorley! Been looking all over for those :)

I would prefer to continue using the Puppy setup with (I believe) version 2.0.x. I really love the "unbreakability" of a light system running completely in RAM, and it really surprises me how little effort has been put toward further lightweight versions of LinuxCNC. I guess the only way I'd even consider using the Ubuntu version is if I could succesfully remove any GUI, running LinuxCNC completely headless. As a long-time Debian fan, I'd ather go back to DOS than use Ubuntu! Well, maybe not quite :)

Looks like I've got some reading to do now that I've got the proper manuals. However, there's a good chance I'll need to come back here for further assistance with this setup. Thanks guys!

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

Time to create page: 0.270 seconds
Powered by Kunena Forum