February 7, 2019 at 8:35 am #87903
Is it possible to wire the Dewalt to the board and operate it through the gcode.February 7, 2019 at 8:38 am #87904
The dewalt runs on AC. So you need a relay. There was one I liked with all the wiring and safety involved on amazon.
You can wire this into the fan port, and control it like you would a fan.
Any relay should work though, This is just nice because you don’t have to risk shocking yourself with AC. Or shorting ACFebruary 7, 2019 at 8:39 am #87905
Whoa, it looks like it’s only available from other, expensive sellers… Sorry.February 7, 2019 at 8:42 am #87907
So how would that work? I may be able to find something similar. I’m pretty new the CNC world. Would I plug the Dewalt to this and then the board to the high power relay?February 7, 2019 at 8:48 am #87909
Sorry, missed the bottom part of your reply. Would I lose any power at all with this thing? What would be the gcode to start or stop before and after a job?February 7, 2019 at 8:50 am #87911
For this one, you’d connect the dewalt to this, and plug this power strip into the wall. On the side of it, it’s got little green plugs to connect to the controller board. If it senses a signal on the green plug, it connects the dewalt’s plug to wall power. If it doesn’t sense a signal, it disconnects the power to the dewalt. The controller would have to send a signal when it wants the router on.
If you use the fan connector, then you can put commands in your gcode to start the fan at the beginning, and stop it at the end. You’ll hit play on your gcode, and see the router spin up, do all the cutting, and then turn off at the end.
If you plan on doing this. Be very careful. I have not given you enough information to do this safely (and I’m not sure I can from here). You’ll have to do some research and find out how to do it. AC is no joke. The controller can only hurt itself so far, but if you give it AC power, it can kill.February 7, 2019 at 8:54 am #87913
Okay. Thanks. I’m giving it a lot of research. It’s a future project I’m considering. I have yet to fully operate my CNC. Still running tests on it and tweaking things. I also intend to operate a 12v led strip that will turn on and off when I start and stop a job or control it through a fan pin on the board. So that is my first project before I get into auto power control of the spindle.February 7, 2019 at 9:11 am #87918
I have a tutorial on thingiverse running one of the more exposed relay boards off of a raspberry pi. I am switching the AC to the printer and the 12V to an LED strip with it.
It’s also sort of incomplete, because I want people to use their heads. That’s my safety strategy :). It’s also for the pi and octoprint, which is a little different.February 7, 2019 at 10:01 am #87919
Whoa, it looks like it’s only available from other, expensive sellers… Sorry.
It’s available from the manufacturer for a reasonable price here: https://dlidirect.com/products/iot-power-relay
I use it as well. It has 2 “normally off” outlets and the DeWalt is plugged in to one of them. I have the sensor wired to the “heatbed” port on my controller. Gcode to turn the bed heater on will trigger the relay to turn the “normally off” outlets on turning on the DeWalt.February 7, 2019 at 11:40 am #87932
What would the gcode be? I see on amazon they have a raspberry pi with a relay module on it. Would that be the same thing? I’m not exactly sure what I’m looking for. Is it basically a large mosfet?February 7, 2019 at 11:50 am #87933
Would this also work?
NEW Raspberry Pi Expansion Board Power Relay Module for Raspberry Pi 3 2 Model B B+ @XYGStudy https://www.amazon.com/dp/B01G05KLIE/ref=cm_sw_r_cp_api_i_kVixCbVFZMAQNFebruary 7, 2019 at 11:56 am #87934
I was under the impression octoprint would drop offline on occasion. It’s done it with my printer s couple times.February 7, 2019 at 11:56 am #87935
I’m not sure if they’re solid state relays, or real mechanical relays. For hooking to a Rambo or ramps, there’s gcode to enable either the heat bed, or part cooling fan. You’d hook the iot relay to one of these outputs. Then add the proper gcode to the start of your cut file. Estlcam has setting to add it automagically.February 7, 2019 at 11:58 am #87936
Ok, awesome. I’m still learning the whole thing with the gcode being sent for tool change as well.February 7, 2019 at 12:07 pm #87938
Is octoprint required?February 7, 2019 at 1:25 pm #87957
I think that relay for the Pi would add a lot of complexity. The “IoT Relay” from Digital Loggers is very simple to implement. No hacking up AC power wires, no involving a Raspberry Pi, etc. It is literally just a pair of wires going from your RAMPS or Rambo or whatever control board you have to the relay. Then you add a single command to your starting and ending gcode that you generate from Estlcam, Fusion 360, or whatever you’re using to create your tool paths. It’s very simple and elegant.February 7, 2019 at 2:35 pm #87981February 7, 2019 at 2:42 pm #87984
Barry, and Heath have it right. The relay board you posted is pretty neat, but it won’t be controlled by Marlin, it would have to be controlled by the pi. Sorry I sent you down the rabbit hole with my Thingiverse link.
That relay board has relays that say 10A at 250VAC, so those are probably mechanical, not SSR. That would be an ok relay for this application, since the dewalt is 600W at 120VAC, or about 5A.
The IoT relay (especially at $27) is a better choice. No AC wiring needed, and it will be controlled by Marlin.
For example, turning the fan on is M106 S255:
M107 will turn it off. Your gcode would just have to add in the M106 command at the top and the M107 command at the bottom. You can do this with a text editor, but it’s more convenient to just make the program that’s making the gcode (like estlCAM) insert those commands for you.
If you wanted to do the pi solution, then you’d have to run octoprint, and configure it to turn on and off that pin when it started or stopped a job. That’s basically what I’m describing my TV tutorial.
FTR, I run octoprint on all my prints, and I haven’t had a problem with a job not finishing due to octoprint. I’ve been using it for more than two years without problems. But there are some problems that could cause instability, like a bad USB cable, having an insufficient power supply, or even running the GUI on the pi while printing (it really should be headless).February 7, 2019 at 3:05 pm #87991
That reminds me, I really need to get my relays wired in. I bought two of them about 6 months ago to put on both routers, and haven’t gotten around to it…February 7, 2019 at 3:19 pm #87996
I have my RPI running only octoprint without raspian or anything, but the lack of power could have been an issue. I now use a power cord instead of a mini usb to basically a phone charger. I think im going to buy it. I originally tried to universal g-code sender via the pi for marlin on my rambo v1.4, but it looks like it won’t let me. Sucks, but no big deal. Just seems like a way better option. I had a pi and a screen already. Think i will just use octoprint and the iot relay you have. Looks like a sweet deal.February 7, 2019 at 3:25 pm #88000
I found it for 19.99 on amazon. Shipping on the man site is 26 bucks and the item is 24. kinda insane. With prime, ill get it for less than half the cost.February 7, 2019 at 3:26 pm #88001
Will it also be able to regulate speed or will i via the software?February 7, 2019 at 3:35 pm #88003
Will it also be able to regulate speed or will i via the software?
No, that’s a whole different animal. This is just on or off.February 9, 2019 at 3:25 pm #88367
so, i got the iot relay, wired up some lights on one fan, a 40mm fan on another, and the router on the hotend. I get a failed error. E1 heating failed specifically. Could it be lack of thermistor or am i demanding too much power from the power supply? I have an atx psu i could use, but don’t want to try it if that’s not the issue. Any ideas?
18:21:56.454 : echo:DEBUG:INFO,ERRORS
18:22:27.659 : Error:Heating failed, system stopped! Heater_ID: 0
18:22:27.666 : Error:Printer halted. kill() called!February 9, 2019 at 3:38 pm #88369
The heaters don’t work like the fan. They use the thermometer to decide when to heat. They have a lot of checks since a runaway heater is a fire hazard.
The thing you could do is remap the heater pin to something else, like pin 70, then configure the board with more fan pins and set them to the original heater pin. Then you can turn stuff on with M106 S255 P2 or P3.February 23, 2019 at 9:42 am #90467
You’ll have to edit firmware a little. Either remap the pins, OR comment out these two lines in configuration.h:
With those lines enabled, the firmware will look for changes to the temperature when the heaters are enabled. It doesn’t see a change, so assumes a problem and shuts everything down for safety. Necessary on a 3D printer, but not for our MPCNC (unless you’re also using it as a 3D printer). Commenting out those lines disables that.February 27, 2019 at 1:51 am #90968
I used this mechanical relay from Amazon:
It costs about 8 dollars.
Uses 12V DC to control 120VAC power. I bought three. I use one for my dewalt router, one for my shop vac and the third I have set up with an emergency stop button to interrupt power to ramps board (when it loses power it simultaneously stops motion of the motors and turn off relays to router and vac).
I changed the definition in Configuration.h of marlin to #define MOTHERBOARD BOARD_RAMPS_14_EFF and refreshed the firmware to ramps 1.4
The relays are controlled through 12V output on D8 and D9 on ramps 1.4.
Then the control of the relay is with Gcode such as M106 P0 S255 to turn on the relay 1 and M106 P0 S0 to turn it off; and M106 P1 S255 to turn on relay 2 and M106 P1 S0 to turn off relay 2.
1 user thanked author for this post.
You must be logged in to reply to this topic.