N7JTI Duet3 CNC Build

  • I'm putting together a CNC machine based on a Duet3 and Raspberry Pi 4 for the controller and an Avid CNC Benchtop 2'x3' for the mechanical parts.

    I've got all the bits together to finish the control box, which I'm going to do this week. The mechanical parts come in two weeks. I don't know if there is any interest, but I'm going to sort of post about my progress on this thread as I go.

    I've completed the high-voltage side of the control box. I have two power supplies providing 3 different power rails. The large supply provides 24v at 600watts for the steppers. And the second smaller supply provides 12v for the endstop sensors and a 5v rail at 4a to power the rpi and the Duet3. Both are Meanwell power supplies. I've got the High Voltage on the right, and the low voltage on the left. I've done the first smoke test and I've got good 5v and 12v rails so next I will build the cables to power the external 5v line on the Duet3. When that is done I'll be able to use a 5v out to trip the first 3v relay and power on the 24v power supply so I can test that. I'll post again when I've gotten that far. Here is a picture the wiring progress so far.

    The DIN rails and wiring channels are held in place with M6 bolts that are drilled and tapped in to the back of the box itself. The Duet and the RPI are both mounted on DIN rail as well using a 3D printed mounting adapter that is screwed to a PCB din rail mount. Works great so far, and it lets air move underneath. I've got all the holes already cut in the box so I just need to get things wired.


  • I had some nice progress today.

    I got the power supplies connected. I was double checking the connections from the schematic and I found this PS_ON pin on the external 5v power supply. This pin is pulled to ground as the result of an M80 command. I connected a lead from the 5v rail to the + side of my Solid State Relay on the High Voltage side of my 24v power supply, and the - side to the PS_ON pin. It worked!. I measured the current draw in the SSR at 14ma. I was thrilled to find this because I had originally planned to use an IO port for this and now I get to save an IO port. The other two relays (for the router, and the dust collection) will run from the 24v outputs, since I need lots of IO for the 6 endstops, the z-probe, and my CNC pendant.

    After the power was sorted out I got the four Nema 23 motors hooked up and setup in the config.g file. The motors worked first time!

    I had a little trouble talking with the Duet3 to start with, but then I found that I needed to remove the SD card if I was using it in SBC mode.


  • Very clean design and wiring!

  • @N7JTI This is really nice work! If you ever get the time a BOM would be great to see

  • Another day, and a bit more progress.

    I have three relays on the high-voltage side. And they each control different things:

    1. controls the high-voltage input to the 24v power supply. I got this working yesterday using the ps_on for ground and hooking the positive side to the 5v rail.
    2. Is on the hot-wire between an inlet and outlet on the control box that will automatically control power to the Dewalt Router that is the spindle for my build. I hooked this up to out1.
    3. Is on the hot-wire between an inlet and outlet on the control box that will automatically control power to the shop-vac that I'll be using for dust collection. I hooked this up to out2.

    Today I got the last two sorted out, and I also pluged-in my touch-plate as an end-stop to get that wired up and the configuration discovered. Success all around.

    The progress on the configuration can be found on my github:https://github.com/n7jti/duet3-avid-cnc

    Notes for the firmware authors:

    1. My spindle has no RPM control, but the CNC mode doesn't seem to support that and requires a max RPM on the setup and M3 command. I've worked around it by having the max RPM be 1 and I guess I'll just have to set M3 S1 to turn on the relay for the mains power for my router (spindle). I wish there was a mode here that didn't have PWM. I really really don't want to be thrashing my relay or my router because I accidently had PWM switching my relay instead of an always-on signal.

    Next up: I'm waiting for the M14 female panel mount plugs to come in to Avid so I can go pick them up. They might be in tomorrow, if not next week. If those come in tomorrow there will be another update before Thanksgiving!


  • I just saw someone ask about a BOM. I do know what I ordered, but I don't really have it in a spreadsheet or other useable form. If you have a question about a specific part then I can go find my online order and pass along the information. Here's what I remember off the top of my head:

    • The Din Rails and din terminals for the high-voltage side I got on e-bay.
    • The Case is an 18" x 12" x 6" Hammond enclosure I got for like $40 including shipping from Wistix: https://www.wistexllc.com/enclosures/chko18126-18-x-12-x-6-hinged-cover-enclosure-with-knockouts.html
    • The Solid State Relays were around $30 each from Automation Direct.
    • The small power supply and the low-voltage din rail components I got from Avid CNC. They are actually local here (I'm in the Seattle Area).
    • The RPI I got from Amazon.
    • I've got two different kinds of hookup wire (18g and 24g) From BNTECHGO (via Amazon). This stuff is fabulous. Real silicon sheath and very fine stranded. I bought boxes with 5 colors and 30' per color from Amazon. After stripping and crimping and routing this stuff, I'll never go back to cheap hookup wire.
    • The PVC wire channels are from e-bay.
    • I bought a metric drill bit set and a box of M6x4mm screws for the din-rail from McMaster-Carr along with the 3-tap sets for M3 and M6.

    If you have questions about something specific I haven't covered the just ask and I'll share what I can find/remember.

  • Oh and of course I got the Duet3 from MatterHackers. Man, I can't believe I didn't include that one! Ha!

  • And the steppers came from stepperonline.com and got the 23HS45-3504S.

  • I am now waiting on some more parts to continue the CNC build, but just to keep things moving along I posted information about my CNC Pendant build in a separate topic.

  • @N7JTI Great! Thank you. I will be starting the electronics build soon, so this is helpful. It's my second custom machine. The first one used a PlanetCNC controller. But I like the look of the Duet3 so here we go

  • Well, the M12 connectors for the end-stops came in so I wired them into the controller. The mechanical parts are due next week so that is still coming. Meanwhile, here are pictures of wiring in the endstops.

    The M12 endstop connectors are on the left. I'm still waiting for the last connector for the CNC Pendant. I used aircraft connectors for the 4 motor connectors on the right.


    One of the parts aviailable from Avid CNC was a DIN rail mounted kit to connect the endstops. The blue wires into the grey DIN rail is my ground, and the brown wires into the blue DIN connectors are my 12v rail. The off yellow one is my 5v rail, my common earth ground are the smaller grey DIN rail above. I don't know if there are standards for these. If so, I'm probably not following them. But I did want my box to be "finger safe" so everything is crimped and in connectors with no exposed voltage wires.


    The signal wires are black, and I've put them into the "IN" lines for IO3-IO8. I'll update the config.g on my github with the new configuration soon.


    The CNC machine has both high and low enstsops on the x and y axes, but the DUET seems to treat endstops as being only part of the homing. I'll probably set up some kind of "stop if the endstops ever get triggerd" trigger when not homing, but I'll set that up later.

  • Nice update, cheers!
    I think I'll probably use a single switch for each axis which is triggered at both ends of it's axis. Less wires to worry about. I'll then just determine which direction to travel for the homing trigger.

  • Amazing job at the build. It looks so clean!

    I was looking at your configuration on github. If you are using a SBC, do you still need M552 and M586 commands?

  • The mechanical parts came from Avid CNC on Tuesday and I spent a few nights putting them together.


    The kit had a lot of screws and bolts but it was all there and seems to be fairly well machined and square right out of the box.


    It isn't their "top of the line" machine but I think it will more than meet my needs as I learn how to use it.


    And of course, I figure I saved more than $1K by doing my own cables, motors, and control hardware (which is based on the Duet 3).


    I got the axes going in the right direction. I got the endstops configured. I have the homing macro's well written so that the global machine coordinates are repeatable.


    Now I'm here trying to figure out how to program the macro's to use the fancy "corner-finding" z-touch plate that I bought with the system. But I'll post my questions on that in another thread!

    Still now sawdust/chips yet. But I'm hoping to do that tomorrow!

  • @mtcl said in N7JTI Duet3 CNC Build:

    Amazing job at the build. It looks so clean!

    I was looking at your configuration on github. If you are using a SBC, do you still need M552 and M586 commands?

    You know what? It seems I do not need them. They were in there from the configuration I got from the web that I started with. But I just removed them and everything seems to work. I'll probably update github again tomorrow after I get the touch-plate macro's working so I can machine my spoil-board.

  • I got the parts in to connect the pendant, and I got the box mounted. I also got the endstops programed to halt if the machine hits the endstops, but it stills homes. The parts on the deck are to mill the dust shoe.

    The updates for the config have been uploaded to github: https://github.com/n7jti/duet3-avid-cnc


Log in to reply