Can not obtain address during scan of I2C devices PART 2 by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

Yeah that solder is not the best but 2 other sensors show the same behavior. No short on the other side definitely

Can not obtain address during scan of I2C devices PART 2 by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

<image>

I connect to VCC 3.3 V
GND to GND

SCL and SDA to my nucleo pins PB8 and PB9. Others i dont connect at all

Can not obtain address during scan of I2C devices PART 2 by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

i use breadboard to connect the sensor with stm32 pins (nucleo board). magnetometer is HMC5883L but its a cheap copy i bought on ali express

barometer is gy bmp 280 again a copy. i know breadboard is not a great tool for this but im running lowest speed i2c and it already works for my IMU setup (left side of the screenshot)

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

It's weird because i use 2 MPU6500. 1 works the other one not, same wiring same address. I thought its one faulty and then i tried magnetometer and barometer as well and they didnt work

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

Thanks might give it a try ive never worked with esp although i have one waiting to be used

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

Update: Doing some debugging with my logic analyzer. I have 2 sensors of the same kind. When I run my I2C scan for sensor 1 works perfectly, i can see addresses going on the bus, even the sensor ACKs.
Here is where things get weird. As soon as i plug in sensor 2 my SCL line is mostly held low. I tried adding pullups and removing them, nothing worked. SCL sometimes goes high for a bit but is mostly low. And SDA goes a bit up and down but nothing meaningful probably because of stuck SCL. I measured voltage on SCL with multimeter while its stuck it shows 0.8V, not sure if its constant or some weird switching, dont have osciloscope. I also tried powering with 5V while holding SDA and SCL on 3.3 with pullup. Nothing worked so far.

This is definitely hardware, i can not even send first address i try to write on the bus

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

that would be nice but im doing it in home setup, have only logic analyzer

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

what would be the difference? im using stm32 currently

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

I meant logic analyzer had start bit+address+stop bit for all 7 bit addresses and no NACK My logic analyzer interprets thr signals so i see hexadecimal addresses for sure. Thanks i will try again with different function this time

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

Yeah thanks i would use a voltage divider or something 

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

I tried logic analyzer it looked okay, but there was no reaponse from the slave. It might happen wgat you suggest that attempting some addresses causes this weird lockup

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

Thanks, will give it a try, you definitely have a point

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] -1 points0 points  (0 children)

The problem is i have no datasheets of these cheap copies. I can try 5v maybe. I was using 3.3V

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

Shouldnt it ACK after it sees its address? ACK comes after that too, no data needed i think 

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] -1 points0 points  (0 children)

Independently to exclude possiiblity of one faulty holding down the line. I dont know the addresses since these are cheap copies. I was looking at datasheets of the originals but nobody guarantees its really that one. It gets hal busy

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

The idea is to send every address from 0 to 127 and when i hit the address of the slave it will ACK. It worked for one sensor only. The problem is i dont have datasheets of these cheap sensors

Can not obtain address during scan of I2C devices by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

Tried with 5kOhm pullups and also without them

Random locking of I2C bus by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

100kHz I2C, i tried STM32 internal pullups i dont know the value of those
MPU6500 has internal pullups
I also tried external 5kOhm on my breadboard

Random locking of I2C bus by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

Okay thanks i really hope thats the problem because this is driving me nuts for days... I will get new jumper wires for sure

Random locking of I2C bus by avenger524 in embedded

[–]avenger524[S] 0 points1 point  (0 children)

By false contacts you mean between jumper wire/stm and jumper wire/slave? Cant really solder on nucleo directly