Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Administrator bolsoncerrado's Avatar
    Join Date
    Nov 2014
    Posts
    3,332
    Post Thanks / Like

    Converting 12v/24v power supply to remote (G-code) switching


    Converting 12v/24v power supply to remote (G-code) switching


    by MindRealm









    Hi everyone!


    This Instructable shows you how to remotely switch your 12v or 24v power supply, using G-Code or by adding buttons in Pronterface. The process voids the warranty on the power supply, but they are only around $25 so not the end of the world if it dies, right?

    This projects should cost less than $5.00!

    A necessary word of caution: During this conversion, you will be modifying the power supply by relocating the line-side fuse, which requires some confidence in soldering and common sense. If you follow the instructions carefully, the process is easy and only takes around a half-hour.


    You will need the following parts and tools:


    • Soldering iron
    • Solder
    • #2 Phillips screwdriver
    • 1/8" flat screwdriver
    • Heat gun or lighter
    • 3/16" heat shrink tubing
    • 18ga. stranded wire
    • 3- or 4-conductor 24ga cable (I used a stranded telephone wire)
    • 1/4" thick self-adhesive rubber feet (purchased mine at Lowe's)
    • Dupont connectors: two female 1x1 and three female 1x2
    • 5v relay module (search eBay for "Arduino relay module")


    Before you begin, get all these things together and unplug the power supply from the wall.

    As with any project, you must exercise care and diligence. I cannot be responsible for any damage or failure due to these instructions. I have performed this modification and have had zero problems.


    Step 1: Open the power supply and remove the circuit board





    Disconnect the power supply from the wall outlet. (...just in case you didn't already!!)


    1. Disconnect the power cord wiring and the 12v (or 24v) wiring from the power supply terminals. Keep track of where they go so you can put them back later!
    2. Remove the six Phillips screws along the lid of the power supply. Do not remove the screws from the fan.
    3. Remove the cover and unplug the fan from the board. (You will need to cut the "inspected" label)
    4. Remove the center screw from each of the two heat sinks, holding the bracket so it will not turn or fall onto the board.
    5. Remove the two remaining screws from each heat sink and life the aluminum out of the chassis, making sure not to detach the rubber insulator. (Careful not to touch the heat sink compound or it will get all over the place!)
    6. Remove the five Phillips screws from the circuit board. (one on each corner and one in the middle)
    7. Remove the circuit board from the chassis.

    The fuse is located right beside the L terminal, where the AC hot wire goes (see photo)


    Step 2: Remove the fuse





    Now we'll remove the fuse. Be careful not to damage it as it will be needed later!


    1. Flip the board over and locate the two leads that are attached to the fuse and heat them to allow removal of the fuse. Either desolder them with solder wick or a vacuum tool, or melt one end at a time while lifting the fuse away from the other side of the board. DO NOT use your fingers or you will get burned!!
    2. Strip and tin each end of a short length (6-8 inches) of 18ga stranded wire. (I used left-over wiring from my hot end heater!)
    3. Solder the ends of the wire into the two holes where the fuse was removed.



    Step 3: Put the fuse back in the circuit









    1. Cut the wire approximately 1-1/2" from the circuit board on the side that is near the screw terminals.
    2. Strip and tin the ends of the wire where you just cut it.
    3. Solder the ends to the fuse as shown, making sure NOT to hold the fuse with your fingers while soldering it.
    4. Cut the wire in the middle, so that each end is the same distance from the circuit board.
    5. Slide two piece of 3/16" heat shrink tubing on the fused wire to insulate the fuse as shown. Apply heat to shrink the tubing.




    Step 4: Prepare the wire for connection to the relay







    1. Route the two wires away from the screw terminals, cutting them both even with the black component marked BD1 on the board, as pictured.
    2. Strip and tin the ends of the wires.

    Not that I used another small piece of heat shrink tubing to keep the wires together. This is not necessary, but keeps the wiring tidy.




    Step 5: Prepare and connect the relay














    1. Apply two self-adhesive rubber feet to the bottom of the relay module, to serve as a spacer and to keep the solder side of the module from shorting against anything.
    2. Locate the relay module on top of the black component (BD1) and the neighboring capacitor (C10).
    3. Connect the two wires to the COMMON and NORMALLY-OPEN terminals on the relay module.
    4. Prepare the relay control wiring by installing female Dupont connectors as pictured. If you are using a single-relay module, you will only use three wires. Make sure to cut the unused wire out of the cable, or fold it back onto the cable and insulate it.
    5. Connect the relay control wiring to the pin header on the relay. I bent the pin header over some to ensure that the wiring would not be pinched by the chassis cover. (pictured on the next step)

    Note here that I used a relay module with two relays. This is because I didn't have a single-relay module on hand. I simply left the second relay screw terminals vacant. I'll either use it later or replace this module with a single-relay module at some point.

    • A single-relay module requires three wires: 5v, GND and signal
    • A two-relay module (as pictured) uses four wires: 5v, GND, signal 1 and signal 2.

    Also, I made a point to connect the fused wire to the normally-open terminal and the non-fused wire to the common terminal. This is a small safety measure that prevents the normally-closed terminal from being powered when the relay is not energized. You can connect the wires either way, as long as you use common and normally-open.





    Step 6: Reinstall the circuit board





    1. Place the circuit board back into the chassis, making sure that none of the new wiring is pinched or routed beneath the board.
    2. Place the two aluminum blocks back between the components and the chassis, making sure that the rubber insulators are touching the components, NOT the chassis. Reinstall the four Phillips head screws to secure the heat sinks.
    3. Hold the heat sink brackets and loosely reinstall the two long screws. Do not tighten them yet.
    4. Reinstall the five Phillips screws in the circuit board (one in each corner and one in the middle)
    5. Tighten the two heat sink bracket screws.
    6. Route the control wiring out of the chassis, exiting near the power LED and voltage adjustment pot.
    7. Plug the fan back in and reinstall the cover.

    The cover will fit tight over the relay module due to the rubber feet serving as spacers.




    Step 7: Connect the wiring







    1. Reconnect the power cord wiring and the 12v (or 24v) output wiring to the power supply.
    2. Cut the control wiring long enough to reach the Ramps board. I secured my wiring to the 12v wiring thar goes from the power supply to the ramps board.
    3. Install Dupont connectors to the other end of the control wiring as shown. (Again, I used a two-relay module so I had four wires. If using a single-relay module, you will only have three due to not having the fourth one connected to the module.)
    4. Connect the power terminals (mine are 5v=red and GND=black) to the servo power and ground terminals as shown. (make sure your polarity is correct or the module will not work)
    5. Connect the control wire (mine is green) to the PS-ON pin, right beside the reset button.

    That's it! The wiring is complete. Now to test your work...




    Step 8: Test your work






    Now the moment of truth.
    If you followed the instructions, insulated the fuse properly, and installed the heat sink insulators correctly you may now plug the power cord into the wall outlet or power strip. Don't worry if the power supply doesn't come on - it is not supposed to.
    Re-confirm that everything is connected and connect to your printer in your host application (Pronterface, Repetier, etc.) so you can pass G-Code commands to it. If the power supply comes on when you open your application, that's okay.

    1. At the G-Code prompt, type M80
      This turns on the relay module, resulting in a click and the power supply should come on. (...it may already be on)
    2. Type M81
      This turns off the relay module, resulting in another click and the power supply should go off.

    If there is a problem, recheck your wiring and confirm whether the relay module is clicking when passing the M80/M81 commands.
    I added buttons in Pronterface to evoke the commands, as pictured.




    http://www.instructables.com/id/Conv...e-sw/?ALLSTEPS

  2. #2
    Expert 3D Printer
    Join Date
    Dec 2014
    Posts
    305
    Post Thanks / Like
    I am doing the same but from the RaspberryPi and Octoprint and not from the printer it self.
    The main reason I do this is because of the connection issues.
    If the printer shuts itself off, the USB connection will not be disconnected gracefully, and it will be harder to connect the printer again to the computer.

    Using the Octoprint (or something else) to shut the printer AFTER disconnecting it, it always work perfectly to bring it up again.

    Also, (probably even more importantly) to turn the printer ON, you can't do it with this way since the printer is Off

  3. #3
    Administrator bolsoncerrado's Avatar
    Join Date
    Nov 2014
    Posts
    3,332
    Post Thanks / Like
    Can you share your solution for the RasPi combo? I'm interested, also in adding it to the menus.

    Thanks!

  4. #4
    Expert 3D Printer
    Join Date
    Dec 2014
    Posts
    305
    Post Thanks / Like
    I am going to replace my relays from the 5V to the 3V version and making a better case for all of those.
    I will share the instructions for everything when I get the hands on it.

  5. #5
    Administrator bolsoncerrado's Avatar
    Join Date
    Nov 2014
    Posts
    3,332
    Post Thanks / Like
    Why the voltage version change?

  6. #6
    Expert 3D Printer
    Join Date
    Dec 2014
    Posts
    305
    Post Thanks / Like
    The RaspberryPi pins are 3V.
    To have 5V I need to use additional supply to the relay, also coming from the RPi, but its an extra cable and I like things very optimised. The 5V from the RPi measures 4.2V, so I guess it might be a good idea to use the 3V pins since those measure 3.1V.

    My 5V relays got 'stuck' at the ON position, maybe because the arc generated by the 350W power supply is too much for these (i tried 2 already).
    So I am going to try the 3V version to see if they are a bit resistant.

  7. #7
    3D Printer Noob
    Join Date
    May 2015
    Posts
    1
    Post Thanks / Like
    bolsoncerrado, this is an excellent step by step tutorial. You’ve actually gone into the details of how to place the circuit board inside the assembly and how to connect various terminals which to be honest, most people don’t do. Now I’m just waiting for Joao’s guide as well because together, you can actually present a general solution for clients.

    quick turn pcb assembly
    Last edited by ricardo84; 05-12-2015 at 06:26 PM.

  8. #8
    Administrator bolsoncerrado's Avatar
    Join Date
    Nov 2014
    Posts
    3,332
    Post Thanks / Like
    What are you now missing ricardo?

  9. #9
    Banned
    Join Date
    Jan 2016
    Location
    Moscow Russia, Naples USA
    Posts
    67
    Post Thanks / Like
    We are looking for gcodes for engraving to put on our web site:
    http://endurancerobots.com/products/...r-engraving-2/

    We already have some on Endurance web site. So feel free to send gcodes so we can upload them

  10. #10
    3D Printer Noob
    Join Date
    Jun 2016
    Posts
    1
    Post Thanks / Like
    Hi everyone...i am new user here. I worked with Raspberry Pi during my hobby projects and as per my knowledge to have 5V you need to use additional supply to the relay, also coming from the RPi, but its an extra cable and I like things very optimised. The 5V from the RPi measures 4.2V, so I guess it might be a good idea to use the 3V pins since those measure 3.1V. It may happen that the 5V relays got 'stuck' at the ON position, maybe because the arc generated by the 350W power supply is too much for these.
    Last edited by JoeDini; 12-01-2021 at 09:13 PM.

 

 

Similar Threads

  1. BFB (G-Code) for Cube 3
    By MegaloDon in forum Cube3
    Replies: 163
    Last Post: 02-17-2023, 04:36 AM
  2. Power Supply Fuse?
    By BobenhamHotspur in forum Rapide Lite 3D Printers
    Replies: 15
    Last Post: 11-04-2019, 10:06 AM
  3. Rapide Lite 200 won't power on
    By MichaelCalhoun in forum Rapide Lite 3D Printers
    Replies: 2
    Last Post: 01-28-2015, 04:09 PM
  4. Power supply exploded (short circuit)
    By Joao in forum Rapide Lite 3D Printers
    Replies: 23
    Last Post: 01-28-2015, 08:06 AM
  5. Remote/Wireless Printing
    By BobenhamHotspur in forum Rapide Lite 3D Printers
    Replies: 11
    Last Post: 01-08-2015, 07:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •