Manta M8P i2c_bus name

Basic Information:

Printer Model: V1 MP3DP V5
MCU / Printerboard: Manta M8P V2
Host / SBC: CB1
klippy (14).log (299.3 KB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

I am trying to install an AHT20 sensor for chamber temp but having an issue figuring out what the i2c_bus is on the Manta M8P V2. I have read through the manual and searched everywhere I can think of and cant find it anywhere. Any help would be greatly appreciated!

Official pinout diagram with pin names from BTT for Manta M8P v2.0

pins:
SDA-PC9
SCL-PA8

Wiring, official manual, page 16

all I2C definitions from klipper source for STM32 CPUs

DECL_ENUMERATION(“i2c_bus”, “i2c1”, 0);
DECL_CONSTANT_STR(“BUS_PINS_i2c1”, “PB6,PB7”);
DECL_ENUMERATION(“i2c_bus”, “i2c1a”, 1);
DECL_CONSTANT_STR(“BUS_PINS_i2c1a”, “PB8,PB9”);
DECL_ENUMERATION(“i2c_bus”, “i2c2”, 2);
DECL_CONSTANT_STR(“BUS_PINS_i2c2”, “PB10,PB11”);
#if CONFIG_MACH_STM32F2 || CONFIG_MACH_STM32F4
DECL_ENUMERATION(“i2c_bus”, “i2c3”, 3);
DECL_CONSTANT_STR(“BUS_PINS_i2c3”, “PA8,PC9”);
#if CONFIG_MACH_STM32F2 || CONFIG_MACH_STM32F4x5
DECL_ENUMERATION(“i2c_bus”, “i2c2a”, 4);
DECL_CONSTANT_STR(“BUS_PINS_i2c2a”, “PH4,PH5”);
DECL_ENUMERATION(“i2c_bus”, “i2c3a”, 5);
DECL_CONSTANT_STR(“BUS_PINS_i2c3a”, “PH7,PH8”);
#endif
#endif

most probably it will be i2c3

1 Like

Am I missing something else that has to be there?

From your klippy log
main MCU report following

Loaded MCU ‘mcu’ 108 commands (v0.12.0-132-ge37b007f / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.35.2-2+14+b2) 2.35.2)
MCU ‘mcu’ config: ADC_MAX=4095 BUS_PINS_i2c1_PB6_PB7=PB6,PB7 BUS_PINS_i2c1_PB8_PB9=PB8,PB9 BUS_PINS_i2c2_PB10_PB11=PB10,PB11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi4=PE13,PE14,PE12 BUS_PINS_spi5=PF8,PF9,PF7 BUS_PINS_spi5a=PH7,PF11,PH6 BUS_PINS_spi6=PG12,PG14,PG13 CANBUS_BRIDGE=1 CLOCK_FREQ=400000000 MCU=stm32h723xx PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_CAN=PD0,PD1 RESERVE_PINS_USB=PA11,PA12 RESERVE_PINS_crystal=PH0,PH1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1

Highlighting

BUS_PINS_i2c1_PB6_PB7=PB6,PB7 BUS_PINS_i2c1_PB8_PB9=PB8,PB9 BUS_PINS_i2c2_PB10_PB11=PB10,PB11

So you don’t have i2c3

as you can see firmware have this section

#if CONFIG_MACH_STM32F2 || CONFIG_MACH_STM32F4
DECL_ENUMERATION(“i2c_bus”, “i2c3”, 3);
DECL_CONSTANT_STR(“BUS_PINS_i2c3”, “PA8,PC9”);

It’s possible that it just missing CONFIG_MACH_STM32H723 there
and i2c3 is not present

if you are building and flashing your MCU firmware from vanilla klipper - then you can try to add it, or override pin names for existing i2c1.

This is on an already up and running printer so not flashing anything. It was flashed for the correct board so not sure why that’s not correct.

How would I go about doing this?

Overriding also require building and flashing MCU.

I’m not sure if it’s possible but maybe there are some way to use software based I2C where you would define your pins.

1 Like

Ok I gave this a try…

And this was the result…

klippy (15).log (6.8 MB)

You might have to enable the I2C bus under the Linux OS.

Great, so Software i2c was accepted, that error came from your MCU when it did try to send bytes.

BTW is your AHT10 connected ?

Try to change i2c_address to 0x39.

Directly to the i2c connector on the M8P

I will give that a try

additionally try to switch pins in config
PA8 - SDA
PC9 - SCL

Just tried switching it to the other address and got the same error. I will try swapping the pins and see if that does anything

OK I swapped the pins and tried both addresses still the same
MCU 'mcu' shutdown: soft_i2c NACK

Also I just realized that this AHT20 I have is also a BMP280 so I’m not sure if that changes anything or not

try to use BMP280

because for AHT20 i found this in klipper:

Compatible Sensors:
AHT10 - Tested w/ BTT GTR 1.0 MCU on i2c3
AHT20 - Untested but should work
AHT21 - Tested w/ BTT GTR 1.0 MCU on i2c3

Ok I will give that a shot. I just started a print so once that’s done I will see if that makes any difference! I will report back once I try it. Thanks for all the help!!!

Ok switching it to the BMP280 got it working. Its showing temp and pressure. How would I get the humidity from it?

BME280 reports all 3 measures.
how to display it - it’s more about fluidd/mainsail setup.

Ok. I am using Mainsail. I will try and see what I can find about displaying that. Thanks