1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Auto Off After Print, Using Custom Gcode, Micro Switch N Spring.

Discussion in 'Mods and Upgrades' started by Qhuy, Jul 23, 2014.

  1. Qhuy

    Qhuy New Member

    Joined:
    Apr 14, 2014
    Messages:
    24
    Likes Received:
    13
    Turn off your printer automatic, as simple as using custom gcode, micro switch and a spring. Total cost for me is $0.00. You can watch on youtube from the link below.




    Things that you need for this set up:

    a microswitch no/nc - $4.00 (got mine from a broken microwave door)
    spring - $2.00 (using a spring from a broken pen)
    2 feet of wires (got mine from a broken microwave, again)
    print this: http://www.thingiverse.com/thing:404906
    5 screws.
    1 bolt and nut.


    instruction:

    [​IMG]


    [​IMG]

    cut the spring into half.

    [​IMG]

    [​IMG]

    put four screws, bolt and nut like the picture above.

    [​IMG]

    remove your power switch to give you some space to remove your power supply.

    [​IMG]

    using a pry bar to remove the power supply

    here is the video how to remove the power supply



    [​IMG]


    [​IMG]

    next using a 1x4 and then the 2x4 into the open gap to push the power supply out.

    After using the 2x4, you are pretty much using your hand to push your power supply out. it will come out easily.

    [​IMG]


    [​IMG]

    Wiring your wires as above picture, as i remove the hot wire off the power supply and connected it to one of the wire that run to the microswitch and the return from microswitch wire go into the power supply.

    put the power supply and the power switch back

    [​IMG]

    connect the two wires that we connect one to the power supply and the hot wire to the microswitch.

    [​IMG]

    now slide the microswitch into the Robo AutoOff Switch box and slider.stl . and screw the last screw to secure the microswitch to the slider box but don't over tight it.

    [​IMG]

    remove the zip tie that hold the extruder hotend cable on top of the enclose and remove zip tie holder.

    [​IMG]

    secure your Robo AutoOff Switch box to the enclose.

    [​IMG]

    put your Robo AutoOff Switch box Z Plugin.stl part at this area.

    [​IMG]

    here how Robo AutoOff Switch box Z Plugin.stl seat


    Now we go to Custom G-code add and adjust the number to your Z axis high to touch the microswitch

    Warning: i will not responsible if you are adding the Z axis number higher than your spec. build area . if you excess your spec. built area, that will cause your enclose to brake. Please adjust your Z axis high 1mm at a time to find a sweet spot that turn your machine off. For my machine, the Z axis high is 203.

    Also: Please move your X axis to X80 that way the extruder cable doesn't get stuck when we start another print later on.

    below is the example:

    M104 S0 ; turn off temperature
    G1 X80 Y200 Z200
     
    #1 Qhuy, Jul 23, 2014
    Last edited by a moderator: Jul 23, 2014
    5 people like this.
  2. SteveC

    SteveC Well-Known Member

    Joined:
    Jun 12, 2013
    Messages:
    894
    Likes Received:
    316
    Qhuy,
    Very clever and cool shutdown scheme. I like the idea of my printer shutting down in the middle of the night after a 5 hour print.

    For others who may be interested Tonycs and I made a different print end shutdown design using the P_ON pin on the RAMPS board and a 5V opto isolated relay and a second power switch. The M80 and M81 Gcode can switch that pin low and high. This is the thread but it is a bit messy: http://forums.robo3dprinter.com/ind...when-print-is-finished.1620/page-2#post-12738

    I used this relay http://www.ebay.com/itm/1-Channel-O...794?pt=LH_DefaultDomain_0&hash=item4acf24557a but the listing has expired. There are many similar on ebay shipped from both the US and China.

    Similar current listing:
    http://www.ebay.com/itm/1-Channel-I...584?pt=LH_DefaultDomain_0&hash=item35d63003b0

    This code then turns on and off the main power supply.
    • The G-c0de startup script then contains:
    M80 ;Turn on P_ON - Pin goes to GND
    G4 P5000 ; wait 5 seconds​
    • The G-code finish script contains:
    M81 ; Turn off P_ON - Pin goes to 5V
    I think my current code also makes a loud "beep" noise from my XXL LCD on shutdown.
     
  3. Qhuy

    Qhuy New Member

    Joined:
    Apr 14, 2014
    Messages:
    24
    Likes Received:
    13
    SteveC,

    Thank you. Honestly Your and Tonycs' auto off inspire me.
     
  4. ssshake

    ssshake Member

    Joined:
    Mar 15, 2014
    Messages:
    109
    Likes Received:
    17
    I took a different approach to this, which is much easier if you have the equipment laying around but probably cost prohibitive to start from scratch. I just used a 3 prong X10 appliance module and my existing home automation controller/setup to toggle the power on/off for the printer. This allows me to directly toggle the power in octoprint and view the state change via webcam. But also this allows me to script a command when a print finished (event scheduler in octoprint) to issue an API call to my homeautomation controller.

    Still trying to think of how best to intelligently determine this. Like IF no activity in 10 minutes, power down, if activity, interrupt power down timer. On click "print" button, power up printer.

    [​IMG]
     
    2 people like this.
  5. SteveC

    SteveC Well-Known Member

    Joined:
    Jun 12, 2013
    Messages:
    894
    Likes Received:
    316
    I love all the different approaches to this problem. For the mechanically inclined there is the self switch off. For the electrically inclined there is the relay approach. For the software savvy there is the raspberry pi script and the X10 module.

    With the Raspberry Pi in the loop you could use OpenCV to recognise if a print is going badly or is just ugly and to halt it :).
     

Share This Page