Two I2Cs components works on uno but doesn't on nano

Hi guys,

I'm trying to use a sen0206 (with an MLX90614) and a LCD 16x02 (HD44780 + PCF8574T I2C adapter).
After multiple non successful tries on my nano board, I tried on my Uno and it works in a second, why ?

The best I can get on the Nano is weird characters without the backlight only.

Is a pullup resistor already on the Uno on SDA/SCL (A4/A5) pins ?

With this sketch I can get the adress of the LCD but not the address of the SEN0206, why ?

With this library I got an
error 2 = LCD not found
but the address seems to be the right one because it prints the address of the PCF8574 (0x27).

Am I missing something or is there another things that I do not know ?

After multiple non successful tries on my nano board, I tried on my Uno and it works in a second, why ?

With no schematic, it's a shot in the dark, but since the Nano and the Uno are functionally very close to identical, the odds are you wired the Nano wrong, and the Uno right. However, there's also a good chance you've overloaded (too much current drawn) the Nano, but the Uno is hanging in there. Again, no schematic = no data.
C

There are no external pull-up resistors for the I2C lines in the UNO Board.

No, but that's not different between Nano and Uno; I've done I2C with up to 4 attached devices with NO pullup, though I don't recommend it.

Thx for the reply.
Here is a schematic I used on the Uno, I tried the LCD and the SEN0206 individually before connecting them both on the Nano.

well, working from that, start by connecting your LCD ground.
remove the sensor - can you write anything to the LCD?
can you find the LCD now?
remove the LCD - can you read the sensor and send data to Serial Monitor?
can you find the sensor now?

What's your power supply, the one wired to Vin? What's the green blob the positive wire goes through? A switch?
This is all simple divide-and-conquer debugging.
C

@arciesis ,

Your topic was moved to its current location as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

It will help you get the best out of the forum in the future.

Thank you

How do you connected your wires to the Uno and Nano - by soldering?

So I tried a few things :

First thing I connected the Nano to my computer for the power supply as a test.
And I connect my wires with jumpers and a breadboard .

1/ Only with the LCD on the Nano.
here is the schematic of what i have done:

and I tried the getI2CAddress sketch and with the pullup resistor (1K Ohm) I get :

-> Scanning...
-> Unknown error at address 0x27
-> No I2C devices found

And I retried without the pullup resistor to get

-> Scanning...
-> I2C device found at address 0x27  !
-> done

2/ Only with the sensor on the Nano.


It can't seems to find the address with or without the pullup resistor:

I2C Scanner
Scanning...
No I2C devices found

3/ Time to try to write to the LCD without the pullup resistor.
I tried with this library and the only sketch examples there is with it (LiquidCrystal_PCF8574_Test) and it print

Probing for PCF8574 on address 0x27...
Error: 2: LCD not found.

Can you see an issue ?

Do you need a picture of the real wiring ?

Thank you all for trying to help me :smile:

image

image

Those are not pullup resistors. All that those are doing is limiting the current (and voltage) to the Vcc on those devices.

I2C pullup resistors go from the SDA pin to Vcc and from the SCL pin to Vcc.

See: https://howtomechatronics.com/tutorials/arduino/how-i2c-communication-works-and-how-to-use-it-with-arduino/

I followed the tuto, and put real pullup resistors (4.7kOhm),

here is schematic of what I have done for the LCD :

And the output sketch to find the address is 0x27.
But, when I try the other sketch (the one to print something on the LCF) I still got an Error 2: LCD not found

Now for the sensor I came with the same schematic:

But, I still doesn't have the chance to retrieve the address of the sensor.
And when I try the the sketches of this library I got a Communication with device failed, please check connection
But I just notice on the github page of the library that the nano may not be compatible with this sensor, am I right ? (At least it's not mentioned) In your opinion is it why it can't find the address ?

Am I right with the wiring this time ?

I found the issue, I just change the gnd pin to the other (on the other side of the Nano) and it worked :man_facepalming:

Thank you for trying to help me :smile: