charleyntexas
(Charley Thomas (Onefinity/Triquetra Touch Probe))
21
Here is how I wired my Makita router for automatic on off control. When I send a carving file to the machine (Click the Play Button) my spindle will turn on automatically at the speed set by the speed dial on the router and when the carving completes the router turns off automatically. I used a DB25 Breakout board that I had laying around doing nothing and purchased the Relay from Amazon for $9.82. The Relay comes in a package of 2 so the cost could be considered about $4.50. You could also use the second relay in parallel to control your dust collection if it doesnât draw over 10 Amps AC Power. I have attached a Wiring Diagram with instructions for wiring and controller configuration that I found in CruversWorkshop post in this forum topic above.
For this to work your gcode file needs to have a M3 and a S1 command to turn the router on and a M5 at the end to turn it off. Most design packages such as VCarve will have those commands already included in your carving files. Others such as InkSkape may not.
The S command can be either before or after the M3 and can have any value assigned to it. S0 will likely turn off your spindle but donât rely on that, use M5 instead. S1 or higher will turn it on if a M3 has already been sent or gets sent after the S1 Command.
The M3 (on command) must ALWAYS come after the spindle is raised up from Z0. Never before that and the M5 (off command) should be near the end of your file just before the X0.000 Y0.000 command to move your spindle back to its starting point. Sometimes you may find it immediately after though.
If you need to insert the M3, S1, and M5 commands manually please make sure you fully understand what you are doing. If you arenât sure, contact me and I will be happy to review your file before you try to use it.
Download the free PDF version of this file from Triquetra CNC HERE
Thanks Charley - great work as always. Iâm guessing the relay Barry posted can be used as well? Lot safer than having mains voltage laying around (though Iâm sure itâs in an enclosure of some kind).
-Tom
charleyntexas
(Charley Thomas (Onefinity/Triquetra Touch Probe))
23
Yes it is safely tucked away in an enclosure completely out of harms way. Even if it werenât, there is virtually no exposed wire not to mention the fact that I am using the Neutral wire to go to the really even though either would work the same.
Can we see a picture of the actual wiring Charley?
2 Likes
charleyntexas
(Charley Thomas (Onefinity/Triquetra Touch Probe))
25
Sure. I need to tidy it up, I just finished testing out my laser wiring and I have test leads going in every direction of course. It is an off brand that I picked up several years ago. Some of the folks out there have probably heard of it. It is a L-Cheapo 5.6 watt.
3 Likes
charleyntexas
(Charley Thomas (Onefinity/Triquetra Touch Probe))
26
Here are the Pictures. The Laser Wiring shown is for a L-Cheapo laser and IS NOT FOR THE J-TECH LASER. If someone needs a wiring diagram for the L-Cheapo laser let me know and I will post one. If I were going to endorse a laser it would most certainly be the J-Tech Laser. The Actual wiring diagram is posted earlier in this topic and does not include the Laser Wiring in the pictures below.
Nice setup, I did not have to use a 3rd wire if you set the Tool to tool-type- PWM Spindle in the UI. This changes the pin 15 to carry 3.3v when the M3 S# is sent, and then cuts it when M5 is reached. Ultimately it has the same result. I still do plan on doing the blog post with images and settings within the app so itâs all in one place.
Bit of a noob question. My original plan was to wire some switches to be able to turn my machine, router, vacuum, and lights on for an enclosure. If I set this up like this would all I need is a switch for the machine and lights as the gcode would be able to turn the router and vac on and off when needed?
Excited for your blog post as I have a lot of questions about how to setup with the stuff you linked originally as it seems like a perfect solution for both what I want to do and my novice electrical skill set
1 Like
charleyntexas
(Charley Thomas (Onefinity/Triquetra Touch Probe))
29
The simplest method would probably be to go with the IOT relay that CruversWorkshop referred to. The controller software configuration is the same for the IOT relay and the smaller board relays I use. The IOT only needs two wires coming from your controller to turn it on and off and the relays I use requires three wires. Aside from that here are some other differences.
The IOT Relay:
Cost approximately $26.95 usd on Amazon
Controlled with two wires from the db25 breakout board.
Looks like a power strip with 4 outlets
1 outlet is always on
1 outlet is normally ON and can be switched off with the logic signal.
2 outlets are normally OFF and can be switch on with the logic signal.
Maximum load capacity is 12 amps at 120vac combined total between all outlets that are ON at any given time.
Does not require any modification to the power cord of a device being controlled.
Format: Stand Alone unit
Size is about 5"x7"x2"
Response time not listed
Additional Requirements: DB25 Breakout Board
Relay Boards:
Cost $9.82 on Amazon (Package of 2)
Requires 3 wires to control. 3 vdc + and - to power the board and 1 signal wire. All three come from the db25 Breakout Board.
Maximum load capacity is 10 amps @ 30vdc/120vac/250vac.
If you use both relays that come in the package you can control 2 devices at 10 amps max each for a total of 20 amps.
Does require modification of the power cord going to the device being controlled. (1 lead goes directly to the device and one goes through the relay)
Format: Circuit Board
Size: 70mmX17mmX20mm each
Response time: 20 milliseconds
Additional Requirements: DB25 Breakout Board
Conclusion
The IOT will cost you a little more but is a simpler method and is very reliable. I have one on a different cnc machine that I have been using for years without issue. The relay board I installed on the OneFinity is a little more involved to setup and needs to be inside an enclosure but is a fraction of the cost. There are other models available that can provide multiple outputs instead of just one per circuit board. Both methods will control your spindle equally well. I believe that CruversWorkshop is going to post a wiring diagram for the IOT so I will leave that to him. Whichever way you choose to go will definitely make your life better. With both of these methods, your router switch is always in the on position and power is supplied and removed at precisely the right time through G-code commands. The commands are typically inserted automatically by most project design packages such as Fusion360 and V Carve. It turns on at the start of a carve and turns off when the carving is finished. No intervention required.
Wow, absolutely amazing write up! Super helpful. Helps tremendously understand which would be best for me. Not having to modify the power cables would be a good thing for me, leaves open the ability to adjust and change things with little complication.
Thank you so much for great write-up. It took me about 7 min to wire up the breakout board and plug everything in⌠a simple M3 S1 later and like magic, my shopvac & spindle were humming away⌠hit an M5 and silence.
I was able to plug everything into the same double outlet so no issues with the noise causing the controller and power switch to be on separate.
That worked great and I set both the Tool & the I/O to your stated settings. The cave worked perfect, probed, turned on, carved turned off.
However, once I hit ANY of the directional keys after that (even when the carve us totally done) the spindle and vac turn back on. If I hit the âStopâ button (not e-stop, the one next to Play) it shuts them off⌠any ideas where I went wrong?
Hmmmmm, I just tried my IOT relay I had from my previous machine and I donât seem to be getting the same results. I also used the same (PIN 15 tool enable and PIN 25 GND) but it doesnât enable my IOT relay.
That is odd, havenât see that behavior. Have you disabled the load-1 and load-2 under the I/O area? And set the spindle to PWM under Tool and set tool-enable-mode set to lo-hi? Maybe also try putting the controller on a different outlet if you havenât done so already.
Have you done the other steps of changing the setting under Tool to PWM spindle and set tool-enable-mode set to lo-hi. Then under I/O disable load-1 and load-2. You can test the setup by using the MDI table and sending M3 S1 and it should turn on the router (already have it powered on), then M5 to shut it down. If this works then itâs just modifying the post processor to add the M1 [S] in my previous comment in this thread. This is if you use VCarve/Aspire, Iâm not familiar with the other software offerings to know where insert the gcode for them.
Yeah Iâve done all the other steps. Everything is disabled in the 1/0 tab, TOOL is set to pwm spindle, tool enable set to lo-hi. It lights up my SSR barely when I tried that, but for some reason itâs not triggering my IOT relay.
Have you tried to put the cnc/controller on a different outlet. That did the trick for me. Before doing that I would hear the IoT relay kick on a split second and then the controller would reboot. Think the IoT relay I have referenced required 3.3v to engage
Iâll have to mess with it some more and see what happens. I havenât attempted to try and plug in the IOT relay to 120v yet. I just want to see the relay energize first and the red light kick on.