Welcome! Log In Create A New Profile

Advanced

Opto Switches Dont Detect Flags

Posted by andy_tratter 
Opto Switches Dont Detect Flags
November 05, 2011 12:45PM
Hi all,

I finished builing my Mendel with Gen 6 electrics this afternoon and had a go at a test print. The axis all run fine but when the opto switch passes through the flag nothing happens and the bed tries to keep going.

I think they are working becuase i inverted the end stops (#define INVERT_ENABLE_PINS 0) nothing happens - ie the axis dont move.

Do the opto-switches have to be fitted a correct way round on the frame or do i need to enable/disable something in the firmware?

All my electrics came from Mendel-Parts a few weeks ago.

Thanks, Andrew
Re: Opto Switches Dont Detect Flags
November 06, 2011 02:45PM
For optical endstops you want endstop pullups turned off, and inversion turned on. By turning inversion off, you basically convinced your CPU that all of your endstops were blocked, so that doesn't really test whether or not they are working.

Unfortunately, the endstops that Mendel-Parts supply don't have any visual feedback, so you still really don't know if they are working or not. If you ever happened to have hooked them up backwards, then they're broken and will have to be replaced.

You can test them by looking at them through a cheap (ideally black & white) webcam - as long as it doesn't have an infrared filter.

Alternatively, you could write an Arduino sketch that reads the value of an endstop, and writes it out to an LED on the Gen6 board (assuming of course that Gen6 *has* a debug LED).
Re: Opto Switches Dont Detect Flags
November 06, 2011 02:52PM
Hi, thanks for your reply.

I actually go them working today, I simply had the axis directions set the wrong way, i.e. the axis would try and keep going past it''s limit but wouldnt come back again. All apears to be working fine now.
Re: Opto Switches Dont Detect Flags
November 07, 2011 02:49AM
Quote

inversion turned on

For the record, both types of opto endstops exist. Some need inversion and some not.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Sorry, only registered users may post in this forum.

Click here to login