User Tools

Site Tools


pibot_cnc_laser_series:v47b:connect_limit_switches:start

4.1 Connect Limit Switches and Sensors

Hardware Connection · Eight optocoupler-isolated Signal / GND inputs, fixed 5 V
Power off first. Switch off both the USB and the main 12–24 V supply before you change any input wiring.
V4.7B differs from V4.96 / V5.77 / V5.88. This board has no SW-VCC jumper and no 12–24 V input option. Its input optocouplers run from a fixed on-board 5 V rail, and every input header carries only two pins: Signal and GND. Do not follow the three-pin SW-VCC instructions written for the other boards.
How the inputs work — read this first

V4.7B has 8 optocoupler-isolated inputs (TLP521GB-S) on two headers along the board edge. All eight channels are electrically identical.

+5 V fixed, on board TLP521GB-S 300 Ω on board Signal terminal your switch / sensor GND current must return to GND for the input to trigger
One of eight identical input channels, redrawn from the V4.7B schematic.
  • The board sources the current, not your switch. Current leaves the internal 5 V rail, passes through the optocoupler LED and the on-board 300 Ω resistor, and exits at the Signal pin. An input triggers only when your device pulls Signal down to GND.
  • Everything is already on the board — you never add a supply or a resistor to an input.
Never apply an external voltage to a Signal pin. These inputs have no reverse-blocking diode, and the rail behind them is only 5 V. Connecting a 12 V or 24 V source to a Signal pin will damage the optocoupler. A Signal pin is only ever pulled down to GND.

Input map in the test YAML

TerminalAssigned functionTerminalAssigned function
GPIO.33X limit −GPIO.32X limit +
GPIO.35Y motor 0 limitGPIO.34Y motor 1 limit
GPIO.39Z limitGPIO.36A limit
GPIO.2Probe (pull-up, active low)GPIO.26Tool setter (pull-up, active low)
💡 GPIO.2 and GPIO.26 need :pu. In the supplied test YAML they are written gpio.2:pu:low and gpio.26:pu:low — the internal pull-up must be enabled for these two to read correctly. See item ① on 1 Pinout Reference.
PiBot V4.7B limit switch and endstop wiring overview
Wiring overview: dry contact and PiBot Endstop V5 module on the V4.7B Signal / GND inputs.
A
Standard mechanical switch

Any dry-contact switch or button. This is the simplest and most common option on V4.7B, and it works on all eight inputs.

  1. Wire the switch between the Signal pin and the GND pin of that input. Two wires, no supply, no polarity.
  2. Prefer the normally-closed contact where practical, so a broken wire shows up as a triggered endstop instead of a dead one.
  3. Match the YAML polarity to the contact you chose, then confirm with $limits.
motor0:
  limit_neg_pin: gpio.33:low
  limit_pos_pin: gpio.32:low

probe:
  pin: gpio.2:pu:low
  toolsetter_pin: gpio.26:pu:low
B
Three-wire 5 V endstop

A powered endstop such as the PiBot Optical Endstop V5 or Mechanical Endstop V5 repeats far more precisely than a bare micro switch. When triggered, their output pulls Signal down to GND, which is what this input needs.

  1. Connect the sensor Signal to the input Signal pin and the sensor GND to the input GND pin.
  2. The input header has no supply pin. V4.7B input connectors are XH2.54 with only two positions, Signal and GND, because this board was designed around plain mechanical switches. Take the sensor's +5 V from any 5 V source on the board — the RJ12 port and the board's +5 V header pins both provide it — and share the same GND. Any of them works; there is no dedicated SW-VCC pin to use.
  3. Check the module LED, then verify with $limits.
💡 Before connecting any non-PiBot 5 V sensor, confirm its output is an open-collector or otherwise pulls-low type. A push-pull output that drives 5 V into Signal will not trigger this input.
C
12–24 V industrial sensors
Not supported directly on V4.7B. There is no SW-VCC jumper and no Vmot-main option for the inputs, so a 12 V or 24 V sensor must never be wired straight to a Signal pin.

If your machine needs industrial proximity sensors, you have two workable routes:

  • Use an isolated interface — a relay module or an opto-isolator module powered from your 12–24 V supply, with its output contact wired to the V4.7B Signal and GND pins as a dry contact. This is the safest general solution.
  • Choose a board with native support — V4.96 Pro, V5.77 Carrier and V5.88 Ultra all have a SW-VCC jumper that can feed 12–24 V sensors directly.

NPN, via an interface

An NPN (sinking) sensor driving a relay or opto module, whose isolated contact then behaves as a plain dry contact on the V4.7B input.

PNP, or any direct connection

A PNP (sourcing) output pushes V+ into Signal, which this input cannot read at all — and at 12–24 V it will damage the optocoupler. Never wire either type straight to the input.

✓
Acceptance check
  • Every input reads inactive at rest, changes state only when its own switch is operated, and returns cleanly when released.
  • A disconnected normally-closed circuit produces the expected fault state.
  • Run the bench test in 2.5 Test Probe and Input Signals before the switches go anywhere near a moving axis.

Quick troubleshooting

  • Probe or tool setter never reads correctly. GPIO.2 and GPIO.26 need :pu in the YAML — without the internal pull-up they will not behave.
  • A three-wire sensor never responds at all. Confirm it is a sinking (NPN / open-collector) type. A sourcing PNP output cannot trigger these inputs.
  • An input is triggered before anything is touched. Check for a short between Signal and GND, and confirm the YAML polarity matches the contact type you wired.
  • An input stopped working after connecting an industrial sensor. A 12–24 V source applied to a Signal pin damages the optocoupler — see section C for the correct approach.
  • Intermittent triggering on a long cable run. Use shielded cable, keep sensor wiring away from motor and spindle leads, and ground the shield at one end only.

pibot_cnc_laser_series/v47b/connect_limit_switches/start.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki