Welcome! Log In Create A New Profile

Advanced

Optical end stop help Ramps 1.4 Marlin firmware

Posted by behnt 
Optical end stop help Ramps 1.4 Marlin firmware
May 09, 2014 02:12PM
I have a old chem lab CNC equipment platform (used to set up petri dishes) and it will do well for a printer. I have everything wired up and steppers moving. it comes with Omron EE-SX optical end stops.

Now the problem. I have no idea how to set the code for the stops in Marlin in Configuration.h I have tried what I think are all the options of pullups and no pullups, reversing the the logic etc etc... I am sure there is a combination I have missed but I am very frustrated and figured I would ask here.

When the stop is triggered the logic wire goes from 0v to 24v (it's a 24v machine and I have ramps working with it) so its a NO switch, but the logic line only goes up when attached to the pos power line to the optical endstop and not the ground line like I thought it would. So... what would you do in this circumstance to get the endstops working on this?

Edited 1 time(s). Last edit at 05/09/2014 02:37PM by behnt.
Re: Optical end stop help Ramps 1.4 Marlin firmware
May 09, 2014 07:23PM
Endstops are attached to the digital io pins. 0 or 5v, if you have applied 24v to a io pin. its now a dead pin
Re: Optical end stop help Ramps 1.4 Marlin firmware
May 09, 2014 07:44PM
Ugh... Ok then is it at least the Mega that is shot and not the Ramps board? I have extra arduinos...
Feeling quite dumb....

Then again how do I test if the pins are live or not? Now that I am thinking this through I powered the stop with the endstop 5v so the return should have been 5v so maybe.... crossing fingers.

If its burnt out then its the price I pay for jumping in I guess. Ill chalk this up as a learning experience...

Edited 1 time(s). Last edit at 05/09/2014 07:47PM by behnt.
Re: Optical end stop help Ramps 1.4 Marlin firmware
May 09, 2014 10:29PM
Yes is the mega.

If its dead the pin it just wont change level.

I would set it up like a 'mechanical' endstop to test.
basically wire endstop S to gnd, check with m119, then test S to +5v check with m119
Re: Optical end stop help Ramps 1.4 Marlin firmware
May 10, 2014 01:33AM
Ok pins are good! Whew!

But I want to clarify before I really blow pins smiling smiley I should take the "S"ignal wire to ground? Then should I put the ground to the signal pin? Then again with S to +5v? where do I put the +5V line when I do this? I am not convinced this will work as the stop needs constant power to operate

I apologize for my newbie-ness but I guess you have to start somewhere. I totally appreciate your help Dust!

FWIW when I test the stop with my meter here is what happens:
  • I attach my pos line from the meter to the +5v and to the S pin, this gives me a 0v normally and +5v when the stop is triggered.
  • When I Attach my pos line from my multimeter to the S pin and ground to the ground pin I get 0v regardless of the stop being triggered.

So in my newbie head this is backwards... Make any sense to you?

Edited 2 time(s). Last edit at 05/10/2014 01:40AM by behnt.
Re: Optical end stop help Ramps 1.4 Marlin firmware
May 10, 2014 01:55AM
The logic levels are reversed on a typical two wire endstop wired NC to S and gnd.

Normally:
a depressed switch is actuality open cct, no voltage flows, but due to the internal pull up resistor it reads high, which is translated to triggered
a non depressed switch is actually closed cct, and pulled to 0v, this is translated to open.

With optos you need a cct, not just wired direct see eg [reprap.org]

You need to use 3 wires.. as you need gnd and +5 for power as well as the signal coming back from the device.
Re: Optical end stop help Ramps 1.4 Marlin firmware
May 10, 2014 11:49AM
Ok thanks again Dust! Ill sort this out now that you have put me on the right path... You are awesome.
Sorry, only registered users may post in this forum.

Click here to login