Welcome to Our Community

Some features disabled for guests. Register Today.

C02 Laser Controll

Discussion in 'Laser Cutters' started by Andreas Ritter, Sep 12, 2019.

  1. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
    I have been working on a co2 laser cutter and its now about time to start testing it. Its running off of an arduino uno and a cnc shield with grbl and that works fine with the total of 3 nema 17 motors(1x, 2y). Now i want to connect the co2 laser. The power supply I have will take a pwm input but i am not quite sure how to do that with the uno+shield. Also, what free software is there that i could use?
    Here are the links to what I have:
    arduino + shield- Arduino CNC Kit w/ UNO + Shield+ Stepper motors DRV8825 Endstop GRBL
    laser power supply- 50W CO2 MYJG Series Power Supply (Green Shell) MYJG-50W 110/220V
    I don't have very much experience with arduino so any help would be greatly appreciated.
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2013
    Messages:
    1,555
    Likes Received:
    824
    so that power supply has simple on/off control via one of the input pins at TTL level (that means 5v for on and 0v for off).

    you can connect that enable pin to the spindle output on the shield.

    here is the complication ... older versions of GRBL used a different pinout to the newer version and most cnc shields use the old pinout and just a few use the new pinout. so you need to follow the Arduino pin 11 into the shield and see where it comes out.
    if it is a new shield it will be labelled Spindle PWM , if it is an old (common) shield it will be labelled Z-limit.

    GRBL defaults to being able to output a PWM signal on that pin 11, this means it turns the 5v on and off rapidly at varying spacing to achieve a varying output voltage form 0 to 5v. This would be used to set the speed of a router or the brightness of the laser if your power supply could do variable power. but it cannot so you have to do off and on and make sure your Gcode does not try to set something like half power which may damage the PSU.

    GRBL defaults to a speed range of 0 to 1000. So what you want in your Gcode is
    'M5' for laser off
    and 'M3 S1000' for laser on. (at the simplest level)

    However, GRBL has a special laser mode where it does some clever stuff for you.
    set $32=1 and now GRBL only needs one M3 S1000 at the beginning of the code and one M5 at the end of the code.
    Now GRBL will turn the laser on or off depending on the motion code used, so off for rapid motion (G00) and on for G1/2/3 'cutting' codes. CAM software like OpenBuilds CAM Gcode Creator - Public Beta can do this for you, no need to write Gcode yourself, but understanding it will help you fix any problems you may have.

    but the important bit is the that S1000 which tells GRBL to turn the laser full on. any lower number may damage the PSU.
     
  3. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    Also, checkout Advice on CO2 Laser Build where I explain what to do with IN, and WP.
    You can usually PWM into TH though even if the PSU doesnt say so. They tend be standardised
     
  4. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
    So could I still have power control over the laser?
     
  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    Tentatively yes, 90%+ of the chinese PSUs I've worked with happily worked with PWM into TH, to modulate the power, with manual override potentiometer on IN instead (also thats how the K40 and K50s are wired from the factory)
     
  6. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
    Sorry for the late response, I have been busy with school. So I should be able to connect the Z-axis limit to TH, connect the cnc shield ground to the power supply G, and hook up the laser tube itself and it should work? Do I need a water detection, or do I need to bridge it, or just leave it alone? Also, what software is easiest to configure with my setup?
     
  7. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    Worth testing yes

    WP to GND bridge or a flow switch needed, I wouldn't risk a bridge, $3 flow switch is cheaper insurance than replacing a cracked tube because the water stopped flowing from a little kink in the hose (;
     
  8. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
  9. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    1,471
    Likes Received:
    674
    Don't forget what @David the swarfer said;

    "here is the complication ... older versions of GRBL used a different pinout to the newer version and most cnc shields use the old pinout and just a few use the new pinout. so you need to follow the Arduino pin 11 into the shield and see where it comes out.
    if it is a new shield it will be labelled Spindle PWM , if it is an old (common) shield it will be labelled Z-limit."
    Alex.
     
  10. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
    I am pretty sure that my shield is an older one, there is no spindle PWM. I will check my board later but do i need to change anything in the GRBL config? I think I have the newest version of GRBL
     
  11. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
    Could you send me a link to a flow switch that would work?
     
  12. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    Search for "laser flow switch" you get replacements on the usual online sources
     
  13. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    Nah you already had it before Alex made you doubt yourself. Use the z limit as pwm pin, only difference is the two pins swopped. V3.5 shield got knocked off by China, but the v3.5.1 and up has the right pinout (not cloned by china, only available from the original designer, Protoneer (Bertus Kruger))

    The CNC shields all has issues with only supporting small motors due to pololu footprint drivers (allegro, tmc drivers max 0m6-0.8a before cooling issues, drv88xx drivers max 1-1.2a before thermal shutdown

    BlackBox has 4A drivers that runs big nema23s if it has to, or properly and speedily anything smaller, which for lasers is important, maximum acceleration needed to prevent charring and get even grayscale engraving
     
  14. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
    okay so it's been a while, but i got started on a wiring diagram and I am a bit confused. So laser tube hookups I understand, along with the ground neutral and line from mains voltage. Does the water flow switch open when water is flowing or close? Do I use the 5v output from the laser power supply on one side of the switch and then the other side goes to the the water protection terminal? Then the z axis limit switch goes to power control signal (0-5v) and connect ground from arduino to signal ground(terminal 4)?
    Is there something I am missing or am just totally wrong? Thanks.
    Screenshot (96).png
     
  15. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    Closes when water is flowing. Usually wired between WP and G
    5v is used for a potentiometer to override power

    Had me there till I remembered the fake chinese CNC shields never updated to Grbl 1.1 pin spec

    Excuse if I use the correct terms

    PWM pin from GRBL goes into TH

    Wire up a potentiometer with the Wiper going to IN, left side going to G, and right side going to 5v. Recommend a 10-turn pot for finer control

    The power out = (% of PWM * scale of voltage on IN between 0-5) * laser wattage

    So with the pot wired in, its a nice on the fly override if the job is underway and you need to dial the power up/down a bit for a nicer photo engraving.

    If you don't want to use the Potentiometer, then wire IN to 5V
    Then power out = (% of PWM * [100% as IN=5v]) * laser wattage
     
  16. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
    okay thanks that helps, also a cool idea with the potentiometer. Does this awful wiring diagram of mine look about right?
    IMG_20200509_114048.jpg
     
  17. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    :) no, its missing labels for the pins so now I have to scroll up! :) lol

    Other than that, it looks spot on to me!

    Don't forget to add water first, that very tempting Test button fires even if WP/GND is closed! Have ruined tubes that way
    (or you can add another panel mounted Test button by wiring a Normally Open switch between TL (0v enable) and G (gnd)

    And don't skimp on the self-fusing silicon tape around any HV connections!
     
  18. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
  19. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    "should" but if you can, get a pro/sparky/etc in to help. That 20kV WILL kill you if touched. Keep one hand behind your back (so it can't run across your heart) and make sure frame is earthed properly
    More safety: Sam's Laser FAQ - Carbon Dioxide Lasers - lengthy but worthy read :)

    Home depot seems to block my country :) but something like https://www.walmart.com/ip/ZEDWELL-...ose-Pipe-Leak-Seal-Emergency-Repair/900333886 looks similar to what we get this side. Amazing stuff. Very stretchy and doesnt wrinkle, great for those glass posts on the tube.
     
  20. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551
    "should" but if you can, get a pro/sparky/etc in to help. That 20kV WILL kill you if touched. Keep one hand behind your back (so it can't run across your heart) and make sure frame is earthed properly
    More safety: Sam's Laser FAQ - Carbon Dioxide Lasers - lengthy but worthy read :)

    Home depot seems to block my country :) but something like https://www.walmart.com/ip/ZEDWELL-...ose-Pipe-Leak-Seal-Emergency-Repair/900333886 looks similar to what we get this side. Amazing stuff. Very stretchy and doesnt wrinkle, great for those glass posts on the tube.
     
  21. Andreas Ritter

    Builder

    Joined:
    Sep 12, 2019
    Messages:
    9
    Likes Received:
    0
    should I solder to the electrodes on the tube?
     
  22. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    4,271
    Likes Received:
    1,551

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice