Welcome! Log In Create A New Profile

Advanced

Optical Endstop's not functioning ive tried everything...

Posted by JARED P 
Optical Endstop's not functioning ive tried everything...
March 20, 2017 09:22PM
Ramps 1.4 with Arduino Mega 2056

Running Marlin Firmware

I currently cannot get my endstop to function correctly. I have the endstop wired with S - S, 5v to +, G to - I am 99% sure its wired correctly.

When I do a M119 to test the endstop it comes back with

Reporting endstop status
x_min: open
y_min: open
z_min: open
ok

Then when I manually trip the switch it comes back with.

Reporting endstop status
x_min: open
y_min: open
z_min: open
ok

I get zero change.

Now when I reverse the logic of endstops in the Marlin Firmware

#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.

to

#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.

this is the M119 code I get.

Reporting endstop status
x_min: open
y_min: open
z_min: TRIGGERED
ok

this result stays the same regardless if I manual trip the switch by blocking the light the status will not change.

I am out of ideas to troubleshoot this issue I do have mechanicle endstops coming and hope to have that elevate the issue but I am starting to think something is wrong with the board. sad smiley anyones help is appreciated.
Re: Optical Endstop's not functioning ive tried everything...
March 21, 2017 02:14AM
Are you sure what ever your blocking the optical path with is blocking the light?

Several plastics are transparent to IR

Got a link to the endstops your trying to use? should the internal pullups be disabled?
Re: Optical Endstop's not functioning ive tried everything...
March 21, 2017 11:59AM
Dust thank you for that input and I am using a piece of Aluminum that is about 1/8" thick I don't think that is what is going on, but thank you for the thought. Let me know if there is any other questions or things that you can think of.

I have seen in numerous places that the pullups should be disabled for Optical Switches but I have tried enabling them and there is no change

Here is a link to the endstop we are using.

[www.amazon.com]


I have plugged this endstop into a UNO just to test it and it functions properly I also check the voltage while its plugged into the Ramps and there is a noticeable voltage drop it goes from .45v to 4.7ish volts when it is triggered or not but the firmware or board is not noticing the change. I even swapped the Ramps 1.4 with another one that I ordered to fix the issue and still the same outcome.

If you'd like to see more about wiring or the unit itself go here I posted this a few days ago...

[www.buildyourownsla.com]

I am starting to worry that the signal pin is fried on 2 ramps boards! even though I know that is pretty unlikely. If you go to the wiki for endstops there is a troubleshooting section and it states that if the voltage changes but the board isnt noticing it that it could be the wrong pin is selected in the firmware but I have no clue how to verify this. I'll post the link to the page, I wish I had more hair to pull out lol winking smiley tongue sticking out smiley

[reprap.org] <---- troubleshooting link

Edited 8 time(s). Last edit at 03/21/2017 12:47PM by JARED P.
Re: Optical Endstop's not functioning ive tried everything...
March 21, 2017 01:02PM
I just checked an old config.h where I used Marlin with the same optical sensor like you on a Delta.

In my case all endstop-pullups where defined and the ?_max_endstops_inverting was false

Now I can only think of two scenarios:
1. You have plugged the endstops in the MAX_Endstop-ports
2. You have the homing direction set to "1" instead of "-1"
Re: Optical Endstop's not functioning ive tried everything...
March 21, 2017 01:12PM
Thank you for the advice smiling smiley

Version of Marlin I am running = (1.1.0-RC8)

Okay I currently have homing direction set -1 in the firmware, I will post this section of code and take a picture of the port its plugged into so you can verify it and I double / triple checked that I am in the z-min port on the board... sad smiley unfortunately both of those are set correctly.

current settings

// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
// :[-1, 1]
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.

// @section machine

// Travel limits after homing (units are in mm)
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS 200
#define Y_MAX_POS 200
#define Z_MAX_POS 190

Picture of the board



Just wanted to try it and see if it still did it I turned on all the pullups and sure enough I still got all saying triggered here is the result of M119

Reporting endstop status
x_min: TRIGGERED
y_min: TRIGGERED
z_min: TRIGGERED
ok

I did block and unblock the sensor and the results stayed the same.

I tried reversing the logic on only z-min as well and testing it blocked and unblocked the results were the same... sad smiley

Reporting endstop status (Blocking sensor)
x_min: TRIGGERED
y_min: TRIGGERED
z_min: open
ok
Reporting endstop status (Unblocked sensor)
x_min: TRIGGERED
y_min: TRIGGERED
z_min: open
ok

Edited 5 time(s). Last edit at 03/21/2017 01:31PM by JARED P.
Re: Optical Endstop's not functioning ive tried everything...
March 21, 2017 05:49PM
If Aluminum that is about 1/8" isn't thick enough to block the light, you need to move universes!

It looks like that device has a LED on its top to indicate the signal level is high or low, does this change when you block and un block the light?
Re: Optical Endstop's not functioning ive tried everything...
March 21, 2017 06:18PM
Yes it does but Dust I must inform you that I have checked all the pins manually by tripping them with a jumper and pretending to be a mechanical endstop by connecting the S to G and all the pins are dead... going to order a new Ramps 1.4 and Mega

Edited 1 time(s). Last edit at 03/21/2017 06:19PM by JARED P.
Re: Optical Endstop's not functioning ive tried everything...
March 22, 2017 04:20AM
You have selected the right motherboard version in Marlin?
Sorry, only registered users may post in this forum.

Click here to login