BLTouch wiring and pin assignments
Note: The question has changed after posting this answer. This answer answered the previous question, but is now out-of-date with respect to how the question has changed; I'll update it later, as it is possible what is asked now.



You can change the Z-min and the Z-max pin assignment in Marlin Firmware in the pins_&lt;boardname&gt;.h file, you basically exchange the Z-min and the Z-max. Note that the switch connected to the old Z-min port now becomes a Z-max sensor if you enable that in the firmware; you should therefore remove it (the actual switch) from the minimum Z position.



To enable a BLTouch sensor you require 2 pins free on the microprocessor. One registers the signal of the trigger, the other triggers the servo to stow/deploy the sensor.

You can connect the white/black to the Z-min signal (Z-min pin) and ground of the Z-min connector (or if pins are swapped in the firmware to the Z-max). The other wires need to be connected to +5&nbsp;V (red), ground (brown) and orange/yellow to a free analog pin (PWM pin):


  BLTouch can be operated in the following condition.
  - One I/O for control (PWM or Software PWM)
  - One I/O for Zmin (Z Probe)
  - GND and +5&nbsp;V power


The PWM pin should be defined in your pins_&lt;boardname&gt;.h file, e.g.:

#define SERVO0_PIN         5 // RUMBA board


or

#define SERVO0_PIN         27 // ANET board


The Z-max signal pin is no PWM pin for the servo.