Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
9.41k stars 5.3k forks source link

Unknown BLTouch pin numbers for sensor and control pins #1666

Closed adwsail closed 5 years ago

adwsail commented 5 years ago

I have an atmega2560 with a ramps 1.6 board running octopi very well. I am trying to add a BLTouch but have been totally unable to search out the correct "AR" pin numbers for the sensor and control pins. After several hours of searching and pulling my hair out I am forced to ask for help. I realize this is a sorry question to take up your time but I am truly at my wits end.

klippy.log

This file contains common pin mappings for RAMPS (v1.3 and later)

boards. RAMPS boards typically use a firmware compiled for the AVR

atmega2560 (though other AVR chips are also possible).

See the example.cfg file for a description of available parameters.

[stepper_x] step_pin: ar54 dir_pin: ar55 enable_pin: !ar38 step_distance: .009868 endstop_pin: ^!ar3

endstop_pin: ^ar2

position_endstop: -10 position_min: -30 position_max: 220 homing_speed: 50

[stepper_y] step_pin: ar60 dir_pin: ar61 enable_pin: !ar56 step_distance: .009868 endstop_pin: ^!ar14

endstop_pin: ^ar15

position_endstop: 3 position_min: -2 position_max: 220 homing_speed: 50

[bltouch] sensor_pin: ^pc4 control_pin: pa4

maximum_servo_angle: 10

minimum_pulse_width: 0.0006

maximum_pulse_width: 0.0024

z_offset: 2.345

[stepper_z] step_pin: ar46 dir_pin: !ar48 enable_pin: !ar62 step_distance: .002527 endstop_pin: probe:z_virtual_endstop

endstop_pin: ^ar19

position_endstop: -4

was -4 which is correct

position_endstop: 0.5

position_min: -2 position_max: 240

[homing_override] axes: z set_position_z: 20 gcode: G90 G1 Z10 F600 G28 X0 y0 G1 X100 y100 F3000 G28 z0

[extruder] step_pin: ar26 dir_pin: ar28 enable_pin: !ar24 step_distance: .0024 nozzle_diameter: 0.400 filament_diameter: 1.750 max_extrude_only_distance: 100 min_extrude_temp: 20 heater_pin: ar10 sensor_type: ATC Semitec 104GT-2

sensor_type: EPCOS 100K B57560G104F

sensor_pin: analog13 control: pid pid_Kp: 22.2 pid_Ki: 1.08 pid_Kd: 114 min_temp: 0 max_temp: 250

[extruder1]

step_pin: ar36

dir_pin: ar34

enable_pin: !ar30

heater_pin: ar9

sensor_pin: analog15

...

[heater_bed] heater_pin: ar8 sensor_type: EPCOS 100K B57560G104F sensor_pin: analog14 control: watermark min_temp: 0 max_temp: 130

[fan] pin: !ar9

[mcu] serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 pin_map: arduino

[printer] kinematics: cartesian max_velocity: 300 max_accel: 1000 max_z_velocity: 5 max_z_accel: 100

"RepRapDiscount 2004 Smart Controller" type displays

[display]

lcd_type: hd44780

rs_pin: ar16

e_pin: ar17

d4_pin: ar23

d5_pin: ar25

d6_pin: ar27

d7_pin: ar29

encoder_pins: ^ar31, ^ar33

click_pin: ^!ar35

"RepRapDiscount 128x64 Full Graphic Smart Controller" type displays

[display] lcd_type: st7920 cs_pin: ar16 sclk_pin: ar23 sid_pin: ar17 encoder_pins: ^ar31, ^ar33 click_pin: ^!ar35 kill_pin: ^!ar41

zwnk commented 5 years ago

should be if it is connected to servo pins

[bltouch]
sensor_pin: ^ar18
control_pin: ar11
adwsail commented 5 years ago

You are a life saver. Thank you.

jakep82 commented 5 years ago

For future reference converting pin numbers is explained in the FAQ.

adwsail commented 5 years ago

Ive read the FAQ top to bottom, repeatedly. There is no reference to an actual number for the servo pins. I understad PA 11 would be ar11 for the the printer.cfg file but nowhere in any reference I found is there a pin number reference for the sensor_pin or control_pin. ZWNK actually had the correct answer to my question. But thank you for commenting.

jakep82 commented 5 years ago

The first result when searching Google for RAMPS 1.6 is a link to this RepRap page which shows the servo pin numbers. The link I previously provided explains how to convert any of those numbers to something that will work in Klipper.

adwsail commented 5 years ago

I see now. Thank you. Has anyone been able to get a real BLTouch working on a ramps 1.6/atmega2560/octopi platform? Perhaps even a working printer.cfg file? Pin_ and -down works fine, power on sel-test works fine, but the next test step, sending G28, never extends the probe, one needs to be quick with the M112 command to avoid a crash. This should probably be a new issue post, sorry.

KevinOConnor commented 5 years ago

Was a solution found for this issue? The last issue sounds like one of the BLTouch v3 issues that the (recently updated) documentation describes. https://www.klipper3d.org/BLTouch.html

-Kevin

OCD3DP commented 4 years ago

I'm trying to figure out the sensor pin for my BLTouch using a Replicape. Does anyone have a working example of the config settings for this combo? Thanks in advance!

BlackStump commented 4 years ago

I have never used a BLTouch with Replicape and I no longer have one to test but it depend on what pins you intend to connect your BLtouch to. ie which servo which endstop Replicape config if you use endstop x2 servo_0 control pin number would be replicape:servo0 if you used endstop z2 as sensor pin it would be P9_18

my best guess as a example would be

[bltouch] sensor_pin: P9_18 control_pin: replicape:servo0

replicape_connectors

Replicape_Rev_B3_pin-mux.pdf