Wiring a SSR to the router and to the board

Good Day and thanks for the help in advance
does any one have a guide to wiring up a Makita RT0701CX7 to a SSR that the board can control
power AND speed would be nice but if i can just wire up the power that would be very awesome
im sure there would be some changes in marlin too any thing would be helpful

SSR would die trying to switch fast enough to moderate speed. A lot of us are using IOT power strips. https://www.amazon.com/Iot-Relay-Enclosed-High-Power-Raspberry/dp/B00WV7GMA2 Makes it dead simple to wire, with none of that accidental electrocution. Just hook it to the “part cooling fan” port on the control board and use M107 and 106(I think) commands to turn on and off the router.

First, my personal solution was just turning my router on and off, and I did exactly what Barry describes including an IOT relay like the one he references and using a fan pin with M106 and M107. This solution did not require me to modify Marlin.

From the g-code side of things, I know of four pathways used for on/off and sometimes speed control.

  1. Use a fan pin and M106/M107 to set on/off or to set PWM level. Note that fan pins will not be 5V, and they may use ground-side switching, but you can reassign the fan pin to a 5V pin (requires changing Marlin). Typically the insertion of the M106 and M107 is automated using the Start and End code of the CAM solution or the g-code sender.
  2. Use an M42 to control an “arbitrary” pin. This solution is nearly identical to #1, but it does require you to track down a free (and possibly PWM if you need it) pin. This solution allows you control a 5V pin without modifying Marlin.
  3. Use M3, M4, and M5 to control the spindle. I know based on topics in the forum that some people have struggled to get this working. I don’t believe these g-codes are enabled by default in the V1 maintained firmware, and there may be conflicts between controlling the spindle and the laser code since they typically specify the power/speed differently. The upside to this solution is that you can probably get your post processor to generate these codes, and they would map the RPM you specify in the CAM to a PWM level you can used to set the RPM of your router And this solution would, if supported by your post processor, allow you to change the speed during your job .
  4. Use the inline speed parameter associated with the G0, G1, G2 and G3 codes. This solution has the same strengths and weaknesses as #3, though I believe the changes in Marlin to support this solution are a bit different than #3.

Solutions #3 and #4 are the only ones that “automate” setting the RPM, but getting them working can be significantly more work mucking around in Marlin’s configuration files.

As for wiring things up, it will depend on your control board, your switching solution, and whether you are trying for speed control (not just on/off). What control board are you using?

Note there are a number of topics on this forum on speed controls for routers. In an ideal world, you want a solution with a feedback loop (PID control) since without it, the RPM of the router will vary somewhat depending on the load. Here is one topic that explores PID control.

1 Like

You don’t have to change the fan voltage. The relay doesn’t really care, and can take up to 48vdc on that input.

Are you guys saying you use a mechanical relay to pwm a mains driven router???

Noooooooo. That would be bad for both the relay, and the router.

I realise that Barry, but you link a relay board and don’t make it clear that you can only use that to turn the router on and off, not control the speed and Robert infers you can use M106/107 to control the PWM, which is wrong, or M3/4 which, if you attempt using the relay you link will, as you know, blow up in very short order.
For the sake of clarity Paul, you can use something like the relay board that Barry linked to switch your router on and off, that will work fine, you can connect it as Robert suggests except disregard any mention of controlling the PWM or the speed.
Controlling the speed of your mains powered AC router is quite problematic, you really need an inverter to control it properly, as per this diagram, however it is also possible (although not recommended ) to just use a manual SCR based AC motor speed controller to broadly control the speed of the router like this one. You cannot use Marlin to control the speed however, you have to twiddle the knob on the device. Also remember this is a mains device, Barry’s caution is relevant.

1 Like

I’ve got the V1 “development kit” board mentioned in the PID topic linked above. It works fine for me in grbl for controlling both on/off and RPM.

Both Marlin and grbl use PWM (usually on the same control pin) to control laser intensity and spindle RPM, but since you’re unlikely to have both the spindle and laser mounted at the same time they allow you to switch between Laser and Spindle mode. In grbl you can make this change without recompiling. I think you need to recompile Marlin to change between spindle and laser mode.

1 Like