KREMEN Реклама
KREMEN Реклама

Проблемы с подключением датчика ADXL345. Ошибка Invalid adxl345 id (got 0 vs e5).

def.lord
Идет загрузка
Загрузка
03.02.2023
5730
37
Вопросы и ответы
Статья относится к принтерам:
Ender-5 Pro

Принтер Ender 5 Pro + Orange PI 3 LTS, работает на клиппере.

2 день бьюсь с датчиком ADXL345.

Вроде все настройки апельсинки и клиппера сделал, во всяком случае при запросе:

ls /dev/spi*

мне выдает:

/dev/spidev1.0

а при запросе:

ls /tmp/klipper*

отдает:

/tmp/klipper_host_mcu

То есть как я понимаю - с точки зрения программной части все хорошо.

В printer.cfg добавил нужные записи:

[mcu opi]

serial: /tmp/klipper_host_mcu
[adxl345]
cs_pin: opi:None
spi_bus: spidev1.0
[resonance_tester]
accel_chip: adxl345
probe_points: 100, 100, 20 # an example

Датчик вот такой:

Проблемы с подключением датчика ADXL345. Ошибка Invalid adxl345 id (got 0 vs e5).Пробовал подключать и через витую пару с заземлением, и через прям короткие проводки - по 10 см, скрученные как рекомендуют разработчики клиппера вот тут:

https://www.klipper3d.org/Measuring_Resonances.html?h=adx#adxl345

GND+MISO

3.3V+MOSI

SCLK+CS

Пробовал подключать по разным инструкциям, все десять раз перепроверил - ошибка одна и та же, запускаю в консоли принтера команду:

ACCELEROMETER_QUERY

и получаю ошибку:

Invalid adxl345 id (got 0 vs e5). This is generally indicative of connection problems (e.g. faulty wiring) or a faulty adxl345 chip.!! Invalid adxl345 id (got 0 vs e5).

Возможно конечно мне достался бракованный датчик, но все же хотелось бы проверить до конца, что я сделал все что мог :)

Теперь вопросы:

1. Как можно протестировать и убедиться, что с точки зрения софта у меня все настроено верно? 

2. Как можно понять, что именно датчик бракованный? 

3. Возможно есть какие то еще варианты исправления, которые я не учел?

Всем заранее спасибо за помощь!

Полный конфиг на всякий случай:

# This file contains pin mappings for the stock 2020 Creality Ender 5

# Pro with the 32-bit Creality 4.2.2 board. To use this config, during

# "make menuconfig" select the STM32F103 with a "28KiB bootloader" and

# with "Use USB for communication" disabled.

# If you prefer a direct serial connection, in "make menuconfig"

# select "Enable extra low-level configuration options" and select the

# USART3 serial port, which is broken out on the 10 pin IDC cable used

# for the LCD module as follows:

# 3: Tx, 4: Rx, 9: GND, 10: VCC

# Flash this firmware by copying "out/klipper.bin" to a SD card and

# turning on the printer with the card inserted. The firmware

# filename must end in ".bin" and must not match the last filename

# that was flashed.

# See docs/Config_Reference.md for a description of parameters.

[mcu opi]

serial: /tmp/klipper_host_mcu

[adxl345]

cs_pin: opi:None

spi_bus: spidev1.0

[resonance_tester]

accel_chip: adxl345

probe_points: 100, 100, 20 # an example

[stepper_x]

step_pin: PC2

dir_pin: PB9

enable_pin: !PC3

microsteps: 16

rotation_distance: 40

endstop_pin: ^PA5

position_endstop: 219

position_max: 220

homing_speed: 50

[stepper_y]

step_pin: PB8

dir_pin: PB7

enable_pin: !PC3

microsteps: 16

rotation_distance: 40

endstop_pin: ^PA6

position_endstop:201

position_max: 202

homing_speed: 50

[bltouch]

sensor_pin: ^PB1

control_pin: PB0

pin_move_time: 0.5

pin_up_reports_not_triggered: True

pin_up_touch_mode_reports_triggered: True

x_offset: -48

y_offset: -0.6

#z_offset: 0.0

speed:3

[force_move]

enable_force_move: True

#[homing_override]

#gcode: SET_KINEMATIC_POZITION Z=0

