How do I set the optical end stop switch?
-
@phaedrux Thank you for your reply.
I've connected it to Duet2 as shown in the picture
Here is the firmware version
M115 FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.0 ELECTRONICS: Duet Ethernet 1.02 or later FIRMWARE_DATE: 2020-01-03b3
The optical end stop switch itself is not equipped with an LED
The end stop switch LED on Duet2 is not lit.Transmission result of M119
M119 Endstops - X: at max stop, Y: at max stop, Z: at max stop, Z probe: at min stop
Same results after beam failure
-
@kotuo Can you post a link to the optical interrupter you have?
Looking at the circuit board, I suspect it has an LED and a darlington photo transistor in it.
Since it's not working, and I don't know which is which on your PCB, I'm going to guess you need to swap the "A" and "C" connections and probably turn on a pullup in your config.c
But I'm guessing based on a photo and experience, so I could be completely wrong.
-
@alankilian Thank you for your reply.
The optical end-stop switch that I have now was not purchased.
Therefore I am unable to post a link to it.Originally, this optical end-stop switch was integrated into a Commercially available 3D printer called CZ-300.
-
@kotuo Are there any other markings on the switch that could help us tell which side is the LED and which side is the detector?
-
@kotuo Make sure you're using something that is not transparent to IR.
-
@alankilian Thank you for your reply
This picture shows the information that can be found on the surface of an optical end-stop switch.
-
@stephen6309 Thanks for your reply.
I checked the optical end-stop switch with a black opaque object I had lying around the room. -
@kotuo OK, connect:
A to 3.3 Volts
G to Ground
C to Zstop-inThen see if the LED on the Duet changes state when you put something in the sensor.
-
@alankilian Thanks for your reply.
We rearranged the cables as shown in the picture.
The result
The end stop switch LED of Duet2 is not shining. -
@kotuo If you jumper from G to C with a piece of wire, does the Duet2 LED light up?
If so, I'm out of ideas. It can sometimes be easy and sometimes difficult to get an undocumented bit of hardware working.
-
@kotuo
I recently found that when direct sunlight was hitting my printer one of the optical endstops started misbehaving. A couple small pieces of duct tape on the back sides of the opto interruptor fixed the problem. Apparently sunlight hitting the photodiode from outside the slot can be sufficient to trigger the stop. Maybe that's what's going on with the part you're trying to use. I've been using the optical endstops for a couple years and never had a problem before I moved the printer to a new, sunnier location.Either way, without any data on your part it might not be worth bothering to troubleshoot it when new parts with proper hookup data are readily available and dirt cheap. I use these in my printer- about $3 each, and they have LEDs that indicate when they are activated and maybe more importantly, they have comparators that ensure a "clean" transition from one state to the other. They work fine with the voltage provided by the Duet 2 controller.
-
@alankilian Thanks for your reply.
From G to C, the Duet2LED lights up when the jumper is finished.
I had just borrowed a multimeter from a friend first thing in the morning.
Is there any way I can use this to find out what it can tell me? -
@mrehorstdmd Thank you for your reply.
It comes with an attachment to avoid direct sunlight, which I will use when I install it. -
@kotuo I'd want to check those endstops.
I would take the 3V3 and ground, and connect them, then attach a voltage meter between the signal pin and ground.
The signal pin should swing between ground and 3V3 when the optical stop is triggered and opened. If it does not, then the endstop is faulty, or you've misidentified the wiring. The optical stops that I have are fitted with an LED which makes diagnosis easier.
The labels A G and C are a little ambiguous without documentation. Most RAMPS style boards put the ground in the center, and the signal pin opposite the +VCC. The Duet puts +VCC in the middle. I just swapped the +VCC and Ground pins in the connectors that came with mine, and tested them. The mechanical switches that I had were the same, as they were obviously intended to plug into a RAMPS style board. Could you have A and C mixed up, ie: you're putting current into the signal pin and trying to read the +VCC pin?
-
@kotuo does the optical endstop have a built-in series resistor for the integral IR LED? It would be unusual not to; but can't see one in those photos.
-
Sorry for the delay!
I contacted the manufacturer of my old 3D printer and they told me that the optical end stop switch I have is designed for that purpose only and cannot be used for Duet.
I would like to express my sincere thanks to all of you for your co-operation.
I think I have not enough experience and knowledge to use this optical end stop switch for Duet, so I would like to use a normally open microswitch which I have prepared as a spare.
We'll meet again somewhere else.