View Full Version : DIY Nema 34 Electonics Kit Mods

04-24-2015, 12:37 AM
Hey guys, I just thought I'd give some info on the mods I did to my DIY nema 34 kit. The modifications primarily revolved around increased safety, the addition of a VFD controlled spindle, and fault monitoring. The cost was pretty high, but for my application it was worth it (the spindle, vfd, and support electronics probably added around 2k to the cost).

First I'll go over the VFD enclosure. Everything is housed in a large Nema 12 enclosure, 24x24x10. I put in a Nema 12 rated cooling fan and vent to ensure dust free, but cool operation. The enclosure houses the AutomationDirect GS3 VFD, a contactor, a 24 volt power supply (for lights and VFD output to relays), and a safety relay. The panel is powered by a 20amp breaker providing 208 and 120 volt to the panel (208v for the VFD, 120v for the accessories). The E-stop circuitry for the entire machine is focused around the E-stop safety relay. The safety relay allows any number of E-stop switches to be placed in series and control 3 other independent sets of normally open contacts. In my case, the safety relay does 3 things- it sends an e-stop signal to the PMDX-126, it cuts power to the coil of the contactor that provides power to the VFD and spindle, and it cuts power to the 48 volt DC power supply that powers the stepper motors. This provides a full removal of power to all motors in the system, and doesn't depend upon the circuitry of the PMDX-126.

I also have an extra spindle disable/enable circuit to disable the VFD via VFD inputs. Basically the a locking mushroom switch (like an e-stop switch) puts the VFD in a fault state, that stops all output from the VFD to the spindle, it also disconnects the "K" input from ground on the PMDX-126, which I have set up as "Machine Hold". Then there is a momentary switch to reset the fault condition of the VFD, which then grounds "K" input allowing output from the PMDX-126.

This provides me with 2 methods of disabling the spindle for a tool change, one that cuts power to the VFD entirely (via the contactor, the safest method), and one that puts the VFD in a fault state. Both methods send a signal to the PMDX-126 disabling its output, but keeping power to the motors to ensure that the machine position doesn't change during a tool change.

The other enclosure is the one provided by CNCRP designed for the DIY Kit. The box was a bit smaller that I would have liked, but I managed to make it all fit. This panel was modified to put a relay inline before the 48 volt power supply, giving me the means to quickly remove power from the stepper motors entirely, required for a safe E-stop system. This also allowed me to put in an on/off button that allows me to disable the motor output for testng and configuration, while still keeping the PMDX-126 and smooth stepper powered. I also added a seperate DIN rail mounted 5v power supply for the ESS since the PMDX-126 cannot power both the ESS and the PMDX-107 spindle control add-on card. I also used DIN mounted terminal blocks and fuse holders and routed all of the wiring in plastic wire duct to keep things neat and tidy (a requirement since I added more electrical components).

One of the things I'm most proud of with the design is the built in fault monitoring. I mapped out several failure conditions and my machine should stop itself if any main sub component fails. Here are the conditions I thought of and how the machine deals with it.

Loss of 208/120 volt power to the VFD Enclosure--->E-stop Safety Relay opens, cutting power to the VFD Contactor, Stepper Motors, and putting the PMDX-126 in E-stop
Loss of 208/120 volt power at the contactor (Safety relay stays powered because it draws power prior to the contactor)---> Cuts power to 24 Volt Power supply, which opens a relay and puts the PMDX-126 into "Machine Hold"
24 Volt PowerSupply Failure-->Same as above
VFD Fault --> Opens relay, putting PMDX-126 into "Machine Hold"
VFD Failure not detected as "Fault" or failure of the PMDX-126/107 to communicate "with VFD --> Custom M3 command verifies that VFD is "At Speed" and is not at "Zero Speed", If it is at zero speed or not at speed the program does not continue.
VFD Spindle Disables via external Fault (Spindle disable/enable switches)--> Same as VFD Fault
No power applied to 48v power supply-->Fault signal sent to PMDX-126

Most of these solutions are there to ensure that the machine will never drive a stationary spindle into a piece of material, however the systems that allow for this fault monitoring also allow for a very save E-stop response that prevents continued movement at multiple levels (Software, PMDX-126, and Power).

