top of page

MillRight Mega V Brain Transplant

Of late, I have been working with a local makerspace, North End Makers. It's a great group and worth checking out if you are in the Seattle area. They have a donated MillRight Mega V XL. This is a decent hobby quality CNC router that uses a DeWalt 611 trim router. It is powered by Grbl running on an Arduino Mega. We had been having some problems with it. Jobs would just stop in the middle. It was confusing to track down. I suspected EMI (electro-magnetic interference) because the Arduino had absolutely no input protection and the machine was constructed using unshielded wires. However, it ran fine when there was a light load on the router but the heavier the load, the more likely it was to fail. After trying a number things, I realized there were actually 2 EMI sources causing the problem - the router and a dust collector. The interference was additive and crashed the Arduino. If I moved the dust collector 3 feet away from the controller box, the number of occurrences decreased significantly. Though there were still incidents. In our shop steward meeting, we discussed the issues and I suggested that we try upgrading the machine to grblHAL and my T41U5XBB, a Teensy 4.1 based breakout board. There was general agreement so I set out to do it.

The Transplant.

I built up a new board and included Ethernet on it. Initially we will use USB but I plan to switch to Ethernet in the future. I also went through and changed the setting as specified in the grblHAL wiki's First Run Settings section. The actual switch was very easy. The number of wires is quite small - 4 sets of step and dir lines, one ground wire shared by all 4 drivers, 3 limit switches and a probe input. Prior to removing the Arduino, I saved the Grbl settings. After the grblHAL board was installed, opened up the G Code Sender (ioSender) and changed the default grblHAL settings back to the Arduino ones. After a review of my connections to make sure there were no dumb mistakes, I powered up the stepper PSU. Holding my breath, I clicked HOME. The X homing direction was wrong so I stopped it, corrected the problem ($23, X Homing direction invert) and tried homing again. This time it happily complied. I tweaked the homing speeds to get better performance and decided to call it a night.

The results.

The next morning, I ran a number of jobs and pushed the dust collector as close to the controller as possible. No crashes. A student ran their class project to test out the machine and that also completed correctly. The controller crashed on that project earlier. So, it is looking pretty good! Here's one of test jobs. Ran to complete! MDF, 60 deg V Bit and 1/4" endmill. This would absolutely kill the Arduino before the upgrade. Is the problem solved? I am cautiously optimistic. However EMI is still lurking and there is more to do really ensure that it never bites again.

Observations about the Mega V control box and wiring.

  1. There is no shielded wiring. Pretty much an EMI conduit.

  2. The Arduino Mega V Shield has minimal EMI protection.

  3. The control box wire is stranded and no ferrules were used. I found a couple of "cat whiskers" that could have been a problem.

  4. Some of the wires in the screw terminals were tinned. I believe this was to avoid the cat whisker problem but it is a discouraged practice in general. I need to trim the tinned ends and install ferrules but ran out of time. Will circle back on that one.

  5. There is no use of stepper enable. More on this in a bit.

  6. There was a wire connecting the 48V power supply's 0V terminal to the Arduino ground. While not necessarily bad, it is not needed so I removed it.

  7. I found that the metal case did not have continuity to earth ground (3 pin on a 3 pin power plug). I think it is due to paint on the box. Added a strap between the metal case and the earth ground terminal on the PSU. Good earth grounding is important.

  8. The control box is very tight - 2 stepper drivers are pushed together with the heat sinks back to back. I worry that it may overheat though our Mega V XL seems to run fairly cool but hasn't been pushed very hard. The box could be a couple inches bigger.

  9. The Y Axis moving gantry is driven by 2 motors. In most controllers, there are separate drivers for each motor. However, in this design, both motors are driven by a single driver. In my opinion, a very bad design decision on MillRight's part. The box is set up for 4 Axes (rotary as Axis A) but there is no rotary on this machine so I will make the switch.

I believe a lot of these are fairly common practices in hobby level machines but wanted to bring ours up to a higher standard. One of my guiding principles in designing the Teensy 4.1 based breakout board was to be defensive against EMI. This episode shows that it was time well spent.

Next steps.

  • The first problem that I ran into is that the space in the control box is limited and the board is a tight fit. I had originally planned to mount it on the bottom of the box but decided it needs to be mounted higher. Currently it is just sitting there held up by all the wires. Kind of sloppy looking but it will tide us over for a couple of days. I designed mounting brackets that should be easy to make - will lift the board about 2 inches off the bottom. Check back for updates on that.

  • Replace all the stranded wire in the control box with solid core. Ferrules aren't required for that but will probably use them.

  • Wire stepper enable lines and turn on idle current reduction in the drivers. This will reduce heating in the stepper motors and drivers when the machine is not running or the steppers are idle.

  • Add a limit switch on the Y2 motor rail and turn on auto-squaring. It needs an adjustable limit target to allow getting gantry perfectly square. See my auto-squaring blog for more information. This requires the addition of a new connector on the back panel, so I'll be drilling a hole. Fortunately, I have some left over aviation connectors from a previous project - hopefully it will look half way decent.

  • Replace all the limit switch wiring with shielded wires.

If you are interested in learning more about how to go about upgrading to grblHAL, you can follow these step-by-step instructions on swapping out the Arduino for the Teensy based controller in a MillRight MEGA V XL.

Till next time!


Mark Ehle
Mark Ehle
Apr 12, 2023

You forgot to mention about the MillRight box that all the jacks on the back of it are identical and NOT LABELED. You can plug in stepper motors to the limit switch jacks and worse, limit switches into the stepper jacks. That and the "e-stop" button has live power to it all the time with no fuse. They really should have had someone build it for them because clearly their expertise is not in this area.

Phil Barrett
Phil Barrett
Apr 12, 2023
Replying to

Good points. The one I worked on had connectors all labeled. MW seems to have understood their limitations and went to Masso for their high end product.

Featured Posts
Recent Posts
Search By Tags
No tags yet.
Follow Us
  • Facebook Classic
  • Twitter Classic
  • Google Classic
bottom of page