Denford ORAC Lathe

Probably not one you'll see everyday -- I'm using OctoPrint to front-end a lathe retrofit with a Smoothieboard and a treadmill motor / controller.

Here's a test run of PSU Control's timout abilities.

More project details here:

http://www.wolfteck.com/2018/03/07/orac_power_control/

Still a long way to go.

2 Likes

:open_mouth: I certainly haven't seen OctoPrint controlling a lathe yet. Wow! :smile: Thank you for sharing this!

I may be biased (Actually, I definitely am biased) but I can think of other ways to control a lathe that might be better. Have you considered LinuxCNC at all?

As far as I can tell the Smoothieboard can't do spindle synchronized Z axis motion, so you won't be able to do thread cutting, which is rather the "killer app" of CNC lathes.

And once you can synch to the spindle, you can do fun things like this. (Which I think just squeezes into "show your stuff" but isn't in any way Octoprint related)

You are correct that the Smoothieboard does not currently support spindle synchronized motion, but that's something I'm actively working on. When I started this project, Smoothie's spindle control module didn't really work at all, but I've made headway on a few fronts:

My main challenge around spindle sync on my personal machine is that I'm currently using a single magnet on the spindle with a hall-effect sensor to pick up rotations and I'm having a hell of a time getting the speed stable. At best, it wanders +/- 5% or so, with substantially worse behavior at low speeds.

http://www.wolfteck.com/2018/03/03/orac_spindle_control/

I'm eventually going to try switching over to an optical sensor on a big shutter wheel and having the Smoothie divide the signal to feed back to the tach input on the MC2100 (in addition to managing the PID side of the house), but I've been more interested in the UX side of things the last couple weeks.

If that doesn't work, I'll probably wind up biting the bullet and going back to AC with a VFD where the speed you ask for is the speed you get, full stop.

For synchronized motion in the mean-time, I've cobbled a NEMA34 stepper inside the headstock, so with a belt swap, I have reasonably precise, albeit relatively low torque spindle synced motion control.

As for LinuxCNC, I checked it out, yes. If I was running a pro shop, that's probably the direction I would go. That said, I have a different set of goals for this project. My main goal is for civilians (as opposed to machinists or *nix aficionados) who visit my garage to come away thinking "I could do that" as opposed to "damn, that's complicated".

Personally, I see LinuxCNC the same way I see dorking with kernel modules or designing parts in OpenSCAD -- fun for me to play with because I'm a giant dork who spends way too much time at a computer, but overwhelming for people who are focused outside of this niche.

This is actually what drew me to OctoPrint in the first place. It's incredibly powerful if you really dig into it, but more importantly for my goals, it's approachable. The UX is clean and simple and folks who don't know anything about printing / machining seem to just "get it" very quickly.

That said, if you have any resources showing the user-friendly / gentle learning curve side of LinuxCNC, being closer to the project, I'd love to see them.

We are drifting badly off-topic here.
But setting up a LinuxCNC machine should be as simple as installing the OS and software from the LiveCD then running the Stepconf Wizard to configure the system.
That does rather assume that you are using step/dir stepper drivers and interfacing via the parallel port, though.
(And there are all sorts of reasons to do neither of those things)

Oh, don't worry about it. The topic here is basically "Using OctoPrint to control a CNC Lathe", and y'all are talking about the challenges of that plus possibly better alternatives - fair game IMHO.

One of the things I hadn't actively put together, but that I really do like about OctoPrint (and OctoPi specifically) is that it's dragging the machining world kicking and screaming into the modern age. It blows my mind that parallel ports are still the defacto connection for subtractive machines.

I'll play around a little more with LinuxCNC, because I would like to have a balanced opinion, which I do not have today.

Bringing things back around to OctoPrint specifically, here's a sneak preview of another related project I'm working on:

As I hinted, I don't particularly favour the parallel port. However LinuxCNC runs the motion-controller on the PC hardware, and so needs a realtime interface to the interface hardware. (Smoothstepper and similar devices offload all the motion control to the external hardware, which works well but introduces some limitations).
LinuxCNC supports a number of hardware interfaces (Ethernet, PCI, Parallel port as a data bus, parallel port as individual IO lines). It can't use USB, because USB is not realtime (occasional mS-level delays are a big problem when the servo loop runs every mS).
So, that leaves us with the parallel port as the cheap but limited option and specialist hardware from Mesa, Pico, General Mechatronics, Motenc etc etc when running on a PC. If running on the Raspberry Pi there is an SPI driver for one of the Mesa cards.

I'm very late to the party here, but I'm a MachineKit fan, personally. It's a LinuxCNC fork that runs on multiple platforms, including the BeagleBone Black, which allows it to have all the RT stuff you really need to do CNC properly. Because the SBC chip has 2 MCU cores on it in addition to the dual core ARM primary CPU, it offloads some RT stuff to those, uses an RT linux kernel, and it also allows for the UI to be hosted remotely (which could be a BBB or an RPi or a mobile, tablet, or computer).

It's definitely more in the "I can do that" vein for the layperson and, while it IS compatible with a parallel port cape, most of the capes remove that anachronism :smiley: I haven't done a setup for my lathe, yet...it's still manual, but I will be CNCing it eventually. I originally got into MachineKit when I decided to CNC my mill.

Quick update here, several months later. I'm very happy with the OctoPrint / Smoothie powered lathe. Spindle control turned out to be pretty easy by just treating it as another axis. Here's a quick video of turning down a spiral for some Christmas ornaments I'm working on:

http://www.wolfteck.com/assets/spiral_20181204234412.mpg

I also had some fun baking logos into the printed front panel doors:

I've been mostly coding up gcode by hand, but now that I have the machine basically working, next step is making the OctoPrint-Lathe plugin do more than just draw pretty paths on the screen.

So jealous of your workspace. I used to have a garage-that-I-couldn't-park-my-car-in. :sigh:

Anyway, it's a great-looking project. To this, I'd add:

  • I'd upgrade the size of the TFT; the bigger, the better. You can't afford to have a mis-click on any of the control buttons and it's a small price to pay for the added safety.
  • I think I'd run some vacuum tubing over there and control the motor with the standard fan-related commands.
  • I'd probably rig up a plexiglass face shield up in the zone.
  • I'd consider moving the big red switch to be within arm's reach of the operator so that if their clothing is caught in the machine they can still comfortably reach it. A centrally-located position could work for either left or right hands so that you wouldn't have to play a game of Twister to shut the thing down in half the scenarios.

Re space, it's all about choices. My wife and I wanted to have the space for our hobbies at the house and therefor to be affordable our commutes are over an hour one-way. At some point, we're hoping to retire back to the midwest where we can have some space w/o having to work two full-time jobs to support it.

(So, ctrl enter posts...good to know.)

Re the project more directly:

  • The display you see is just a 4x7-segment for the main spindle tachometer. I'm debating adding a second one for the live tool. I mostly control the machine from a real computer not overly close to the machine. I was originally planning on having one of the RasPi official touchscreens mounted on the RasPi door, but I have that setup on my Kossel and basically never use it. Right now, I don't think adding a touch display to the lathe makes much sense for the mis-clicking and similar reasons you point out.
  • The live tool motor wiring is currently a major problem, yes. It'll eventually go inside some Faraday shielding, inside plastic conduit, and get routed under the bed and hopefully fit inside the big conduit that already has the cross-slide stepper and lamp wiring.
  • I've been pondering the plexi shield today, actually. This model of machine originally came with an awesomely ugly translucent green shield, but I haven't been able to find one anywhere. Looking at pictures online, I think I can print up some corner brackets to recreate it with regular flat plexi without having to do precision bends.
  • I have all kinds of thoughts about the big red button. I want kill buttons everywhere and want them as close to the power input as possible, but don't want to run high power lines all over the place. The main thing that makes me care less is that I'm generally operating the machine from across the room and the big red button is in series with a relay controlled by OctoPrint's PSU control, so I normally just kill the machine in software anyway.

Oh yeah -- spindle motor control: Right now, it's pretty janky. The controller is plugged into the same logic toggle relay as the main 24V supply for the Smoothie / steppers. When the physical switch and PSU Control are both on, three things happen:

  • The 24V lines light up so the steppers have drive power
  • The live tool motor controller gets powered up and starts the spindle if it's so-configured
  • The LEDs inside the lower case turn off (so I have a visual reminder when it's not/safe to go fishing around inside the cabinet)

The controller has a logic-level on/off input (currently jumpered on all the time) as well as a 0-10V desired speed input that can be used instead of the physical pot. Endgame on the tool spindle control is using Smoothie's PWM abilities, a DAC, and a hall tach to do closed loop control same as the main spindle.

As for OctoPrint's fan switch, that turns the top lamp on and off =)

I used to love working with wood and I had enough money to buy the tools I needed as combined with a beat up Ford Ranger for those trips to Home Depot. Just don't forget to occasionally work on wood (instead of the rig itself). ha

First project using the plugin -- some earrings for my wife. I need to work on my finishing technique, but the lathe did exactly what it was supposed to do.



1 Like

Gcode view/send modal:

The machine is setup to use Y for the main spindle instead of A which would be more technically correct so I can use the same toolchain I use for the mill to do more complex CAD projects instead of relying on lathe-specific software.

1 Like

I'm not quite following the gcode. It looks like it plays both feature 2 and then 1. How does that work on the same stock?

Ah -- I see without context my pictures are a bit misleading. The "Features" are not the completed objects, they are the elements that make them up. In the first picture (the pointy object), Feature-0 is the untouched stock (to set the offset from the chuck), Feature-1 is the long main body that is highlighted in red, and Feature-2 is the pointed tip. In the droplet/egg shaped object, Feature-0 is the untouched stock, Feature-1 is the bowl-looking base of the "egg" and Feature-2 is the rocket-cone-looking top of the "egg".

The pictured gcode is for the pointy one, IIRC

1 Like