MPU6050 & RPI No accelerometer measurements found

Printer Model: SV06+
MCU / Printerboard: Pi 3B+

Can’t read any MPU6050 accel data. I’ve got it on short leads, 2 twisted pairs, i2c seems to work on the pi, i2cdetect -y 1 shows it on the hex address 068, the pi secondary mcu seems to be running, i THINK i’ve got the various bits & bobs in the configs…

I’ve read through the similar discussions here, notably this one : MPU-6050 Accelerometer issues ! No accelerometer measurements found - #3 by EddyMI3D … but still no joy… :sob:

Any help would be greatly appreciated
[klippy (19).log|attachment](uplo (non-stock klipper log deleted for simplicity)

klippy (21).log (62.5 KB)
ad://qYG8Kmlu7JHXUeRbR4mArLJgHxX.log) (52.8 KB)

We only support Klipper main line, but not unknown forks.

ok, i’ll switch over to standard and be back shortly.

Hi, back on stock, same result, log attached…
klippy (21).log (62.5 KB)

I’ve also replaced the log in the original message for simplicity.

it seems to find the accel but says no measurements :

Found mpu-6050 with id 68
MPU9250 starting ‘mpu9250’ measurements
Stats 10371.2: gcodein=0 mcu: mcu_awake=0.001 mcu_task_avg=0.000011 mcu_task_stddev=0.000007 bytes_write=2207 bytes_read=6772 bytes_retransmit=0 bytes_invalid=0 send_seq=197 receive_seq=197 retransmit_seq=0 srtt=0.004 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=72004049 rpi: mcu_awake=0.002 mcu_task_avg=0.000029 mcu_task_stddev=0.000073 bytes_write=937 bytes_read=4785 bytes_retransmit=0 bytes_invalid=0 send_seq=119 receive_seq=119 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=50000252 adj=49997595 heater_bed: target=0 temp=38.6 pwm=0.000 sysload=0.39 cputime=4.510 memavail=641520 print_time=30.526 buffer_time=1.161 print_stall=0 extruder: target=0 temp=35.0 pwm=0.000

No accelerometer measurements found

Seems strange.

  • Your settings look ok
  • The MPU is found on the bus
  • No error message in the log but also no data

You could check Use the MPU6050 accelerometer on Raspberry-Pi – Openest and see if you get something out of the chip on the shell

I tried to get some data with one of the commands off the page you linked which is to recover a reading of the current z acceleration

pi@raspberrypi:~ $ i2cset -y 1 0x68 0x1C 0x00 ; set the range to ±2g
pi@raspberrypi:~ $ i2cget -y 1 0x68 0x3F w ; read the z axis accel
0x0000

so it appears to be talking but only spitting out zero’s. I’ve got some spares, i’ll try a different accel and see what it does.

I tried several spares, all with the same result : comms appear to work via ssh, it’s got whois 0x68 written and I can set some of the configuration registers but get no data out on any of the data registers so i don’t know what to do next. (except buy an adxl345). I see plenty having the same issue and @mattaw seems to know his way around them. I wonder if it’s max baud rate vs cheap chips…

I see many people connecting the adxl345’s via an arduino nano instead of directly to the pi, is this just to give it usb connectivity so it can be swapped between machines & thrown into a drawer when not used, or is there some other reason ?
I think i’ve got one kicking around somewhere so could use that if it gives an advantage.

Thanks.

This is strange indeed.
I have multiple MPUs and ADXLs and had them connected via Orange Pi 3 LTS, Raspberry Pi 3B, Raspberry Pi Pico, Banana Pi BPI-M5 and BTT CB1 (here except the MPUs because I couldn’t get I2C to work on this beast)

I’d suspect that it goes wrong on system (Linux OS) level, as even the low level tools do not get something useful.

Yes, very convenient. Works with MPUs as well. Easily connects up to a Pi Pico for example.

Hi, Unfortunately I’ve created myself another problem. I’ve been attempting to connect to the accels via an arduino nano, and after multiple attempts think i’ve managed to flash that eventually … (after reverting to earlier version of avrdude … and after turning various compile options off to reduce the file size) but now i can’t seem to connect klipper host to the printer mainboard at all…

What I’ve tried :

I’ve disconnected the uno, commented out all the secondary mcu pi and nano config sections and all the accel and input shaper stuff, and i’ve tried configuring [mcu] to both the path and id descriptors returned by ls /dev/serial/by-id/ or …/by-path/ , so that in the attached log plus :
[mcu]
serial: /dev/serial/by-path/platform-3f980000.usb-usb-0:1.1.2:1.0-port0

Tried reverting to a previously working config file.

I’ve built a fresh klipper image and tried to install via sd & bootloader… nothing

I thought I’d accidentally flashed the nano .bin to the main board and screwed up its bootloader but i managed to revert to marlin from sd OK so that doesn’t seem to be the problem.

I’m stuck… :anguished:
Help gratefully received.

klippy (28).log (138.7 KB)

sigh why do you need to use an Arduino Nano?
A blue pill or Pi Pico is a handful of money but without the hassle of the Arduino 8bit crap.

Never tried this combination, so I’m not even sure if the options to reduce code size are giving you a working SPI + ADXL setup.

Your error that you are now receiving for the main MCU indicates that already on serial connection level, i.e. between the Linux OS and the MCU something is failing.
This is usually due to:

  • board not correctly flashed
  • connection issues in the USB wiring

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.