Auto-power switch for router?

Are there any plans to develop a smart power switch so that the Maslow can turn the router off when it’s done? I want to get mine to the point it’s “fire and forget” - but I can’t as long as I have to turn the router off when it’s done.

1 Like

I would love to have this happen as well! I have a sound activated relay that I bought off ebay for $5. if the cutting program could make a beep via the headphone jack then it could basically be wired up to cut off the router. could be used to program this easily. problem is I’m not a programmer.

another option is to have a timer switch, but this would only work if you knew how long the cut time was to take, and I dont’ think that is given is it?

1 Like

No, Bar has made the explicit decision that he does not want to control the
router power for liability reasons.

There are GPIOs available, but using them for this purpose would require changes
to the firmware, and someone would have to maintain these changes in the face of
the rapid firmware development that’s taking place.

David Lang

I understand about liability but as long as Bar is not selling a control or including a control in the kits then he would not be liable.

If Bar would allow just one control pin to be used then we could use one of these all-in- one AC/DC control relays at our own peril. (can take 3.3-60 VDC or 12-120 VAC for control signal)

or here is the direct from manufacture link

1 Like

There are six control pins! See AUX1-6 on the board. Each position has ground, a gpio pin, and 5V. It will be up to you to add something to control the pin you choose :wink:. Pro tip - if you’re using the beta version of the board, don’t use AUX5 or AUX6, as those were connected to the serial Tx and Rx lines. Voice of experience…


So there are extra control pins so this could be implemented. Since Bar put these additional control lines in I presume he was going to have some firmware way to control them.
Some sort of G-code command would be nice. That way people can add a GCode line to start the router and another to turn it off the after completion on the run.
I would vote for adding it to the firmware as part of the main fork so the user can decided to implement the hardware control with a pair of simple wires and one of the relays above…

I have one of these - should work fine:

Just use one of the unused pins…

So now we have a least two different I/O controlled switches available and we have available I/O pins.
Seems like we should see if Bar would implement a control.

Just a “job done” signal. That can’t come with liability, surely? Then we can use it for anything we like… at our own risk. :slight_smile:

@bar - is that possible?

SSRs (solid state relays) are available on eBay, Amazon, and elsewhere, no fancy IoT device required. All it would take is a command to toggle the aux lines. Call it light bulb control to avoid liability. Used one to control the spindle on my Zenbot Mini for several years.

1 Like

Remember that the Arduino doesn’t have the concept of ‘job’, it just executes
lines as it receives them

That said, once there is a way to toggle these aux lines, you can manually edit
the g-code to use them.

To make it clear to everyone, I think Bar is being paranoid about this and that
it’s actually safer with a spindle control. I’m just reporting his statemetns
and policies.


mooselake wrote : “SSRs (solid state relays) are available on eBay, Amazon, and elsewhere, no fancy IoT device required.”

That is true but for less than $30.00 you have a nice package that all you have to do is plug in power, plug in device, and attach two control wires. It is also “Safety CPI tested”.
I could also build my own out of a SSR but by the time I buy the parts and throw my time at it it will be over $ 30.00.
I have one of these IOTRELAY.COM relays and it is nicely built. There is no way I could build one that nice. I purchased it with the intent that MaslowCNC router could be controlled at some future date. Now I just have to find some time to put my MaslowCNC together.

1 Like

So if Bar could implement M4 and M5 to turn on/off spindle (router) as one of the I/O pins controls then all that would be need to be done is to edit ones gcode to control the router.

1 Like

$3 for a slow ship or $5 for USA seller, but go with you like best.

Doubt we’ll see Bar do M4/5 but maybe he could consider something like Marlin’s M42. I’d be happy if there was a way in GC to turn the spindle on and only M4 to turn it off. Ianal, but moving a fast spinning bit on a couple chains seems more dangerous than turning the router off and on and we have no problem with that. I’d sign a liability release to get on/off control

1 Like

I’m currently using a SSR on my X-Carve which is controlled by gcode. Best modification I have done so far. However, the X-Controller has specific ports for the wiring.

This design was modeled by Philjohnson and the thread can be found here



Are M4 and M5 the correct gcodes to use?
Which AUX line should they associate with - AUX1?
So M4 would set AUX1 high, M5 would set it low, and the machine would always set it low on a reset?

M3 spindle on CW
M4 spindle on CCW
M4 spindle off

Off on reset sounds right. Any port in a storm but it should be easy to solder to.

I like that IoT switch and the multiple outlets, MOV, etc are nice, but the extra cost is a couple of router bits. 3 if they’re Bar’s (anybody try those yet?)

Another idea would be to use the Bxx codes specific to the Maslow for the AUX gpios. Something like B2n to turn AUXn off and B3n to turn it on. Bar has used many of the Bxx codes below B12 for program controls, so choosing a series higher up to avoid conflict. This wouldn’t preclude a proper implementation of the M codes later, but could get control of the gpio pins without having to do that.

we really need both, BXX codes for arbitrary control of all the extra GPIOs, and
M codes that can be configured to control one of the GPIOs so that systems that
generate M codes as part of the gcode will ‘just work’

David Lang

In order to achieve directional control like the M3/M4 pair, we’re going to have to wait for additional circuitry. I think the Bxx option will get TomTheWhittler switched sooner :wink:.
Presently the gpios all come up as tristate on reset. I’d suggest we leave them alone unless a Bxx code specifically addresses one, then set that one as an output as the first part of an ‘on’ or ‘off’ command. I don’t believe there is a down side to re-configuring an output as an output - anyone have input on this?