BLTouch wiring and pin assignments
I’m in the process of installing a BLTouch on a Velleman Vertex K8400. The board doesn’t have a dedicated servo pin, so I’ll assign one. No problem there.
The board only has a Z-min pin, so it’s my understanding that I’m supposed to unplug my Z-min cable and plug the BLTouch into the Z-min port.
My question is: "Can't I assign another unused pin as a Z-max, plug the BLTouch into that, adjust the firmware, and leave the existing Z-min sensor plugged in?"
Upon further review, I probably shouldn't have said Z-max, and will be more specific.
This is a Mega 2560 board with 2 available PWM pins. Anything wrong with this setup?
Pins.h:
#define SERVO_0_PIN 15 //PH3 (PWM)
#define Z_MIN_PROBE_PIN 16 //PH4 (PWM)Configuration.h:
=======Z Probe Option=======
#define Z_MIN_PROBE_ENDSTOP
#define BLTOUCHI want be able to keep my Z-min sensor plugged in as a backup to prevent a bed crash just in case the BL touch doesn't trigger. From what I see this should work as long as I make sure the BLTouch triggers before the Z-min. Any issues that anyone can see?
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_<boardname>.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 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 V powerThe PWM pin should be defined in your
pins_<boardname>.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.
After studying the Marlin code, I found the answer I was looking for. If I have a spare PWM pin, I can assign it to anything I want. So the best solution is to define the pin as a Z_MIN_PROBE and then in Configuration.h in the Bltouch settings #define Z_MIN_PROBE_ENDSTOP rather than #define Z_MIN_ENDSTOP_USES.
License under CC-BY-SA with attribution
Content dated before 7/24/2021 11:53 AM
zwep one year ago
Hi, simple question.. where can I find pin 27 or pin 29 (Anet A6) on the motherboard?? I cant seem to find a pin layout...