Power outage "warning"

OK, had an odd occurrence I thought I would mention, since it could be a safety issue.

I have an old laptop (important point to this) that I use to run the machine. Today I was cutting some tests and my wife turned on something else and we popped the breaker for where I was working. (Yes, I need to address that issue, but this could happen with even just a commercial power drop or whatever).

The important part is that the breaker panel was right near me, so I flipped the router switch off (thankfully) and stepped over and reset it. No big deal, right, I mean it all shut down.

Well, the laptop was still feeding G-code… and that Arduino boots in a hurry. All of a sudden I had a moving sled (without a cutting bit) dragging the workpiece off with it. Those little motors are stronger than you think.

I might have actually been better if I had left the router on, since then it would have continued cutting, at least…

Anyhow. Be careful if you drop power, but the computer is still up.

1 Like

I wonder if your laptop was powering the Mega throughout the adventure by means of the USB cable, and the firmware marked time, waiting for the motor encoders to report movement. Another example of a reason to have the firmware bail out when a motor won’t move.


Good point, I’m not sure… the laptop obviously stayed up on it’s own battery, so maybe?

Would it for now be a good suggestion to rn laptops with the battery removed from it (until here is a real solution)

Then with a power outage the laptop will also shut down and stay off in case of a power fail.

And a big red panic button or panic cord below the worksheet that can be janked no matter on what side of the machine you are standing sitting, or lay bleeding on the floor. (safety is all about worst case scenario right?)

That’s a thought…

(and typing more letters so my pithy comment will work :-))

A simple mains voltage relay wired to derive it’s coil power from the output side of the relay, plus a start pushbutton to get it going (or the SSR equivalent). They’re pretty common and easy to homebrew

We’ve talked about how we should be detecting if a motor is disconnected or not moving for any reason and pausing the run before and I think if we were doing that the problem would have been solved because the machine would have sensed that it stopped.

I bet you guys are right that the laptop battery kept the Arduino alive so we didn’t see a connection dropped error, but the motors which are powered separately stopped. When the power came back on to the motors they tried to continue the cut

A “poor man’s” approach might be to put a voltage divider on the 12V line and monitor that with one of the AUX lines.

isn’t there a way to switch the arduino itself so that it does NOT use USB as it’s power source?

Looks like that would take removing parts from the board


Isn’t that a solder jumper? Just remove the blob of solder and USB power is disconnected.
(i hope the Chinese clones also have that option)

Read the topic :grinning:

You’d need to unsolder a mosfet described further down. The jumper is for the USB interface MCU

the arduino is actually powered by the motor controller. to prevent it from
being powered by the USB plug, you woud have to cut wires I think (unless they
put a jumper in there)

I know there is a 3d printer mainboard that has jumpers for this…

I’m browsing various Arduino Mega R3 clones to see if there might be clones who opted for something similair. Maybe OLIMEX or Sparkfun’s clones?

I chose to power the Arduino from the USB port because I wanted the machine to stop immediately if the USB plug is pulled as a safety feature (if you unplug anything it stops right away), but I see why you might want both options. It would be possible to add a jumper that would make it an option to power the Arduino from the power supply for the motors (as long as that signal doesn’t turn out to be too noisy). Is that something people would like to see?

Personally I don’t think we should pursue the multiple options as much as just one.

Somebody ( @bar maybe? :-)) that fully understands how things are wired and put together figure out the best place to wire in an E-Stop that will truly stop movement as rapidly as possible and issue plans or whatever to implement.

Although I’m the one that started this, having a power outage and a laptop still powering things is a pretty obscure instance, I would think. I was more aiming to just warn people of a rare circumstance.

Maybe an easy “E-Stop” box that you plug inline with the power and the USB and when you hit the button it drops it all, or whatever is appropriate?

The easy e-stop is to cut power to the router and the motors, and accept that
the workpiece is lost.


1 Like

That will stop the router, but the 12V will take a while to drop due to power supply capacitance.

My thought it to use the NC terminals on the eStop switch to open 12V, and one of the cheap SSRs to control router power using the post mushroom switch 12V. That will also make g code spindle power easy if/when it hits the firmware. You’ll still need to deal with the router’s inertia (unless shorting the power leads still works with an electronic control) but it’s still better than uncontrolled spinning under power

Given the 291:1 gear ratio (and the 1 being ~2.5"), I think the motors will
drain the power supply caps before moving a significant amount.

1 Like

Without any hardware in front of me, I may not understand all the issues, but I’ll throw this one out there. Would something like this be useful? Perhaps replace the physical switch with a relay or MOSFET.

1 Like