CNC Question: Optical Switch Detection

GBCues

Damn, still .002 TIR!
Gold Member
Silver Member
Hey Guys,

I've been fiddling around with this problem for almost 3 days now, so I thought I'd try to explain it here.

I want to change my home switch on my CNC taper attachment from a mechanical limit switch to an optical switch. There's just too much variance in the mechanical switch to get a reproducible result.

The problem I'm running into is getting Mach3 to recognize that the optical switch has been triggered. My CNC controller is a Gecko G540. I have the signal lead (orange) from the optical switch attached to pin 2 on the Gecko.

In the first couple of pictures, you can see that when I trigger the optical switch, I am getting the signal output that I expect:

But at the Gecko Controller, I am not seeing 0V and ~5V, instead I am getting a variance between 11.36V and 11.46V, not enough for the Gecko to recognize.

And finally, here is my 5V source for the optical switch. The Blue/BlueWhite pair is the +5V source and the Brown/BrownWhite pair is "ground" or negative. The probem seems to be that when I measure between +5V and gound at the optical switch I see the desired result. But when I measure at the Gecko controller, it only sees a very small voltage change - not enough for it to recognize. There is no ground pin on the 48V-5V power module.

How can I overcome this?

Thanks very much for any guidance.

Gary
 

Attachments

  • IMG_0931.jpg
    IMG_0931.jpg
    80.6 KB · Views: 398
  • IMG_0932.jpg
    IMG_0932.jpg
    80 KB · Views: 412
  • IMG_0933.jpg
    IMG_0933.jpg
    88.9 KB · Views: 399
  • IMG_0934.jpg
    IMG_0934.jpg
    87.8 KB · Views: 392
  • IMG_0935.jpg
    IMG_0935.jpg
    99.3 KB · Views: 523
Last edited:
limit /homing swithes

limit /homing switches, my swithes are NC 5 DCV all the time.

when the limits swithes are triggered it breaks the contact and o volts back to the break out board.

you shouldnt be getting 12 DCV going to or from your limit switch at any time, It should be 5 DCV..................

if no one can help you here you might want to post this problem in mach 3 forum.




OPtical swithes if out of the way of coolant should be ok on metal working machines,but are a liability to malfunction with wood dust.

IF electronic switches like a LED slotted detector photo transsistor then you will need some sort of OR gate( which could be "wired-or"if an Active LO imput is driven by a open collector transistors. chapter 4 page 9

you might need to pipe air to your switct to keep wood dust off the lens.

MMike its been awhile
 
Thanks Mike,

I have already figured out (unspoken/unwritten) that part of the problem is a voltage leak from house ground (I think). So my question may be simply, how to get a good zero ground at the Gecko controller(?)

I thought I would ask here before going to Mach3 or CNCZone (Q's and A's get buried in a day or two).

Thanks for your feedback.

Gary
 
Dc v

hi gary.

sounds like you are going in the right direction.

It puzzles me that it just now shows up now. and not before.

My cnc worked fine for a week or 2. then the limit switches just started to trip. ground problem ,my sheilded cable limit switch circuit. noise or poor ground.

Now all the wires i sodered the ends. I used sheilded cables on everything on my limit and homing switches.

Best of luck

MMike
 
Last edited:
Hey Guys,

I've been fiddling around with this problem for almost 3 days now, so I thought I'd try to explain it here.

I want to change my home switch on my CNC taper attachment from a mechanical limit switch to an optical switch. There's just too much variance in the mechanical switch to get a reproducible result.

The problem I'm running into is getting Mach3 to recognize that the optical switch has been triggered. My CNC controller is a Gecko G540. I have the signal lead (orange) from the optical switch attached to pin 2 on the Gecko.

In the first couple of pictures, you can see that when I trigger the optical switch, I am getting the signal output that I expect:

But at the Gecko Controller, I am not seeing 0V and ~5V, instead I am getting a variance between 11.36V and 11.46V, not enough for the Gecko to recognize.

And finally, here is my 5V source for the optical switch. The Blue/BlueWhite pair is the +5V source and the Brown/BrownWhite pair is "ground" or negative. The probem seems to be that when I measure between +5V and gound at the optical switch I see the desired result. But when I measure at the Gecko controller, it only sees a very small voltage change - not enough for it to recognize. There is no ground pin on the 48V-5V power module.

How can I overcome this?

Thanks very much for any guidance.

Gary

Gary, you need to have the o0v side of your power converter tied to the zero volt of your larger power supply. That looks to be pin 12 of the G540. I am not saying that your power convert is set up to work this way so try at your own risk. The voltage that you are reading is between the power supply 0v and the power converters 5v side. Measure between the 5v of the power converter and the 0v of the 48v power supply or pin 12 of the G540. Check the Gecko G540 user manual and you will see that one side needs to be tied to 0v or pin 12 on the bottom of your G540.

Jim.
 
Back
Top