Author Topic: help laser upgrade  (Read 468 times)

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
help laser upgrade
« on: March 08, 2019, 10:16:43 AM »
Hi guys,
I'm upgrading my laser and I have two questions:
-I bought these limit switches

  and would like to know if I can connect them NC (I have doubts as they have electronics on board)
-I mounted this fan

, where can I take power? with separate power supply, connected to the laser fan or on the board (I have no free connectors)
thanks
my english is very bad, please be patient. :)

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6511
    • View Profile
    • T2Laser
Re: help laser upgrade
« Reply #1 on: March 08, 2019, 10:35:29 AM »
The 2 outer pins are N.C., green and red on your picture. The green to black would be N.O.

You should connect the fan directly to the PSU. Soldering it would provide the best connection but you could make an adapter plug or use a splitter on your DC in.

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: help laser upgrade
« Reply #2 on: March 09, 2019, 09:35:47 AM »
Thanks
my english is very bad, please be patient. :)

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: help laser upgrade
« Reply #3 on: March 15, 2019, 11:05:26 AM »
hi friends,
I'm near the end of the upgrade and I'm testing the endstops but I have two problems:
endstop do not work in NC (NO no problem); everything I say it to do (jog or homing) generates alarm.
-I loaded the firmware "xy homing switch" and I get an error but everything seems to work: X on pin9 and Y on pin 10 but one at a time. it's right? I thought X and Y homing at the same time.
any suggestions? thank you .
my english is very bad, please be patient. :)

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6511
    • View Profile
    • T2Laser
Re: help laser upgrade
« Reply #4 on: March 15, 2019, 11:49:45 AM »
Grbl parameters determine whether you are using NO or NC switches. When you enable homing in T2Laser it tells you to make the necessary changes to match your hardware configuation.

https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration#5----limit-pins-invert-boolean

You can compile Grbl with simultaneous or sequential homing, my XY firmware is sequential.

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: help laser upgrade
« Reply #5 on: March 15, 2019, 02:32:16 PM »
I test the $5 value,  but I received error.
maybe I need to restart .
tomorrow I test again.
I no idea how to compile gbrl, I read tutorials on google but too many things to study, I am electronic, electrical engineer, mechanic but not it engineer.
thanks, you are always kind and effective
my english is very bad, please be patient. :)

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: help laser upgrade
« Reply #6 on: March 17, 2019, 11:27:29 AM »
I did other tests, these endstops do not work in NC mode.
if I simulate the endstop with a wire everything works.
so I wired everything to NO but X homing gives error. I checked with tester and everything is ok. I exchanged pin9 with pin10 (by hand pressing the other switch) and everything works. I believe they are interference. the next days I will do more tests and create a filter.
I hope to resolve, I begin to be fed up
my english is very bad, please be patient. :)

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2655
    • View Profile
Re: help laser upgrade
« Reply #7 on: March 17, 2019, 11:43:23 AM »
The default wiring for home and limit switches is NC. That way if the wiring is broken it is the same as hitting the switch. Are you using a version of GRBL built for homing switches? Please post you run-time parameters.
SARCASM - Just one more service we offer here.

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: help laser upgrade
« Reply #8 on: March 18, 2019, 12:13:58 PM »
I know, for this I preferred NC but from the tests with these limit switches does not feel the change state in.
I loaded the firmware "xy homing switch" and this is my set of settings gbrl x NC:
$ 0 = 10 (Step pulse time)
$ 1 = 25 (Step idle delay)
$ 2 = 0 (Step pulse invert)
$ 3 = 0 (Step direction invert)
$ 4 = 0 (Invert step enable pin)
$ 5 = 1 (Invert limit pins)
$ 6 = 0 (Invert probe pin)
$ 10 = 1 (Status report options)
$ 11 = 0.010 (Junction deviation)
$ 12 = 0.002 (Arc tolerance)
$ 13 = 0 (Report in inches)
$ 20 = 1 (Soft limits enable)
$ 21 = 1 (Hard limits enable)
$ 22 = 1 (Homing cycle enable)
$ 23 = 11 (Homing direction invert)
$ 24 = 25,000 (Homing locate feed rate)
$ 25 = 600,000 (Homing search seek rate)
$ 26 = 250 (Homing switch debounce delay)
$ 27 = 1,000 (Homing switch pull-off distance)
$ 30 = 255 (Maximum spindle speed)
$ 31 = 0 (Minimum spindle speed)
$ 32 = 1 (Laser-mode enable)
$ 100 = 80,000 (X-axis travel resolution)
$ 101 = 80,000 (Y-axis travel resolution)
$ 102 = 250,000 (Z-axis travel resolution)
$ 110 = 4000,000 (X-axis maximum rate)
$ 111 = 4000,000 (Y-axis maximum rate)
$ 112 = 500,000 (Z-axis maximum rate)
$ 120 = 800,000 (X-axis acceleration)
$ 121 = 800,000 (Y-axis acceleration)
$ 122 = 10,000 (Z-axis acceleration)
$ 130 = 600,000 (X-axis maximum travel)
$ 131 = 460,000 (Y-axis maximum travel)
$ 132 = 200,000 (Z-axis maximum travel)
my english is very bad, please be patient. :)

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6511
    • View Profile
    • T2Laser
Re: help laser upgrade
« Reply #9 on: March 18, 2019, 12:20:26 PM »
This is not valid, if you want to invert X and Y it would be 3 (which is binary 11).

$ 23 = 11 (Homing direction invert)

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: help laser upgrade
« Reply #10 on: March 18, 2019, 01:47:53 PM »
$23 is 11
The homing is in the bottom left corner
My problem in NC configuration is the board don't see the swich.
In NO configuration ($5=0) the X homing is crazy: start and immediately stop without touch the switch, I think interferences.
my english is very bad, please be patient. :)

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6511
    • View Profile
    • T2Laser
Re: help laser upgrade
« Reply #11 on: March 18, 2019, 03:57:30 PM »
As I said 11 is not a valid entry, it is 0 to 7 decimal.

So you should set it to 3.

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: help laser upgrade
« Reply #12 on: March 20, 2019, 01:19:06 PM »
my odyssey continues;)
I set $ 23 = 3 (I don't know why but with value 11 it is the same)
I removed the components from the endstop board (resistors, capacitors and LEDs) and now work also in NC mode.
I did a filter to noise suppression as described in github.
I tested the new configuration: perfect homing!
I do tests of movement and engraving, sometimes it works sometimes it freezes (hard limit)
with the wires in one position it always stops, in another position only sometimes.
my filter is not good enough.
next step better twisting wires and mounting ferrite blocks
my english is very bad, please be patient. :)

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2655
    • View Profile
Re: help laser upgrade
« Reply #13 on: March 20, 2019, 10:28:53 PM »
The $23 gets input and displayed in decimal. Convert to binary:

     3      00000011
   11      00001011

So bits 0 & 1 are the same in both.

SARCASM - Just one more service we offer here.

Hokuro

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: help laser upgrade
« Reply #14 on: March 21, 2019, 05:16:59 AM »
Thanks  :)
my english is very bad, please be patient. :)