#G0 Z10 F500

#G28 X Y

#G0 X110 Y110 F5000

#G28 Z

#G0 Z10 F500

#axes: Z

[safe_z_home]

home_xy_position: 110, 110 # Change coordinates to the center of your print bed

speed: 50

z_hop: 10 # Move up 10mm

z_hop_speed: 5

[bed_mesh]

speed: 150

horizontal_move_z: 5

mesh_min: 0,0

mesh_max: 170,201

probe_count: 5,5

[stepper_z]

step_pin: PB6

dir_pin: PB5

enable_pin: !PC3

microsteps: 16

rotation_distance: 4

#endstop_pin: ^PA7

endstop_pin: probe:z_virtual_endstop

position_min: -2

position_max: 300

#osition_endstop: 1.0

[extruder]

max_extrude_only_distance: 110.0

step_pin: PB4

dir_pin: !PB3

enable_pin: !PC3

microsteps: 16

rotation_distance: 7.324

nozzle_diameter: 0.400

filament_diameter: 1.750

heater_pin: PA1

sensor_type: EPCOS 100K B57560G104F

sensor_pin: PC5

#control: pid

#pid_kp: 24.831

#pid_ki: 1.346

#pid_kd: 114.532

min_temp: 0

max_temp: 300

[heater_bed]

heater_pin: PA2

sensor_type: EPCOS 100K B57560G104F

sensor_pin: PC4

#control: pid

#pid_kp: 66.429

#pid_ki: 1.197

#pid_kd: 921.707

min_temp: 0

max_temp: 135

[fan]

pin: PA0

[mcu]

serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

restart_method: command

[printer]

kinematics: cartesian

max_velocity: 300

max_accel: 3000

max_z_velocity: 5

max_z_accel: 100

[display]

lcd_type: st7920

cs_pin: PB12

sclk_pin: PB13

sid_pin: PB15

encoder_pins: ^PB14, ^PB10

click_pin: ^!PB2

[virtual_sdcard]

path: ~/printer_data/gcodes

[pause_resume]

[display_status]

[gcode_macro CANCEL_PRINT]

rename_existing: BASE_CANCEL_PRINT

gcode:

    TURN_OFF_HEATERS

    CLEAR_PAUSE

    SDCARD_RESET_FILE

    BASE_CANCEL_PRINT

[gcode_macro PAUSE]

rename_existing: BASE_PAUSE

gcode:

    ##### set defaults #####

    {% set x = params.X|default(230) %} #edit to your park position

    {% set y = params.Y|default(230) %} #edit to your park position

    {% set z = params.Z|default(10)|float %} #edit to your park position

    {% set e = params.E|default(1) %} #edit to your retract length

    ##### calculate save lift position #####

    {% set max_z = printer.toolhead.axis_maximum.z|float %}

    {% set act_z = printer.toolhead.position.z|float %}

    {% set lift_z = z|abs %}

    {% if act_z 

#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.

#*#

#*# [bltouch]

#*# z_offset = 1.650

#*#

#*# [extruder]

#*# control = pid

#*# pid_kp = 20.254

#*# pid_ki = 1.174

#*# pid_kd = 87.346

#*#

#*# [heater_bed]

#*# control = pid

#*# pid_kp = 69.333

#*# pid_ki = 1.236

#*# pid_kd = 972.397

#*#

#*# [bed_mesh default]

#*# version = 1

#*# points =

#*# 0.171250, 0.156250, 0.166250, 0.162500, 0.207500

#*# 0.082500, 0.083750, 0.095000, 0.112500, 0.156250

#*# -0.007500, -0.003750, 0.028750, 0.057500, 0.117500

#*# -0.013750, -0.017500, 0.003750, 0.026250, 0.080000

#*# 0.037500, 0.032500, 0.040000, 0.046250, 0.097500

#*# x_count = 5

#*# y_count = 5

#*# mesh_x_pps = 2

#*# mesh_y_pps = 2

#*# algo = lagrange

#*# tension = 0.2

#*# min_x = 0.0

#*# max_x = 170.0

#*# min_y = 0.0

#*# max_y = 201.0

Ответы на вопросы
Lider 3D Реклама
Lider 3D Реклама