Saturday, September 10, 2016

A Shop Project Milestone

My emphasis this week has been getting my shop computer running.  I've suspected the power supply as going bad in this computer for a long time.  Some time last winter or spring, I tried to turn it on to use my CNC Sherline and it didn't boot up.  The system died somewhere during the boot process.  To shorten the story, I found that by turning it off and on again, it would usually wake up properly and run without a hitch.  It was just the turn-on that didn't work, and only some of the time.  Some times, I'd have to turn it on four or five times to get it to work; other times it would turn on the first time I pushed the button.

A while back, I swapped the computer with another one we were using as a doorstop.  Since the hardware is virtually identical, I took the hard drive from the shop computer and stuck it in the doorstop.  The doorstop never had problems booting, but a couple of times it would just hangup and stop responding to any input.  This is bad if the mill is running, so I was planning to replace it, but have been lucky enough to never face that. 

As part of getting it running again, we turned it on Tuesday morning.  Power supply wouldn't start.  Just in case it was corrosion from sitting around unused, we pulled the power supply connectors and cleaned the connectors out with DeoxIt.  Turned it on after all the cleaning and it started right up.  Did we fix it or were we just lucky?  (One of the philosophical question technicians ask is "how do I know if I fixed an intermittent problem, or only made it more intermittent?")  Wednesday morning it wouldn't start and had to be power cycled again.  That afternoon, I ordered a replacement power supply from Amazon.  The new power supply got here Friday and I've turned the computer on four times without it messing up.  Meanwhile, while the PC was working Tuesday, I built a LiveCD of LinuxCNC and after playing with it a little while, installed Linux as its only operating system.  No dual boot, no Windoze (XP) partition.

Meanwhile, it was off to building up my CNC controller box.  Except not in a box, just laying everything out on the PC side panel on the workbench and wiring it up.  My motors are 570 in-oz steppers I got from Automation Technologies and those are driven by KL-6050 Stepper Motor Drivers from the same folks.  The interface from the computer is via parallel port, which I've been using for over 10 years with Mach3 on my Sherline.  Since LinxCNC is optimized for the parallel port, I'm staying with that.  The printer port can't just drive those motor drivers, and a company called CNC4PC sells what they call a C35 Breakout Board that takes the parallel port cable and maps its signals to outputs to the motor drivers.  All of the outputs from and inputs to the C35, other than that one DB25 parallel port, are on RJ45 connectors, so connecting the C35 to the motor driver inputs is as simple as plugging a short jumper where you want it to go.  Connecting the motors to the motor drivers' outputs is just a little harder.  Six wires have to be stripped 1/4" or so, pushed into a connector and a screw tightened - four wires for the stepper motor windings and two wires for the 48V.   In addition to this, all that's needed is a power supply for the motors, in my case a 48V 10A supply from a vendor on eBay.  Well, the C35 needs 5V at half an amp, so I dedicated an old wall wart to it.  It may be possible to come up with a simpler way to get that, passing 5V from the PC, but this will do for now.  First test of all three motors running a test file I had.  X Y Z from left to right. 

Confession:  I had some problems getting the C35 to respond, so since I had a "known good" system handy, I put the LinuxCNC machine aside and moved my Mach3 over here, with its Sherline configuration file.  Still wouldn't move.  It allowed me to find the paragraph in the datasheet for the board that said I needed to jumper a point on it to the 5V supply.  Once I did that. LEDs on the C35 board turned on and everything started to work.  I'll switch back to the Linux PC tomorrow. 

First motion is always a good milestone to pass. 

4 comments:

  1. That's just sooooo cool!

    Always good to see some actual, physical progress in a project.

    There were a couple of times I had to rebuild the Windows95 ( !! ) PC that ran the tracking antenna we used to downlink the payload telemetry. Not a CNC machine, but still a PC that did motion control.

    Always quite a kick when I loaded a flight profile into it and watched the antenna "track" the launch vehicle without doing anything like crashing into the limit stops, or just going off in the wrong direction at very high speed...

    ReplyDelete
  2. I'll be damned.
    You are one talented man sir.

    ReplyDelete
  3. Aw, shucks (kicks at dirt while looking down).

    ReplyDelete