February 27

DIY CNC Part 8: LinuxCNC StepConf

LinuxCNC-A

In this part of the build, it is time to setup LinuxCNC.  With the computer insanity complete, I moved onto setting up LinuxCNC.  Setting up LinuxCNC is pretty straightforward and launching the StepConf Wizard you will be greeted with the following screen.  The StepConfWizard can be found under the CNC applications group.

StepConf Wizard in LinuxCNC

StepConf Wizard in LinuxCNC

Next, create a new configuration.  Later if you wanted to change the configuration of the machine you would return to the StepConf and select “Modify a configuration already created with this program”  Having the bottom checkboxes clicked will create the icon to launch LinuxCNC from the desktop when the configuration is completed.

LinuxCNC StepConf

LinuxCNC StepConf

Moving forward through the process brings you to the basic machine information.  Here you would enter the parallel port settings and base period jitter. Clicking “Text Base Period Jitter” will run a latency test.  Allowing the latency test to run for about 5 minutes will provide the value needed to enter into the Base Period Maximum Jitter box.  While the latency test was running, I ran several different tasks like browsing the internet, opening and closing programs, and opened and closed photos, ran video, etc.    The idea is to put the computer through its paces while the latency test checks to see what the worst case numbers are.

LinuxCNC Basic Machine Information

LinuxCNC Basic Machine Information

With the latency test complete and the Base Period Maximum Jitter number obtained (10024), I entered this number into its respective box.  Using a PCI card for my parallel port, I entered the address of the port into the Parallel Port Settings.  In order for me to know what the parport address was, I opened up a terminal window and ran at the command line  lspci -v.  The result of that command listed all my devices and I was able to obtain the parport address which was DD00 thru DD07.  I then entered the address into the First Parport Base Address and ended up leaving the “0x” in front of the “DD00″ and moved onto the X axis setup to jog the X axis and test the parport address.  I was fortunate the first parport address of DD00 worked.  If it didn’t work, I would have come back to this screen and enter DD01, try it again, DD02, try it again, DD03, etc., and repeat the process up thru DD07 until I got the machine to start moving.    If it didn’t move after the DD07 address was given, then I would have checked the wiring on the parallel port cable and/or check to make sure the PCI card was seated properly in the slot in the computer.

SCparport

With the parport address set up, the next screen will take you through the steps of configuring the parallel port.  A couple of things to mention about this step is once the StepConf is complete, and you run the mill for the first time, you will have to check your axis for the correct travel direction.  For instance my X axis was reversed so I had to come back to StepConf and check the “invert” box under pin 3 so the direction of travel on the table matched.  Also, if you are using limit switches and they are wired in on the parallel cable you would have to select the appropriate pin and if necessary the invert button.  Although I have the limit switches and they are wired up to pin 11, pin 12, and pin 13, but not installed, I left these pins as “unused.”

LinuxCNC Parallel Port Setup

LinuxCNC Parallel Port Setup

Moving onto the next screen, here you would configure the X axis of the machine.  Under the leadscrew pitch, because I used 1/4 20 threaded rod, I entered 20 rev/inch.  This basically means there are 20 threads per inch, or it would take 20 revolutions of the rod to move one inch.  I also changed the Table Travel to the size of the workable area of my table.    

LinuxCNC X axis configuration

LinuxCNC X axis configuration

At this point, if your wiring is correct and you have the correct parport address entered in the Parallel Port Setup mentioned in an earlier step, you should be able to test the table travel.  I ran the “Test this axis” and was able to obtain the travel of the x axis which basically was 0 to 18 inches.  I used the Jog function to test the axis in both directions.    I noticed if you use the “Run” feature it will jog in both directions automatically.  For instance, I set the Test Area to 6 inches, and it would travel one direction 6 inches, then the opposite direction 12 inches, then back to the original 6 inch mark, technically another 12 inches.  It did not travel only 3 inches in one direction then 3 inches in the opposite direction, but 6 inches in one direction, then 12 in the opposite, then back to the original 6 inch mark.  I certainly had the hand on the emergency shutoff during this process so I wouldn’t run out the axis and strip out the stepper motor to threaded rod coupler.  I guess installing the limit switches would have taken care of that situation if it occurred.  It was easier for me to just jog the x axis almost to it’s limits and measure the travel with a tape measure.

SCxaxistest

Once the X axis setup is complete, it was time to do the Y axis following the same procedure as mentioned in the previous step.

LinuxCNC Y axis configuration

LinuxCNC Y axis configuration

Then the Z axis.  Note the Z axis travel will have a negative value as it travels away from the table.  Testing the axis gave me the correct value to enter into the Z axis travel.

LinuxCNC Z axis configuration

LinuxCNC Z axis configuration

Once your done with the Z axis that should do the trick and the configuration is complete.  Clicking apply will create the file and a desktop icon to launch LinuxCNC.

LinuxCNC StepConf complete

LinuxCNC StepConf complete

Clicking the desktop icon launches LinuxCNC.

LinuxCNC

LinuxCNC

Until next time,

Happy Building!

 

 

Like it? Share it!Share on FacebookTweet about this on TwitterShare on Google+Pin on PinterestShare on LinkedInShare on StumbleUponShare on TumblrShare on RedditEmail this to someone
Category: DIY, DIY CNC
February 3

DIY CNC Part 7: The Computer Insanity

LinuxCNC-A

Up to this point everything has been going relatively smooth and building the machine has given me a good understanding of how it is suppose to work, what works, and what doesn’t work.  The computer part of the equation is no different.  I thought this would be the easiest part, however, it was the most frustrating part of the build and a test of patience.  After four days of trying to get the software installed on the computer, I was at the point where I thought it would end up at the bottom of my pool.

destroyMost of the computers I have laying around have Linux already installed and so I decided my choice of machine software to drive the CNC machine would be LinuxCNC.  LinuxCNC is a free program and like most linux software, I thought nothing could be easier for me.  After all, Linux is freedom right?

Linux

I spent the day finding a computer with a parallel port and the system requirements to run LinuxCNC.  LinuxCNC runs on Ubuntu OS and again I thought no problem, download the ISO, burn it to disk, pop it in the drive and install the new OS.  After spending the day trying to install Ubuntu on a machine which already had Fedora 8 on it, I could not get Ubuntu to install properly.  This really wasn’t a big deal as I have had to troubleshoot some hardware issues in the past to get Linux to run properly on one of my old computers.  I really didn’t want Windows but I was out of options.  With Linux, once it is installed it just works.  With Windows, once it is installed it appears to work.  The drawback of Windows is I would have to track down device drivers and spend hours getting updates and security patches, reboots, service packs, and the list goes on.  With Linux, once it’s installed, it works, and I know I just said that.  I installed Windows XP and spent hours updating the system with 135 “high-priority updates.”

Windows-XPWith a fresh install of Windows XP on the CNC computer, I needed a parallel port to drive the CNC machine software.  I found a PCI card over at Frys which would provide me with a Parallel port so I could hook the computer up to the stepper drivers.  Although I wasn’t too excited to spend $40.00 bucks on the card, and not know if it would work with Windows XP, I took my chances.  I popped out the landline PCI card and installed the new parallel card in it’s place.  I loaded up the device drivers and crossed my fingers.

PCIcardincomputer

With the parallel port installed, I downloaded a copy of KCam which would run on the XP platform.  I immediately encountered a problem with KCam and Windows.  The port address of the card could not be changed in KCam.  I tried forcing the change but was unsuccessful.  Because the computer did not have a parallel port, there was nothing in the BIOS I could change.  After repeated attempts, I decided to install Linux Ubuntu on a different partition and run it side by side with Windows XP.  After days of research it would appear I still would need to run windows for creating the G-code to run LinuxCNC.  So I installed Ubuntu along side Windows XP.

ubuntu_largeThe install of Ubuntu went well and I had no errors during the software installation.  During the previous attempts of running Ubuntu the computer monitor would keep going into sleep mode and all I would get is a black screen once it was done booting.  Several attempts were made to try and get Linux to work and finally editing the grub file and adding “nomodeset” to the boot sequence was the trick.  The computer monitor did not get stuck in sleep mode and I was able to get to the splash screen on Ubuntu.  I did notice if I used the Nvidia drivers in Ubuntu, I would have problems with the Dell monitor going to sleep.  Once I removed the drivers and allow Linux drivers to do their thing, I had no problems with running the OS and eventually installing LinuxCNC.

It was insanity.  With Ubuntu installed and LinuxCNC installed there was not an issue with the computer talking to the CNC machine.  I was able to write in the correct port address for the parallel card I was using and was able to do a few test runs of the home built CNC machine.

LinuxCNC-A

 

On the next post, I will go over the settings I used for my CNC during the configuration of LinuxCNC.

Until then,

Happy Building!

 

Like it? Share it!Share on FacebookTweet about this on TwitterShare on Google+Pin on PinterestShare on LinkedInShare on StumbleUponShare on TumblrShare on RedditEmail this to someone
Category: CNC, DIY
January 29

DIY CNC Part 6: Wiring the Power Supply

driverboards1

In this part of the build I used a computer power supply to provide the necessary power to the stepper motor drivers and motors.  Finding a computer power supply wasn’t a hard task as I had three old computers in the attic.  I removed a power supply from one of the computers and made a few modifications to the power supply so I could use it to provide power to the stepper motors and drive the stepper motor driver modules.

tangouniformGenerally, an ATX power supply is usually turned on and off by the computer, but for my operation I need the power on and off when I flick on the power strip.  To achieve this, a minor modification is required to the main group of wires.  To make the power supply useful in this application, I took the green wire and connected to a black wire.  It isn’t like defusing a bomb but it is easy as eating pie.  This mod and I have done several times to use the power supply for powering up my lipo battery chargers.

powersupply1Once the power supply was modified I took all the yellow, red, and black wires out of the wire bundle and hooked them up to the stepper motor driver boards.  The boards will provide the signal pulses to the stepper motors.  From the power supply, I used some twisted pair I had to make the connections to the parallel port.  Twisted pair is generally used for telephone/data so it should do just fine for this application.

driverboards1

On the other end of the twisted pair was a 25 pin connecter which will plug into the parallel port of the computer.  The pin out was wired according to the build plans.

parallelconnector

With all the wiring just about done it was time to figure out the computer part of the equation.  Although having to purchase a PCI card was not in the game plan, I had no choice but to purchase the card or this project would be dead in the water.  The computer I chose to use for this build did not have a parallel port so it was a necessity. Most computers today have USB ports and it can be challenging to find a computer with a parallel port.   Parallel ports are old school, but I managed to find a compatible card at Frys.

PCIcardWith the card installed, I completed the final assembly of the CNC machine by installing the anti-backlash mechanisms on all three axis.  The anti-backlash provides the driving mechanism for the stepper motors to transport the carriages.

antibacklashinstall

Anti-backlash installed on all three axis.

With the table built, wired, and a computer ready for the CNC machining software it was time to bring it inside and begin the computer adventure.  In the next post, I will go over the software I chose to use on this build.

Until then,

Happy Building!

 

 

Like it? Share it!Share on FacebookTweet about this on TwitterShare on Google+Pin on PinterestShare on LinkedInShare on StumbleUponShare on TumblrShare on RedditEmail this to someone
Category: CNC, DIY