Benbox Laser Machines/CO2 Lasers/3D Printers

General Category => Trouble Shooting => Topic started by: Hokuro on March 08, 2019, 10:16:43 AM

Title: help laser upgrade
Post by: Hokuro 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
(http://marlinfw.org/assets/images/docs/hardware/endstops/makerbot_endstop.png)
  and would like to know if I can connect them NC (I have doubts as they have electronics on board)
-I mounted this fan
(https://i.ebayimg.com/images/g/GfkAAOSwx5RamxgA/s-l640.jpg)
, where can I take power? with separate power supply, connected to the laser fan or on the board (I have no free connectors)
thanks
Title: Re: help laser upgrade
Post by: Zax 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.
Title: Re: help laser upgrade
Post by: Hokuro on March 09, 2019, 09:35:47 AM
Thanks
Title: Re: help laser upgrade
Post by: Hokuro 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 .
Title: Re: help laser upgrade
Post by: Zax 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.
Title: Re: help laser upgrade
Post by: Hokuro 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
Title: Re: help laser upgrade
Post by: Hokuro 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
Title: Re: help laser upgrade
Post by: ggallant571 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.
Title: Re: help laser upgrade
Post by: Hokuro 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)
Title: Re: help laser upgrade
Post by: Zax 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)
Title: Re: help laser upgrade
Post by: Hokuro 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.
Title: Re: help laser upgrade
Post by: Zax 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.
Title: Re: help laser upgrade
Post by: Hokuro 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
Title: Re: help laser upgrade
Post by: ggallant571 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.

Title: Re: help laser upgrade
Post by: Hokuro on March 21, 2019, 05:16:59 AM
Thanks  :)
Title: Re: help laser upgrade
Post by: Zax on March 21, 2019, 05:23:28 AM
I haven't looked at the code but it could also consider 11 as >7 and assign 111 to the mask, it probably doesn't but you should still use a valid entry and understand how the bit masking works  ;D
Title: Re: help laser upgrade
Post by: Hokuro on March 29, 2019, 12:21:09 PM
I set 3 as you suggested. I didn't invent 11, I found it on a discussion, a wrong discussion ...
I solved the switch problem , I hope.
twisted wires and rc filters did not work.
I mounted a good shielded cable and works great, even without gnd on the shield.
now I have other problem:
the laser dot (or laser rectangle) is double
any suggestions?
Title: Re: help laser upgrade
Post by: Zax on March 29, 2019, 05:04:36 PM
This is often an indication of the diode failing but may also be something simple like the lens isn't flat (parallel to the diode) or needs cleaning.
Title: Re: help laser upgrade
Post by: Hokuro on March 29, 2019, 06:10:25 PM
I hope the second. Tomorrow disassemble it.
Title: Re: help laser upgrade
Post by: Hokuro on April 01, 2019, 12:34:08 PM
I disassembled the laser, I cleaned the lens but no change of the laser beam.
then I removed the lens again and cleaned the diode. now it works perfectly.
I don't understand how the diode got dirty and not the lens; the magic of Chinese things :)
Title: Re: help laser upgrade
Post by: ggallant571 on April 01, 2019, 01:15:47 PM
I cannot tell a lie. I put that spot of dirt on your lens just to test your persistence. Not going to tell you what I did to the ball bearings.
Title: Re: help laser upgrade
Post by: Hokuro on April 02, 2019, 03:27:49 AM
 ;D ;D ;D if you did all that way you could stop for a beer