Ramps 1.4 Mega Random Crash Only During Tool Contact

Hi All and thanks for anyone’s help on this :slight_smile:

I have been chasing a (semi) Random “Freeze” and also a Random Reboot issue on my MPCNC.
Mega Freezes or …in it did earlier in this escapade Reboot on its own.

We seem to have tracked it down to occurring during a loading up of the tool. During cutting free air (repeating the failed areas of cuts prior to tool engaging)it seems to be just fine.

With or without octoprint connected (so from SD) the error still occurs. Our max feed is 2500 and depth is no more than 0.5mm 30k, and step over 0.25-0.4mm. So low loading and many passes. Dremel is lightly changing its tone with a very slight drop in RPM.

Tried:
Replacing the Mega
Swapping out to a completely separate PSU
Disconnected my optical Z limit to see if its a noise related feedback to the Mega (thought id got it Doh nope!)
Checked Driver temps after several hours 54.5C max on the driver boards.
Wiring and connects are new and tight
Adjusted the Speed of the Dremel to see if its a random noise freq issue.
Adding more bypass Caps to the incoming 12v supply to the Ramps 1000uF 100nF etc.
Add more capacitance to the Mega 12v rail (vIN ) and also doubled the 5v from 47uF to 100uF 100nF.
Unplugged Pi and ran from SD

Equipment Summary:-

Ramps 1.4 , 3x DRV8825 (set to 1.2-1.4A peak per phase )
Arduino Mega (Original and have also sapped out for a clone to test)
Marlin 2.0 V1 Ryans Firmware 515s 2.1.1
Dremmel 4000 and Vac controlled by 2xZero Crossing 25A SSR opto isolation
Meanwell 8.5A Chassis Power supply
2 x Standard micro Limit switches
5 x 17HS19 steppers
Cables are 18awg silicone, loomed, with drag chains.
All power electronics are contained within right side of console.
Left to right are : - Octopi running on Pi2W, Ramps and Mega, SSR block, EM stop, PSU and sockets.

Im literally at loss as to what this could be - does anyone see what i’m missing ? I must have missed something. Myself and my son are just lost what to do next, we really tried but …hope maybe some one can help. Thanks so much.

Quick Update:

Tried now spindle and vac off completely separate power ac supply (Just a simple 13A AC plug and I manually turn them on at time of cut other side of room). AC Cables hung from above for dremel away from any stepper , signal or limit cables

Still Reboots as soon as tool start to cut a tad more into the wood - DOH :frowning: so ? errrrr wow this ones really got us here).

I wonder if there’s a voltage drop when the motor draws more current under load.

Hey you got a good idea thanks- I just loaded up the X and Y and Z with my hand holding on as hard to resist it movements - perfect Really really strong Motors in series super hard to hold back - Now issues no reboot.

i’ve now go this wrapped over it n grounded to try this :slight_smile: lol

Tin foil got the job working until about 25mins in which (hard to tell because it has made it to over 45mins before)…may have improved it …
but it still failed, rebooted this time. :frowning:

Unstable …but why I guess is the question we don’t know.

i could resort to literally buying new controller board like a SKR or Rambo or maybe something that’s not as sensitive to EMI or literally shift and rewire the entire setup to about 10ft away :neutral_face:
had scope on it it does have some stepper noise on the DC lines 12v and 5v its tiny very small around 10-16mV peaking to 20-40mV PP but that seems to not effect the operation.

:thinking: puzzling indeed really weird

Try separating your power cables from your data cables in your cable chain. Temporarily supply the router power using a separate cable kept well clear of any stepper motor wires and try the job again.

Hi Mike

I tired that last night :thinking:

I powered the router from an extension dangling above the whole setup to get some distance of anything AC . (it’s still there now same with vac). Nothing now to do with the mpcnc wiring looms etc.

Today I have done the following.

Replaced the Ramps 1.4
Replaced new stepper drivers (which the Z axis actually became really smooth and quiet interestingly)
Replaced New screen

and tonight I tried again after setting my Stepper currents to 0.995v she lasted about 9mins cutting thin air before same again (reboot). But I did observe it seemed to occur during a quickish combined Z, X, Y movement.

So … I lowered my stepper currents to 0.75v and she cut ok for about 25mins 9mm> 17.5mm and also cutting tool engaged. But then …it rebooted again as the pass approached 18mm cut through.

Im slowly thinking it "migh"t be a “Current” loading issue. It appears random but this “Ramps Board” what are the traces like ? …what thickness are they and what can they handle during all 5 steppers under load at 1.5A each.

Theres I think 2 things that can cause a reboot …Static EMI etc noise, and under voltage. (or Marlin which is kinda Odd as it appears to run Marlin hour after hour doing nothing it seems “stable”.)

Could I try slowing the entire job down, lowering the current further to say 1.2A a stepper and do more tests. Ive been at this a week now so …it’s so close and when it works wow its Fab and want to make it work we all do here :slight_smile: Just this stupid Reboot out of nowhere.

vague Ideas …but .maybe I try

Disconnecting the cables for the SSR optical (which do seem to work perfectly well but hey it might be some strange leak back into the Mega who knows).

Slowing the job down lower tool loading potentially.

Dropping the Stepper currents (although it is running of a thick 12v cable from a mean well 8.5A PSU and i’ve also tried it from a separate 10A PSU and it still rebooted).

its an incredible frustrating one to find this issue - I thank you all for your ideas and help.

P>S The tin foil didn’t fix it - I thought it did …for 34mins then …reboot !

It really sounds to me like you are suffering from electrical noise. I think I would be looking at the earthing of the router, it might mean taking the router apart to see if the earth is actually connected and providing shielding. Do you have a different router or even something like a drill to provide a load whilst doing an ‘air cut’ instead of the router?

Solved :slight_smile:

So happy been running for past 3 hrs no Arduino Mega Restarts. YAY

As the diagram shows I hope this helps anyone who is unfortunate enough to have spent a week chasing around. Regardless of shielding cables, Gnd Planes, caps, power supply, and the list goes on …you got Antennas straight into your Main Board. - So for your issue if it’s the same as mine …check this area.

Disconnect them - and the restart problem goes away.

Solution (just making these) - opto isolate your limits, separate Isolated PSU (mini 12>5v DC-DC fully isolated type). The amount of noise coming down those limit switch cables is crazy. And the way the entire Ramps board is designed sadly doesn’t help at all, I there needs to be a RAMPs 2.0 this one with various additions and fixes :slight_smile: It may be something ill take on if I get chance a shield with a few things fixed here and there. Thanks everyone for your input :slight_smile:

1 Like

I hope this might help someone in the mpcnc community if they need to Make a Limit Switch isolation solution. tested works fantastic. Will also post PCB mask shortly if your handy etching etc.
JD

1 Like


1 Like

Fitting an opto to fix a noise problem is not really fixing the problem. Optos are great for isolating one source from another but there is precious little preventing a noise spike going straight through.
Taking a leaf out of the radio amateurs book the best way of keeping electrical signals in their correct place is by using shielded cable and a good earth. Utilise normally closed limit switches and shielded cable from the switch to the uP, audio or microphone cable is suitable, and connect the ground to the outer braid and the uP pin to the core.