I am in the process of building a Rep Rap Prusa 3D printer, and I have this habit of trying to re-invent the wheel. I started researching electronics and really disliked everything I found,
I had originally ordered some gen 2.1 Opto boards, which I decided were too large for the printed clamps.
After some research I found the most recent End-stop http://reprap.org/wiki/Gen7_Endstop_1.3.1, looks like somebody's after-thought.
So I decided to design my own....
Step 1: The Design
I started with the schematic from the Gen 7 end-stop and went from there. My biggest problem with the schematic is that the output signal (probably) will not give a 5v high output, according to my math the output will range from 0- 3.7v. I'm sot sure what a digital input pin on an arduino will accept as a high but I would rather the output could go the full 5 volts.
I used the same photo-interrupter TCST2103 and corresponding current limiting resistor as well as the pull up resistor for the photo-transistor.
It needed to have an led for debug purposes but I couldn't decide on the final wiring, so I left 3 different component landings near the end of the board. The idea is for the builder to use whatever landings they feel necessary: led on all the time, led on when the sensor is blocked and led on when the sensor is not blocked. Use the 2nd one with caution because it will also have an output high of 3.7 volts.
The board was carefully sized to fit onto a Prusa End-stop holder with minimal overhang. The connector is placed at the end of the board so the wires can be routed out of the way.
The board (3 ordered from http://oshpark.com/ for around $5)
blue led (surface mount 0805)
180 ohm resistor (surface mount 0805)
2.2k ohm resistor (surface mount 0805)
2 - 1k ohm resistor (surface mount 0805)
Plus a complete assembly of a ~.1" pitch male/female connector (don't forget pins), or solder wires directly to the board. This project was designed to use a 2.5mm pitch JST connector.
Mounting Parts(assuming mounting to Prusa):
Printed end-stop holder
2 - M3X18 screws or similar
3 - M3 nuts
2 - non conductive spacers or small diameter washers to space the board from the printed holder
Step 2: Assembly and Operation
The three component landing on the top of the board allow for 3 different led/resistor combinations, its up to you to choose one:
Option1 - Place the resistor on the "G" pin of the connector and the LED on the "V" pin with the anode pointing away from the Photo-interrupter. The LED will be on as long as the board is powered.
Option2 - Place the resistor on the "G" pin of the connector and the LED on the "S" pin with the anode pointing away from the Photo-interrupter. The LED will be on when the Photo-interrupter is blocked.
Option3 - Place the resistor on the "V" pin of the connector and the LED on the "S" pin with the anode pointing towards the Photo-interrupter. The LED will be on when the Photo-interrupter is not blocked. (recommended)
Assembly will vary on what kind of tools you have on hand, I used a hot air re-work station and solder paste. Generally you should probably start with the surface-mount components and then move onto through-hole.
R1 - 180 ohm, Emitter current limiting resistor
R2 - 2.2k ohm, Signal pull up resistor
LED/1k ohm Resistor combination
2.5mm JST connector
Then all you have to do is mount it.
The Signal will be LOW when unblocked and HIGH when blocked, The board should be powered with 5 volts, the resistors must be changed if you need to use a different voltage.