Author Topic: How to connect Air Support valve to board?  (Read 1442 times)

Maarten65

  • Newbie
  • *
  • Posts: 43
    • View Profile
How to connect Air Support valve to board?
« on: April 02, 2020, 06:17:49 AM »
I have a EleksMana V5.2 and added Air Support with a compressor. A 12V DC valve let me open or close the tube.  At the moment I open and close the valve manually.  I was wondering if I could control this valve by the board directly, would be nice wouldn't it?



And if so, can T2Laser support this feature as well?

Greetings Maarten
T2 Laser v1.5y / GRBL  1.1e / Eleksmaker Mana V5.2 / windows 10 home, version 10.0.18362
Autodesk Inventor 2020 / Autocad 2020

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7271
    • View Profile
    • T2Laser
Re: How to connect Air Support valve to board?
« Reply #1 on: April 02, 2020, 06:57:39 AM »
Connect the 12VDC value (presumably a solenoid) to the blue OTHER (GND/M3) connection and then it will turn on whenever the laser is on. It can source around 0.5A safely so you may need to add a relay or SSR depending on the load. This does not require any software interaction other than the standard configuration.

Maarten65

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #2 on: April 07, 2020, 07:22:51 AM »
Thank you Zax, so ground/M3 is open when the laser is on.  My solenoid uses 1A so a relay is needed, but that is not an issue.
 This means that my solenoid will switch off every time the laser is moving to a new point when starting a new line. this happens hunderd of times in one project.
I was hoping I could use some kind of gcode to switch on/off a port from the board at the begin and end of the session. Then I can start all my session with 'Open air' , do the run and ' Close Air'.

Maarten
T2 Laser v1.5y / GRBL  1.1e / Eleksmaker Mana V5.2 / windows 10 home, version 10.0.18362
Autodesk Inventor 2020 / Autocad 2020

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7271
    • View Profile
    • T2Laser
Re: How to connect Air Support valve to board?
« Reply #3 on: April 07, 2020, 10:43:05 AM »
M3 should be ON (HIGH) from starting the job to the end as T2Laser (in default settings) does not switch it off and back on while running. You can check the G-code and see there's an M3 at the beginning and an M5 at the end (OFF command). 

Maarten65

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #4 on: April 08, 2020, 08:25:47 AM »
aha, this is exactly what I needed. Thanks for the command.
T2 Laser v1.5y / GRBL  1.1e / Eleksmaker Mana V5.2 / windows 10 home, version 10.0.18362
Autodesk Inventor 2020 / Autocad 2020

krypton

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #5 on: April 09, 2020, 04:31:53 PM »
Hi guys,
     This idea would be a good addition to my set up. I would definitely need a relay as my air assist is a 110VAC Harbor Freight  air brush. I am using the old Banggood control board, PM not TTL laser mod. Think it's the L7.
     How would I connect to the board ? The board has +12 v 2 wire connector and a VM 2 wire connector. Would these work??

Thanks,
Krypton..................

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7271
    • View Profile
    • T2Laser
Re: How to connect Air Support valve to board?
« Reply #6 on: April 09, 2020, 05:04:43 PM »
You would need to use the laser port which is 12VDC from the MOSFET, PWM using Nano pin D11. It won't be able to source much current and since it's PWM I would recommend using a solid state relay (SSR). If you only use the laser on full power and off (dithered or velocity modes) a low current relay would work OK.

krypton

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #7 on: April 09, 2020, 05:50:38 PM »
Thanks Zax,

   I'll give that a go. I should order another controller as my spare is probably 3 years old and dose not have the PWM mod access under the nano. So it goes more fun with an acceptable outcome................

Thanks,
Krypton................. 

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3222
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #8 on: April 10, 2020, 08:56:44 AM »
Post a picture of the board. If it is a L7 I posted some reverse engineered schematics.
SARCASM - Just one more service we offer here.

Maarten65

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #9 on: April 16, 2020, 04:00:35 AM »
M3 should be ON (HIGH) from starting the job to the end as T2Laser (in default settings) does not switch it off and back on while running. You can check the G-code and see there's an M3 at the beginning and an M5 at the end (OFF command).

I checked the g code and found this:
Code: [Select]
( Generated by T2Laser )
(  DXF2Gcode for Grbl  )
( Start Point: LL      )
( Frame Mode : Abs.    )
( X Maximum  : 42.3    )
( Y Maximum  : 33.2    )
( Laser Power: 255     )
( Vector Rate: 1000    )
( Rapid Feed : 2000    )
( Vector Name: Test laser r12.dxf )
G21
G90
F1000
M05
G01 X30.28 Y1.25 F2000
M03 S0
X42.28 Y1.25 M03 S255 F1000
X42.28 Y19.25 M03 S255 F1000
X30.28 Y19.25 M03 S255 F1000
X30.28 Y1.25 M03 S255 F1000
...
X15.96 Y28.95 M03 S255 F1000
X23.22 Y28.88 M03 S0 F2000
X23.1 Y29 M03 S255 F1000
M03 S0
M05
G00 X0 Y0

It explains why the relays is like a morse coder at the moment. :)

I switched laser mode on but same behavior.
Have I overwritten the default settings, what am I over looking here?

I also noted something strange about the release number of my controller. It says Eleksmaker v5.2 but doesn't looked precisely like the drawing from the wiki page show above.
My board has the text 'Motor (+-)' printed next to the connector in stead of (M3-GRND)

This the board I have (didn't buy it here but pic is the same):
https://www.tokopedia.com/awallaptop/eleksmaker-eleksmana-xyz-papan-control-cnc-3-axis-board-laser-3axis

Best regards,
Maarten Weers
« Last Edit: April 16, 2020, 04:21:18 AM by Maarten65 »
T2 Laser v1.5y / GRBL  1.1e / Eleksmaker Mana V5.2 / windows 10 home, version 10.0.18362
Autodesk Inventor 2020 / Autocad 2020

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3222
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #10 on: April 16, 2020, 06:25:23 AM »
Sounds like you are using the SPINDLE_PWM not the SPINDLE_ENABLE. I suspect that you will need to edit cpu_map.h and build the firmware to have both. The default on 328 CPU's is to use 1 pin for both. I've never tried this. Perhaps Zax has a better explanation.
SARCASM - Just one more service we offer here.

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7271
    • View Profile
    • T2Laser
Re: How to connect Air Support valve to board?
« Reply #11 on: April 16, 2020, 11:14:46 AM »
@Maarten65 The G-code is correct, it enables the output at the beginning and doesn't turn it off until the job is complete.

To use a separate spindle enable pin I am pretty sure you have to disable PWM mode, this is not going to work on your controller.

I can't think of another option at the moment.



Maarten65

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #12 on: April 17, 2020, 10:18:36 AM »
OK, then I keep using the manual switch.
Thanks for your responds.
T2 Laser v1.5y / GRBL  1.1e / Eleksmaker Mana V5.2 / windows 10 home, version 10.0.18362
Autodesk Inventor 2020 / Autocad 2020

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7271
    • View Profile
    • T2Laser
Re: How to connect Air Support valve to board?
« Reply #13 on: April 17, 2020, 10:38:54 AM »
I had a look at Grbl code, if you disable VARIABLE_SPINDLE then D12 becomes spindle enable. I don't know if this would work correctly as T2Laser may not be able to set spindle 0 for off and keep the enable pin on, so you may find it's no help.

Manual is problably easier but I am sure there's a way to do this, perhaps using the stepper enable D8 (this is nice as you can set a time out after all motion stops). The other option, and I suppose the correct one would be to use A3 (coolant) but unless you add M8 and M9 to the G-code it wouldn't be automatic. You could easily setup custom buttons for it or in a future update I can add an option to automatically enable and disable.

Maarten65

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: How to connect Air Support valve to board?
« Reply #14 on: April 19, 2020, 12:13:17 PM »
I have port A3 available on the board and this would indeed the most logic way to control it.
An extra option in T2 to automatically add the M8 (on) at the start and M9 (off) at the end would be more then nice. :)

What about the idea to have an option where I can define header and footer code? These header and footer are automatically added to the g-code when created by T2.
And if these headers and footers can be stored and have names I can refer to them in T2 when having different materials/situations?

Best regards,
Maarten
« Last Edit: April 19, 2020, 12:20:09 PM by Maarten65 »
T2 Laser v1.5y / GRBL  1.1e / Eleksmaker Mana V5.2 / windows 10 home, version 10.0.18362
Autodesk Inventor 2020 / Autocad 2020