Close
0%
0%

Shoptask 1720 LinuxCNC

Finally automating my 1998 Lathe/Mill/Drill which was built for CNC

Public Chat
Similar projects worth following
The plan here is to set up CNC capability on this machine. As purchased it came with mounting points for stepper motors and the belts and pulleys but none of the rest of the CNC hardware. Due to budget and other priorities this never got done. Now is the time.

The general plan is to use the following main components to complete the job:

* LinuxCNC software
* 3 X 4.8N/m (680oz/in) stepper motors (stepperonline)
* 3 X 60V power supplies (stepperonline)
* 3 X DM860I drivers (stepperonline)
* Mesa 7i76E + Mesa 7i85 controller boards
* Raspberry Pi 400
* Position feedback from the existing DRO glass scales - I am hoping to avoid the need for ball screws.
* maintain configuration in github source control, using different branches when switching between mill and lathe mode.


The current state of the project is:

  • Main components built into the PC case and wired up. Case installed beside toolbench on some redwood decking offcuts.
  • Software and motor function verified
  • Pulleys bored out to 16mm, motors installed
  • 13" 1080P monitor acquired and installed with RPi on swivel arm.
  • HAL configuration done and PID values nudged to where I'm happy with them
  • HAL configured for encoder feedback. This seems to work really well.
  • spindle encoders for RPM feedback - just pulse encoders for now. Adequate for slow threading.

Next steps:

  • Play with it and make things

Future stuff:

  • limit switches. I'm actually not sure I need them on the lathe. I'll crash into the chuck, the tailstock or the work before I hit the machine limits, and home is dependent on where the toolpost gets bolted down. Repeatable homing would be a help though, as LinuxCNC occasionally crashes.
  • pendant
  • quadrature encoder on lathe

  • Milling a Gear

    Alastair Young12/07/2021 at 15:24 0 comments

    This was the second attempt. The first one was gnarly due to too high DoC and loose gibs, table off square and a loose X drive train.

  • Milling Videos

    Alastair Young11/20/2021 at 21:42 0 comments

    Some peck drilling in 1080, and keyway cutting in W1 tool steel. This is all handwritten g-code. I find for these kind of operations it's easier to tune this to the machine than working through the Fusion360 CAM.

    The keyway cutting video quality is crappy due to the free editing software I used. Learning....

  • Bearing Boring

    Alastair Young11/09/2021 at 08:16 0 comments

    This is my first real use of the CNC to make something. This is a project I am doing to make a penny squashing machine. Because the forces involved are huge, the frames are in 1/2" 1018. The plates were all squared identical on the mill and the center drills for the holes also marked out on the mill. I used these to indicate in the part in the 4 jaw chuck using a 2MT dead center on 3MT-2MT extension in the 3MT-3MT extension mounted in the tail stock. Parallels behind the part to make it flat, removed after indicating. The dial indicator resting on the extension at the nearest ground location.

    Then I drilled out most of the material for the bearing holes. I bored it bit by bit the first time and hand crafted the g-code as I went, wrapping the already-run code in 

    O100 WHILE [0]

    O100 ENDWHILE

    until I got the feeds and speeds and chamfers right.

    Then it was pretty quick to iterate through the other five, though I always stopped to check the bore diameter before running the final pass.

    The bearing bores are for 3/4" drill rod.

    Things learned:

    • Side milling the ends of the plates with the 3/4" 4 flute mill came out very un-square across the thickness. Tramming? Flex? I was able to end mill them square and there is enough clearance at the ends that having them a bit shorter (but all the same) is ok. 
    • The 6" 4-jaw is a little too big and the 8" faceplate it is mounted to is much too big.
    • I really want to see if I can move the table linear scale to the other side - away from the chuck. I think it make be possible by rotating the the thing it spins on. I can't just bolt it on the other side as the gib is there.
    • The table had gotten out of square, so I should re-check it every time I square the vise.
    • More splash control/chip guards still needed. And a holey rubber mat. I'm getting yelled at for tracking chips into the house.

    The gear in the picture is cut from McMaster gear stock. 

  • Spindle Encoders, PID and Threading

    Alastair Young10/13/2021 at 00:48 0 comments

    I had an interesting time getting the spindle speed feedback to work with the feed-per-revolution and G76 threading. 

    The position interpolation in the HAL encoder component for the single pulse encoder is not available in the Mesa encoder component. 

    So the encoder itself is wired into the A channel on the Mesa encoder - not the index. I intend to move it to the index when I get the quadrature encoder installed. The input A signal on the mesa encoder is fed to a HAL encoder on the A and Z channels. I can then take position interpolation for threading from there. However as the Mesa is only read at servo-thread speed, this will probably not work at higher rpms, unless I install a wider magnet on the pulley to make the index pulse wider. So for now I am threading at the minimum speed which is 165RPM. The pulley table says 120, but it lies.

    I made myself a little function to simplify cutting UN threads - it takes the thread length and TPI and figures out the rest.

    Initially the first threads in each pass were too wide - I could see the X handwheel still turning for the first 5 revs or so. Giving it a "run up" was a workaround but clearly my PID was not taking up the backlash quickly enough - X currently has 0.011 backlash possibly due to the earlier toll crash loosening the acme nut. 

    So I spent a couple of evenings playing with that. 

    This youtube playlist was helpful https://www.youtube.com/playlist?list=PLPgfyZozUfKrY_qa1ZNW0ldwaJJl6c5Qm

    I eventually found the following:

    • More P is good. Until it isn't.
    • Too much accel is a bad thing
    • I and D suck. Avoid.
    • FF1 is magical, but a little goes a long way.

    Watch the github repo for the numbers I settle on.

  • Wire Management and Coolant

    Alastair Young10/02/2021 at 21:22 0 comments

    Some pictures of the wire management and mist coolant installation. The chip tray has been trimmed with Flex Tape to prevent drips.

  • Wiring Updates

    Alastair Young09/29/2021 at 05:18 0 comments

    The first cuts showed that I really, really needed an integrated STOP. The spindle switches are now awkward to reach behind the monitor, and don't stop the steppers, and the stop in LinuxCNC doesn't stop the spindle. Not safe.

    So I have added a contactor, a three button start/stop/estop box and a couple of relays wired thus:

    The relays are in the control cabinet, and the contactor is in the Shoptask panel along with a terminal block to wire it together. The operating theory is based on the use of the manual buttons which are wired with 110V along with the contactor coil and the auxiliary contacts on the contactor. In this mode a momentary push of the START button energizes the contactor which then latches on. A momentary push of the STOP button breaks the circuit and the contactor unlatches. Likewise with Estop. The two relays mimic the STOP and STOP buttons, the STOPR being in series and the STARTR in parallel. A second switch in the estop goes back to the mesa card and runs at 24V field power. HAL is set to set to energize the relays momentarily when the spindle enables and disables, and will also energize the STOPR relay when the machine is disabled. In this way the estop in LinuxCNC disables the spindle, and the manual estop triggers the LinuxCNC estop. When the machine is enabled but the spindle is disabled, the manual buttons can still start/stop the spindle (without LinuxCNC knowing), likewise when the controller is plugged in but powered down (or LinuxCNC not running). For times when the controller is unplugged I have a DIN socket mounted on the Shoptask cabinet to plug the loose cable in with two pins wired together to simulate the close STOPR relay. Manual use of the machine is thus maintained. The output from the contactor goes to the existing spindle buttons to select spindle and direction.

    The HAL code for this is here.

    On the Pi power side, I used some more of the 18G 4 core cable to run the 5V up to the Pi and monitor, including an inline switch for Pi bootup. Initially I just used two wires keeping the other two as a spare, but found I was dropping over 0.4V which was bringing up a low voltage warning on the Pi. So now the monitor has its own pair and the drop is only 0.2V, and I have tweaked the power supply up to 5.2V. The Mesa card spec says it is good to 5.5V so no worries there.

    A weird issue with Pi power and cheap USB hubs prevented the Pi from booting, but I swapped out the hub with a different one to solve that.

    Low voltage communications are now handled with DB15 breakout. So far this has the estop and spindle pulse encoders running through it. It is wired ready for the lathe quadrature encoder and coolant solenoid. Much fun was had having my new CNC mill make a DB15 hole in the plastic box.

  • Pawn Army and Tool Setting

    Alastair Young08/26/2021 at 04:04 0 comments

    This is the pawn from the Fusion360 CAM samples, scaled 55% to fit in the 1" stock that I have. All cut with the 2mm cutoff tool.


    From left to right:

    0: The first attempt I had the cutoff tool programmed as 4mm width. Start again.

    1: Delrin. 2mm stepover and 1200RPM. Looks pretty good.

    1.9: Not shown. Aluminum same settings. Horrible screaming chatter. Then I typed G0X0 instead of G53G0X and crashed the tool into the work....

    2.0 Aluminum. 540RPM. 1mm stepover. Looks pretty good. But fat. Clearly the tool moved when I crashed it. Duh. Thers a clear step in the sphere - I think because the cutoff tool end was angled not square.

    3 Aluminum. Reset the tool library. Also ground the end of the tool square - it previously had a slight angle on the end for clean manual cutoffs. The end ball actually looks spherical. Happy.

    I also worked out my process for tool setting.

    1. Mount the Fowler electronic edge finder in the chuck - gently so as not to squish it.
    2. Offer up the tool to the edge finder radius and jog till the light it at on/off flicker threshold.
    3. Jog Z+ off the end
    4. Jog X-0.1
    5. Jog Z- till we find the flicker.
    6. Touch off 0:0

    I should be able to use this whenever I switch from mill to lathe mode too after clamping down the toolpost. (except for the 4-jaw chuck)

  • Display and Pi mount

    Alastair Young08/26/2021 at 03:44 0 comments

    I liberated part of an arm from a dual monitor mount I had lying around. As I had dismounted the DRO I had to manually machine the mount the old fashioned way.

    Power supply mounting for the Pi and screen is still up in the air (dangling wall-warts) as it turns out that USB-C power connections are complicated and powering from the chunky 5V supply in the control box is not going to fly.

    The backboard is a piece of 16" melamine shelving which give the whole thing enough weight for the support arm adjustment to come into range and the Pi tray is the last part of an old datacenter keyboard tray I've been gradually scavenging from. The monitor is mounted with industrial strength Velcro. 3/4" x 1/8" steel strap and #8/32 screws holds it together.

  • First metal cut on lathe

    Alastair Young08/23/2021 at 16:56 0 comments

    This is just a ball-end modelled in Fusion 360. It took a lot of fiddling and figuring to get the workflow working.

  • First Cut

    Alastair Young08/19/2021 at 15:56 0 comments

    It took a while to work out the encoder feedback and pid settings, but I think I am close. This is a G2 circle in pine with a blunt 3/8" end mill.

    Code not checked in yet.

    Now working on mount for display and RPI

View all 11 project logs

Enjoy this project?

Share

Discussions

Alastair Young wrote 09/29/2021 at 16:22 point

I went back and looked at my config and history. It looks like I just started with the minimal base 32-bit Raspbian image then added the X package and then followed the steps in the LinuxCNC install instruction (added the current RT kernel package and LinuxCNC). The only config tweak is to limit the memory to 3GB - there is some bug that breaks the USB above that as I recall. I don't get the onboard Wi-Fi or the power button, but I've addressed that with external components. I do get occasional servo loop RT warnings, which seem to mostly happen when pushing buttons in the UI. As I have encoder feedback and the mesa card is tracking the encoders, I'm not fretting about that too much.

I do have it set up dual-boot with a vanilla Raspbian so I can fix what I break on the LinuxCNC image.

There is a thread out there now about 64 bit kernel for Pi that looks very promising. I'll probably circle back an try that out at some point. At the moment the Pi side of things is working good enough and I'm focusing on things like estop, spindle encoders and coolant setup. And maybe actually making things.

  Are you sure? yes | no

Alastair Young wrote 09/15/2021 at 16:46 point

I'll have to go back and look at what I did. I'll write the details up in a project log. Rough outline: I set it up dual-boot so I could always boot if I screwed up the LinuxCNC image, then built it up from a base minimal RPI image and followed the steps at the linuxcnc site. Oddities I remember off the top of my head: memory - it doesn't like all the RAM so some of that needs to be disabled. Also no driver for the on-board WiFi - I have an external CanaKit dongle. 

  Are you sure? yes | no

Charles Cordiez wrote 09/07/2021 at 14:15 point

I am currently setting up a PI 400 with a 7i96 but linuxcnc is giving me a lot of trouble. What image did you use ? 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates