Opto Endstop v1.0
Overview
Darwin’s Cartesian axes all need a datum (also known as home position or end-stop) to reference their movements. At the start of each build each axis needs to back up until the datum point is reached. For Darwin, we use one opto-switch for each axis to define its position. This page tells you how to wire one up to a bracket used in Darwin’s design (below).
You will need
3 (three) of these for a basic
RepRap machine, and
6 (six) of them for a full machine with both home and end stops.
For those using the ZD1901 opto interrupter prevalent in the Southern Hemisphere, a simple stripboard assembly is required. Details
here.
Get It!
Full Kit
Raw Components
Files
You can
download the electronics files from Sourceforge. This zip file contains the Kicad source files, PDF's, as well as the GERBER files you can use to
build it yourself (or have it manufactured).
Schematic
Interface
| Pin | Function |
| +5 | This is the pin to supply +5 volts on. |
| S | This is the signal pin. It will output high (+5) if it is triggered, or low (0v) if it is clear |
| G | This is the ground pin. |
Build It
Board Bugs (listed by version)
v1.0.0
- You will need to drill the mounting holes out to 3mm diameter.
v1.0.1 and beyond
- None yet!! Please report any bugs you encounter in the forums.
Printed Circuit Board
You can either
buy this PCB from the
RepRap Research Foundation, or you can make your own. The image above shows the professionally manufactured Opto Endstop v1.0.0 PCB ready for soldering. Its also cheap, only $0.75 USD.
Components
Soldering Instructions
R1
Resistors can be inserted in any orientation.
R2
Resistors can be inserted in any orientation.
HIL01
This is the opto switch. It will only fit in one orientation. Insert it as far as you can.
Wires
Since the Opto Endstop board essentially plugs into a stepper controller board, the easiest way is to solder the connector wires directly to the Opto Endstop PCB, and then attach a connector to the end of those wires. You will need:
- 3 wires each of different color, about 2 feet long (an old ethernet cord works well for this purpose.)
- a 3 pin, .100" pitch connector housing
- some crimp on connectors
First, strip the ends of each wire. Then you twist the ends of each wire to a point, and tin the ends with a tiny bit of solder. Insert the ends into the hole in the pcb, and solder the wire to the PCB. Take care not to have any strands of the wire cross over to the other soldering points. If this happens, use a knife or tiny screwdriver to break the connection.
Test It
Now that you've built your board, its time to test it. You can easily do so before attaching the PCB connector by plugging the wires directly into an Arduino.
Wire it up!
Connect the wires below to the specified pins on the Arduino.
Program your Arduino
Copy and paste the code below into your Arduino program. Upload the program to the Arduino, and in a few seconds it will start. Once it has uploaded, open the Serial Monitor. The program will continuously notify you of the status of the opto endstop.
Once its running, simply take a piece of paper, or other flat object and stick it between the upright parts on the endstop. Keep an eye on the terminal and if you wired everything up correctly, it will tell you whether the endstop is open or blocked.
#define ENDSTOP_PIN 2
void setup()
{
pinMode(ENDSTOP_PIN, INPUT);
Serial.begin(9600);
Serial.println("Starting opto endstop exerciser.");
}
void loop()
{
if (digitalRead(ENDSTOP_PIN))
Serial.println("blocked.");
else
Serial.println("open.");
delay(500);
}
Attach PCB Connector
Now that you've tested your endstop, you will need to crimp on a connector to the end of the wires. This can be tricky, but it is infact do-able with the proper tools (small needle nose pliers, steady hands, patience.) After you have successfully attached connectors onto each wire, insert them into the connector housing as shown below. It is important to get the order right, as the connector must be attached to the board in the proper orientation.
to top