Control a relay from phone to shotdown a printer

A place to talk about user-made mods and upgrades to their machines
Post Reply
duvdev
Printmaster!
Posts: 167
Joined: Wed Aug 13, 2014 5:23 am

Control a relay from phone to shotdown a printer

Post by duvdev »

Hi all,

I have 6 rostock max v2 printers in my shop.
I a looking for a way to be able to shot of a printer from my phone if i see a fail from the cemeras I have.

can it be done?
I saw on the net some relay bords with wifi connection that can be controlled from a cellular device.
thanks.
bob64
Printmaster!
Posts: 89
Joined: Sun Jul 20, 2014 8:45 pm

Re: Control a relay from phone to shotdown a printer

Post by bob64 »

Yes. There are tons of products that can control a relay. The question is: do you want this control to be visible on the internet or not.
Personally, I have a smartthings hub, so I have an outlet I can control via an app on my phone. However, you can also use a combination of teamviewer + computer to access your internal network and from there control any internal ip'd relays.
Rostock Max V2 with mods:
E3d v6 with 713maker mount & e3d titan extruder
Tricklaser CF arms, heat spreader, tricktrucks, fly-n-strude, metal carriage & effector
Duet v.8.5.0
24v MeanWell 750w PS & Cydom D1D40 SSR in parallel with stock 12v PS
duvdev
Printmaster!
Posts: 167
Joined: Wed Aug 13, 2014 5:23 am

Re: Control a relay from phone to shotdown a printer

Post by duvdev »

Hi,

How did you connect the relayes to the printer?
User avatar
DeltaCon
Printmaster!
Posts: 616
Joined: Sat Nov 14, 2015 5:01 am
Location: Wessem, The Netherlands
Contact:

Re: Control a relay from phone to shotdown a printer

Post by DeltaCon »

If by relay you mean a disconnect from the mainpower, I am not sure that is what you want. Ofcourse anything is better then burning down the house, but cutting power to the hotend AND fan keeps the hotend overshooting it's temp for a while. And ofcourse without the peekfan running. So that's a certain clogging... If you want to be able to stop the printer leaving it's power intact, I guess you should take a look at Astroprint or Octoprint, but I have no experience with neither of them.
I am DeltaCon, I have a delta, my name is Con, I am definitely PRO delta! ;-)
Rostock V2 / E3D Volcano / FSR kit / Duet 0.6

PS.: Sorry for the avatar, that's my other hobby!
User avatar
mhackney
ULTIMATE 3D JEDI
Posts: 5412
Joined: Mon Mar 26, 2012 4:15 pm
Location: MA, USA
Contact:

Re: Control a relay from phone to shotdown a printer

Post by mhackney »

DeltaCon, you should not be considering doing this if your concern is burning down the house while you are away. The OP asked about aborting after a failed print. Again, do not print when you are not physically there, you are literally playing with fire. However, if you have a safe controlled environment (I have 2 printers on metal worktops not near any combustion source with IR monitoring to trigger extinguishers and cut power) then you could consider this. But again, why would you have a print fail after the first few layers are printed? You would be present for that. If you are running close on end of filament, replace it. If you have an extruder jam, you need to spend time chasing that down. I haven't had an aborted print (PLA or ABS) in well over 2 years due to an extrusion failure or popping off the build plate. It seems like a problem looking for a solution.

As for relays, what did you want to do? Simply cutting mains power to the printer would accomplish this however, it leaves the hot nozzle in contact with the part until it cools. That could be problematic. A relay in this scenario would be used to activate an SSR to disable power.

Ideally, you would want to inject safe shut own code into the controller:

M107 ; turn off the fan
M104 S0 ; turn off the hot end
M140 S0 ; turn off the bed
G28: home

and then turn off the printer as above.

To do this, you could also use a relay to trigger an extra pin on your control card. Ideally this would be active low so that when in normal operation, the pin is held high. That way if a wire gets disconnected or some other electrical or mechanical issue appears, the pin is brought low (i.e. no power) and the safe shutdown code is run. Stuff like this is easy to do on Smoothie and Duet. Possible on RAMBo, you could use one of the unused endstop pins and treat this routine like an endstop.

And as DeltaCon also mentioned, you could use a remotely accessible web control interface like Octoprint. Of these, I suspect this option would be much easier to implement for your scenario and you could stream the video right to Octoprint as well.

Sublime Layers - my blog on Musings and Experiments in 3D Printing Technology and Art

Start Here:
A Strategy for Successful (and Great) Prints

Strategies for Resolving Print Artifacts

The Eclectic Angler
Xenocrates
ULTIMATE 3D JEDI
Posts: 1561
Joined: Wed Sep 23, 2015 2:55 pm

Re: Control a relay from phone to shotdown a printer

Post by Xenocrates »

Mike, I disagree on a few points personally.

Firstly: You don't need an SSR to handle the hotend power. it's less than 5A, which is well within most Ice-cube relay's capacity. And since it's an emergency cut-out, it doesn't need a whole lot of switching endurance (It will only switch under load when E-stopping, and will switch without load on startup (If you set it up such that a lack of signal is the safe condition, which is only smart)

Secondly: I would not turn off either fan, especially not before the hotend. Hotend off, home printer, cut mains power, in that order would be my method. It means you need to go to it to reset it (If your design is built right, you should have a latch setup such that a button must be hit to re-arm the master control relay). Turning off power to the bed is unlikely to move the temperature quickly, and means you need an SSR for it (Which you won't have unless you have a 24V bed, in which case you could either cut-off the signal to the 24V SSR, or the power to the 24V supply (Assuming you have two supplies))

But I do agree for the most part. Things should not fail beyond the first few layers (If they do, you should chase that error down, and deal with cleaning up some after that), unless there is a mechanical/electrical issue. If If I were you, I would think about building an enclosure for your six printers. There are enough of them to make it worthwhile to go ahead and build a bench for them from 80/20, and use aluminum or steel plates for the walls of it. Put a power plug in each cell (Divide the main area into a cell for each printer), using a steel junction box. Add a second box for ethernet (Also steel). Buy plenum rated cable for the connections to the cells (It's fire rated, and available for both data and power). Use steel conduit to connect the boxes, and then have a nice output where you have a switch for your ethernet, and a high- amperage connection for your printers. use a twist lock plug to connect the workbench to power (Don't mess with multiple extension cords, just get a washer/dryer socket and appropriate cord. You need a 18A or higher rated connection and breaker for it. I would go thirty on the plug and 25 on the breaker personally). This way you have control over conditions in each print cell, can cut power off well, and have a very fire-resistant setup.

Beyond that, I suggest either a ras-pi with octo/astroprint, or a Duet, so that you can connect this whole thing with an 8 port switch and ethernet, while having control of individual printers about as well as with matter control. Duet also gives nicer prints and auto-calibration.
Machines:
Rostock Max V2, Duet .8.5, PT100 enabled E3D V6 and volcano, Raymond style enclosure
Automation Technology 60W laser cutter/engraver
1m X-carve router

Sic Transit Gloria Mundi
01-10011-11111100001
User avatar
DeltaCon
Printmaster!
Posts: 616
Joined: Sat Nov 14, 2015 5:01 am
Location: Wessem, The Netherlands
Contact:

Re: Control a relay from phone to shotdown a printer

Post by DeltaCon »

mhackney wrote:DeltaCon, you should not be considering doing this if your concern is burning down the house while you are away.
Michael, I am not the one considering this, I am merely warning, like you do ;-) I never print when I am not at home. Sometimes it is tempting, but I don't have a fireproof workplace like you do :mrgreen:
I am DeltaCon, I have a delta, my name is Con, I am definitely PRO delta! ;-)
Rostock V2 / E3D Volcano / FSR kit / Duet 0.6

PS.: Sorry for the avatar, that's my other hobby!
User avatar
teoman
ULTIMATE 3D JEDI
Posts: 1783
Joined: Sat May 24, 2014 5:43 pm

Re: Control a relay from phone to shotdown a printer

Post by teoman »

Well, with what i know now,

I would get an esp8266 and attach an arduino relay to it (for the hotend power only, if not a better relay for the entire printer).

Connect the esp8266 to an mqtt server (code is readily available, adafruit is ok in my opinion).

Esp8266 costs 3.5 usd and the relay is also a couple of bucks.


I think this would be the easiest and quickest solution to what you are looking for, if that is indeed what you are looking for after the posts above.
When on mobile I am brief and may be perceived as an arsl.
User avatar
mhackney
ULTIMATE 3D JEDI
Posts: 5412
Joined: Mon Mar 26, 2012 4:15 pm
Location: MA, USA
Contact:

Re: Control a relay from phone to shotdown a printer

Post by mhackney »

Xenorates,I wasn't referring to using an SSR to disable hot end power, I was referring to using it to shut down the mains power to the printer, shutting everything down. I agree that a simple relay can handle the hot end. If the goal is, as the OP seems to be asking, to stop the printer from running in the case of a failed print, then shutting off the hot end is not going to accomplish that. Shutting off the mains will shut down the entire printer, albeit not very gracefully.

I agree with you re: not turning off the hot end fan. That is not the hot end fan code, that is the part cooling fan code. Ideally, I agree, you want the hot end fan to stay one even if the printer is powered down. More difficult to achieve though. My hot end fans are thermostatically controlled, I think RAMBo supports that too.

I really think for his scenario, using Octoprint and shutting down the printer gracefully makes the most sense and would be easy and inexpensive.

Sublime Layers - my blog on Musings and Experiments in 3D Printing Technology and Art

Start Here:
A Strategy for Successful (and Great) Prints

Strategies for Resolving Print Artifacts

The Eclectic Angler
User avatar
Eaglezsoar
ULTIMATE 3D JEDI
Posts: 7185
Joined: Sun Apr 01, 2012 5:26 pm

Re: Control a relay from phone to shotdown a printer

Post by Eaglezsoar »

“ Do Not Regret Growing Older. It is a Privilege Denied to Many. ”
Post Reply

Return to “Mods and Upgrades”