SI7021 I2C pin setup (SOLVED)

Hello everyone, I have tested with an HTU21d sensor that is very similar to the SI7021 and with the SI7021 class I also get the "I2C bus error". However with the code in the main.py, it works perfectly, and without external resistances, I do not understand why I get the error with the class, if everything seems to be fine.
I use this one:

Yes. there is a standard circuit doing this with single MosFET transistor, used by all cheap level shifter. Principle below. LV is low voltage, HV is high voltage, Lx and Hx are the low & high voltage logic. And you see the pull-up resistors on both sides:
P.S.: You could make a picture of the back side of the sensor, just to clarify @Eric73 's question.

@tttadam Single transistor level shifter ? A single transistor is an inverter gate, your SDA and SCL signal will be inverted. Please note that i2c is an opendrain bus with pull up. Your SI7021 can be powered by +5V (if its identical to the one showed by robert-hh) but have you checked is your board have 5V-3.3V regulator and have you checked what is SDA and SCL voltage level when you just power SI7021? In SI7021 datasheet absolute maximum rating for SDA and SCL is 3.3V, i have doubts that a SI7021 board have +5V pull-up on SDA and SCL....without power any of the two board, please check your wire continuity with multimeter if you can.

@tttadam I searched a little bit for a module that looks like yours. I found one, and in the backside pictures I see some resistors, which most likely are 10k pull-up resistors, and a three terminal device, which is according to the print-out a LM6206N3 3.3V voltage regulator. The pull-up resistors seem to be connected to 5V. Being 10k, that should not hurt the pycom device, and you do not need external pull-up resistors. And the 5V were OK for your device.
Edit: I see also a dual level shifter, which is intended to connect a 5V side at the micro to the 3.3 V side of the sensor. It is a single FET transistor level shifter.

@tttadam 1K is too low. The usual recommendation is 4.7 k. But that should not change the figure. The question is, whether i2c.scan() returns [64] also in the context of your main code.
If yes, then the port & wires & I2C protocol are OK, and we have to look at the SI7021 module.

@ttadam Have you add pysical pull up resistor on SDA and SCL to 3.3V (4.7K or 1K value) ? Even if you set software pull up to the pin definitions, when you call i2c.init i dont know if pin your specify are not setup as pure opendrain by i2c library, so perhaps a test can with pull up can be done ?

@tttadam That#s strange, especially since i2c.scan() works, which also needs I2c communication. You could try to add an i2c.scan in the test after the i2c.init, just to confirm that it works. And yes, you do not need every baud rate. You can go back to a value like 100000.
I faintly recall a link to the SI7021 driver you are using, but cannot find it any more.

@tttadam You do not have to re-create the i2c object. You can call i2c.init() to change the parameters. And I still do not know why you create the Pin objects separately. You just have to name them when creating the I2C object:

I created a small code so it looped through all tha baudrates. Maybe a little overkill.
Off topic, but the code sometimes freezed for a half a minute or so. It was because I was created to much i2c object, and a garbage collector kicked in? Can I prevent that behavior?
Also If you can give any feedback for my code I would appreciate it very much.

Anyway this code was unsuccessful. I was unable to find a the correct baud rate, I got the same I2C bus error always.

@eric73 Well, you are right. I gave the sensor 5v instead of 3.3. I think I killed it.. well least a learned something. I also tried with 10k resistor but still getting I2C bus error...
Thanks for the help anyway.

@tttadam Strange things, i have a look to your wire connexion, i hope my eyes are wrong but it seem you power your sensor with VIN (approx 5V), but your device SI7021 have +3.6V maximum power supply voltage so +5V can destroy your device.

If i take time to watch your wire it because typically on a scan i2c your device seem to ACK all address starting by 0x40 (64) and this can be happen in case of bad gnd connexion, please check your power supply +3.3V and GND for your SI7021.
If you have an oscilloscope for probin SDA and SCL this will be very helpfull.