There is only one real possible issue I have with the machine, and I haven't thought yet about how to go about fixing it yet, but I don't think it will be very difficult. Right now, the Safety Relay is powered AT ALL TIMES the VFD enclosure is plugged into power. I'm not sure I like the idea of the relay sitting there burning power and life over the weekend if we forget to unplug it. It should be fairly simple to place it after the contactor so its not on all the time, however this would require that the VFD always be powered even if you are just jogging the machine around. Another option is putting an external disconnect mounted on the machine. This may be my preferred method because it allows me to safely disable the machine entirely without unplugging the 208v power. I'll have to spend a bit of time exploring the pro's and con's of each method.

Please let me know if you have any questions about this setup, I'd be happy to answer any questions.

04-24-2015, 10:32 AM
Well! I'm glad I wrote this because as I did I was double checking all of my wiring and found a problem! I had used a relay rated for 15 amps to switch power to the 48v power supply! It draws 17.5A. I doubt I ever actually drew that much from the power supply which is probably why I didn't have any issues, but it looks like I'll be installing a contactor there as well! (Which kinda sucks because they are large and take up lots of space on my DIN rail). Better safe then sorry!

04-26-2015, 09:27 AM
I'd be very interested to see how you implemented those safety features in your controller. I'm in the process of finishing up the wiring scheme on my controller, and have had a very hard time finding others that have put in a disconnect switch for the spindle/VFD for doing tool changes. Do you by chance have a Bill Of Materials and/or wiring diagram/schematic on your controller?

I'm using the following electronics on my machine, which sound like they are very similar to yours.

PMDX-126 Break Out Board
PMDX-107 Spindle Controller Card
PMDX-134 Motor Driver Motherboard
PMDX-179 Indicator Panel
Gecko G203V Motor Drivers
Ethernet SmoothStepper
Antek 70V Power Supply (W/ 5V & 12V Taps)
Mean Well 12V DC Power Supply (For Powering Extra Fans)
Hitachi WJ200-022SF VFD
2.2Kw Water Cooled Spindle (From UgraCNC)

As for the enclosures, I have two Hoffman NEMA enclosures. One is 24" X 30" X 6 1/2" and is for the main electronics. I also have a 12" X 14" X 8" enclosure for the VFD and its accessories. Internal components like the contactors and terminal blocks are mounted on DIN rails for flexibility. All internal to external components are to be hooked up with Neutrik jacks. I can go into more detail if needed.

I'm creating my wiring diagram in Visio, and plan on releasing it here as well as on the Joe's CNC forum as soon as I finish it. I'll provide the Visio file and stencils for people wanting to edit or tweak it to their needs, as well as a PDF version for people to look at.

Please share with me all that you can, as I'd love to make my machine as safe and reliable as possible. Thanks!


04-26-2015, 10:33 AM

I do have a wiring diagram that I made up in a program called "dia" it is pretty quick to use to do a quick schematic. I need make some changes and then I intend to post it. I can probably get something close to a bill of materials, 99% of what I bought was from automation direct.

I should clarify that I have no formal training in this area, so I make no guarantees that what I did is correct, but I'm happy to share it.

04-27-2015, 01:12 PM
Thanks for being willing to share the work that you've put into this. I'm looking forward to digging through your stuff when you post it. Like you I'm also an amateur at this stuff, but have learned a lot from people posting helpful information and guides on forums such as yourself. It really goes a long way to making this hobby more understandable and accessible.


04-27-2015, 01:41 PM
As an electrician that occasionally does motor control work, I'd also be interested in seeing the diagram.

04-28-2015, 01:07 AM
Well, I wanted to refine this diagram a bit but realize that I run the risk of never getting to it and never posting anything. It needs to be opened via an open source program called "Dia", You can download it here Download Dia for Windows now - it's free (http://dia-installer.de/download/index.html.en)

Please bear in mind that I am not trained in this area, this is just an example wiring diagram. The design as shown may not be safe for your application or meet code requirements.

Please feel free to ask questions for any areas that are unclear.