开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Proximity Sensors and Mach3


 

Anyone here have experience setting up Proximity Sensors with a Gecko G540?
I can't get mine to run properly.
The sensors have 3 wires: Brown V+, Blue V- and Black Sensing.
I have the Blue wires running to a Bus Terminal Block for both sensors and another running to the G540 V- of the Main Power Supply.
The Brown wires are both running to another Bus Terminal Block. The unit is powered by a 7.5V Wall Wart.
I have the Black Sensing wire of the X Axis Home sensor running to Pin 10 of the Gecko and the Y-Axis Black sensing wire is running to Pin 11 on the Gecko and they are all Active Low.

As long as my G540 is in E-Stop, Mach 3 registers their presence, yet when I unlock my E-Stop they cease to function.

Here is where I need some assistance.


 

I've watched a video that suggests that I need to run a further wire from the Pin 10 and Pin 11 connections to the Brown V+ Wires of the sensors using a transistor. The size I'm not sure yet though the sensors are rated for a maximum of 300 mA's. So would adding a connection with a 500k resistor make this system work using this wiring order?


 

开云体育

Usually you add the transistor to flip the polarity of the signal, ie, you want active to be high instead (or whatever it is).? That usually means you bought the wrong sensor.

?

The 200mA would be referring to how much load the sensor can handle when active, that’s for when you want to switch a relay or something directly from it.? Adding a transistor in that case makes sense if the relay draws more that 200mA, for the logic high/low a Gecko needs it doesn’t matter.

?

The Geckos have opto-isolated inputs (IIRC) and they need a bit more current that a straight I/O pin, but probably under 10mA.

?

Without knowing what sensor you have, 7.5v sounds a bit low.? Yeah the spec sheet says it’ll run at that, but I’ve found the higher the voltage the better.? Most go up to 36v.? The Gecko should have a 12v output for sensors, run it off that.? Running it from the same power supply tends to make things happier.

?

Tony

?

?

From: [email protected] [mailto:[email protected]] On Behalf Of ronald_41 via Groups.Io
Sent: Tuesday, 29 October 2019 2:24 PM
To: [email protected]
Subject: Re: [MachCNC] Proximity Sensors and Mach3

?

I've watched a video that suggests that I need to run a further wire from the Pin 10 and Pin 11 connections to the Brown V+ Wires of the sensors using a transistor. The size I'm not sure yet though the sensors are rated for a maximum of 300 mA's. So would adding a connection with a 500k resistor make this system work using this wiring order?


 

i have no idea how to help here, but i can tell you a 7.5V Wall Wart walwart is not what you think it is. it may work fine for what it was designed for, but step outside those parameters and all bets are off.


On Tue, Oct 29, 2019 at 3:24 AM Tony Smith <ajsmith1968@...> wrote:

Usually you add the transistor to flip the polarity of the signal, ie, you want active to be high instead (or whatever it is).? That usually means you bought the wrong sensor.

?

The 200mA would be referring to how much load the sensor can handle when active, that’s for when you want to switch a relay or something directly from it.? Adding a transistor in that case makes sense if the relay draws more that 200mA, for the logic high/low a Gecko needs it doesn’t matter.

?

The Geckos have opto-isolated inputs (IIRC) and they need a bit more current that a straight I/O pin, but probably under 10mA.

?

Without knowing what sensor you have, 7.5v sounds a bit low.? Yeah the spec sheet says it’ll run at that, but I’ve found the higher the voltage the better.? Most go up to 36v.? The Gecko should have a 12v output for sensors, run it off that.? Running it from the same power supply tends to make things happier.

?

Tony

?

?

From: [email protected] [mailto:[email protected]] On Behalf Of ronald_41 via Groups.Io
Sent: Tuesday, 29 October 2019 2:24 PM
To: [email protected]
Subject: Re: [MachCNC] Proximity Sensors and Mach3

?

I've watched a video that suggests that I need to run a further wire from the Pin 10 and Pin 11 connections to the Brown V+ Wires of the sensors using a transistor. The size I'm not sure yet though the sensors are rated for a maximum of 300 mA's. So would adding a connection with a 500k resistor make this system work using this wiring order?


 

开云体育

Think of the inputs in the G540 like a light switch on your wall. This particular light switch is OFF when it is up and ON when it is down. This switch also has a spring that pulls it back up (a pull-up), so it is only on as long as it is held (pulled) down.

?

Proximity sensors come in two main flavors; a PNP type which outputs a voltage when triggered and an NPN type which outputs DC Common (DC ground) when triggered. Note that I am using the term ‘DC Common’ here to refer to the DC Ground/DC- terminal of the power supply. DC Common (DC Ground) should not be confused with Earth Ground.

?

Since the G540’s inputs are pulled up (electrically connected to the internal 12V power supply of the G540 by a resistor) you want the type of proximity sensor whose output goes to DC Common, that is the NPN type. This arrangement allows the pullup resistor (spring) of the G540 keep the input turned ‘OFF” until such time as your sensor turns it on by pulling it down by connecting it to DC Common (DC ground).

?

You must use a separate power supply to power the sensors, the G540 does NOT have a 12V output to do this. I use an external 12V power supply in my control boxes ( ??my website). To make this work the DC Common (DC Ground) of your sensor power supply MUST be connected to the DC Common (DC Ground) of the G540’s power supply. This wiring is shown in the G540 manual. Your sensors they are powered by your sensor power supply and the sensor output wire (normally black) goes to the G540 input.

?

Jeff Birt

Soigeneris.com

?

From: [email protected] <[email protected]> On Behalf Of ronald_41 via Groups.Io
Sent: Monday, October 28, 2019 8:37 PM
To: [email protected]
Subject: [MachCNC] Proximity Sensors and Mach3

?

Anyone here have experience setting up Proximity Sensors with a Gecko G540?
I can't get mine to run properly.
The sensors have 3 wires: Brown V+, Blue V- and Black Sensing.
I have the Blue wires running to a Bus Terminal Block for both sensors and another running to the G540 V- of the Main Power Supply.
The Brown wires are both running to another Bus Terminal Block. The unit is powered by a 7.5V Wall Wart.
I have the Black Sensing wire of the X Axis Home sensor running to Pin 10 of the Gecko and the Y-Axis Black sensing wire is running to Pin 11 on the Gecko and they are all Active Low.

As long as my G540 is in E-Stop, Mach 3 registers their presence, yet when I unlock my E-Stop they cease to function.

Here is where I need some assistance.


 

Thank You for that analogy as I can at least understand it in the basic sense. I am terrified of the idea that any screw up on my part will render a $500 CNC Controller useless. I've been asked numerous times why I even bother with this whole idea of running Home Switches when Soft Limits will do exactly what it is that I am looking for without any of these issues. The problem with that way of thinking is that I have yet to see anyone explain the proper way of setting up Safe Z. If a person like myself could grasp the concept without prejudice from others I would definitely go in that direction.


 

开云体育

Someone please correct me if I have this wrong....
?
Soft limits are only good if your machine never loses steps.
Once that happens in one directions the machine will stop before the crash (a good thing) but if the machine has
lost steps and is ahead of where the software thinks it is then there will be a crash going in the other direction if it goes far enough.
?
IE: If the machine loses steps in the Y direction and thinks it is at say Y 20 when it has lost steps and is really only at Y 15.
Then if the software sends the machine to Y 3? And the soft limit is set at Y 0 then because of the lost steps the machine will
go past the soft limit and end up at Y -5 and the soft limit will not stop the machine until the software gets
to Y 0 and the machine will crash at Y 5 (because that is its new Y 0 location)
?
With that said, I don’t think one should rely only on soft limits as a way to keep their machine from crashing.
I don’t use limit switches on my machines nor do I use soft limits because they will only help in one direction if my machine loses steps.
So I do all I can to make sure my machine keeps in step and I always run a new cut file standing next to the Estop just in case I have an error
in the new code.
?
Hope this helps.
?
?

From: ronald_41 via Groups.Io
Sent: Wednesday, October 30, 2019 12:04 AM
Subject: Re: [MachCNC] Proximity Sensors and Mach3
?
Thank You for that analogy as I can at least understand it in the basic sense. I am terrified of the idea that any screw up on my part will render a $500 CNC Controller useless. I've been asked numerous times why I even bother with this whole idea of running Home Switches when Soft Limits will do exactly what it is that I am looking for without any of these issues. The problem with that way of thinking is that I have yet to see anyone explain the proper way of setting up Safe Z. If a person like myself could grasp the concept without prejudice from others I would definitely go in that direction.


 

开云体育

I know the wiring can be confusing. Several years ago I came up with the LMTS-4I: (my website) to help solve this problem. You mount the box on your machine and run a single DB9 extension cable back to your control box. If you click the ‘Yes, please add DB9 pigtail’ check box you get a prewired DB9 for the controller end with 12” leads coming off of it. You wire up the 4 leads to the G540 input and the tow power leads to your sensor power supply.

?

You want to use this type of sensor: (my website). If you buy both the LMTS-4I and sensors from me, I’ll crimp the connector on the sensors for you so they will just plug into the LMTS-4I (it takes a special crimper). The3 sensors require 10-30VDC and I have a suitable power supply here: .

I know I don’t have Alibaba prices, but you get good stuff that works ?

?

Jeff Birt

Soigeneris.com

?

From: [email protected] <[email protected]> On Behalf Of ronald_41 via Groups.Io
Sent: Tuesday, October 29, 2019 11:05 PM
To: [email protected]
Subject: Re: [MachCNC] Proximity Sensors and Mach3

?

Thank You for that analogy as I can at least understand it in the basic sense. I am terrified of the idea that any screw up on my part will render a $500 CNC Controller useless. I've been asked numerous times why I even bother with this whole idea of running Home Switches when Soft Limits will do exactly what it is that I am looking for without any of these issues. The problem with that way of thinking is that I have yet to see anyone explain the proper way of setting up Safe Z. If a person like myself could grasp the concept without prejudice from others I would definitely go in that direction.

_._,_._,_



 

I have never used soft limits. I use hybrid servo steppers and have error signals from the controllers feeding back to Mach3. If there are lost steps the program stops but position is lost. In this scenario you have two options, one is to go through the process of picking up the datum that was originally used, the other is using home/limit switches to reset the axis that has triggered the fault by homing it. The second option does not require any tooling removal and refitting in a potentially different position, it does require axis homing before the machine starts running a program. Not having home/limit switches seems like too much penny pinching to me and is likely to have a bigger cost sometime?in the future.

Martin C?


 

I have servos on two axes and a stepper on the Z but can change that to a servo if it would help. I have more problems with the Z than any other axis. I have a counterbalance and have adjusted for smooth operation of the ballscrew and linear bearings but still have occasional problems. I use Gecko controllers. I sort of assume that I am not losing steps with the servos but do not have it set up to send feedback to Mach3. Can you explain how this is done and are there options to just display the error but not necessarily stop?

------ Original Message ------
From: "Martin Connelly" <martin.at.leasingham@...>
Sent: 10/31/2019 9:37:17 AM
Subject: Re: [MachCNC] Proximity Sensors and Mach3

I have never used soft limits. I use hybrid servo steppers and have error signals from the controllers feeding back to Mach3. If there are lost steps the program stops but position is lost. In this scenario you have two options, one is to go through the process of picking up the datum that was originally used, the other is using home/limit switches to reset the axis that has triggered the fault by homing it. The second option does not require any tooling removal and refitting in a potentially different position, it does require axis homing before the machine starts running a program. Not having home/limit switches seems like too much penny pinching to me and is likely to have a bigger cost sometime?in the future.

Martin C?


Sandra E Carroll
 

开云体育

I have these setup on my CNC router
Been awhile since I set them up but have a Ethernet smooth stepper driving a cn10 bob from cnc4pc. Then followed the bobs wiring instructions to set up. ?

Works perfectly.?

7 Plus

On Oct 28, 2019, at 9:38 PM, ronald_41 via Groups.Io <ronald_41@...> wrote:

?Anyone here have experience setting up Proximity Sensors with a Gecko G540?
I can't get mine to run properly.
The sensors have 3 wires: Brown V+, Blue V- and Black Sensing.
I have the Blue wires running to a Bus Terminal Block for both sensors and another running to the G540 V- of the Main Power Supply.
The Brown wires are both running to another Bus Terminal Block. The unit is powered by a 7.5V Wall Wart.
I have the Black Sensing wire of the X Axis Home sensor running to Pin 10 of the Gecko and the Y-Axis Black sensing wire is running to Pin 11 on the Gecko and they are all Active Low.

As long as my G540 is in E-Stop, Mach 3 registers their presence, yet when I unlock my E-Stop they cease to function.

Here is where I need some assistance.


 

Leadshine hybrid servo steppers and matching controllers use an encoder to feed back stepper position to the controller. If the stepper position is different to the demand position by a given number of steps it flags an error that can be used with Mach3. The number of steps for an error is a user choice if the default does not suit your needs.

Martin C?


 

so this? only available with servo controller combinations that specifically have that ability?

the gecko can be set to "fault" if position is off the intended position by various amounts but i think that is the only option. it gets a little confusing because the same line is used to provide this signal as the one that needs to be set at startup so i guess some circuitry is needed to allow monitoring of the fault output.?

------ Original Message ------
From: "Martin Connelly" <martin.at.leasingham@...>
Sent: 11/1/2019 10:55:27 AM
Subject: Re: [MachCNC] Proximity Sensors and Mach3

Leadshine hybrid servo steppers and matching controllers use an encoder to feed back stepper position to the controller. If the stepper position is different to the demand position by a given number of steps it flags an error that can be used with Mach3. The number of steps for an error is a user choice if the default does not suit your needs.

Martin C?


 

The trick for using soft limits is to set then about half an inch from your hard stops. That way if your mill gets off a little because of miss steps you still have lots of margin.