Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I2C logic levels
#1
Hi,
The I2C conector on the KC868-6 has a 3.3v pin for power. I have a PN532 RFID reader that I want to connect to the I2C bus, however the PN532 needs 5 volts. Can an I2C device with 5V logic level be connected safely to the I2C bus?
Thanks in advance for your answer.
Reply
#2
no , can't connect directly, because esp32 SDA and SCL is 3.3v level, you need to add convert circuit.
Reply
#3
Thanks very much for your answer. There doesn't seem to be a pin on the board that carries 5v. Can I connect a wire to the kathode of D9 to power a logic level converter and the rfid reader module from?
Reply
#4
your rfid device 5v use another power supply. not use 5v from relay board. if current large, maybe will let relay board not stable.
Reply
#5
I hooked up my pn532 using a logic level converter and an external power supply. It turns out the PN532 is using address 0x24, so I get a conflict with the 868 internal relay controller. So I tried setting the PN532 to HSU, and connect it to the board's extended serial port, which utilizes pin 12 and 13 on the ESP32. Upon connecting, the board gave errors during boot, and I could not upload the software. When the PN532 was disconnected, the errors disappeared. I found out that pin 12 is actually a bootstrap pin that controls the flash voltage? Why have you designated a bootstrap pin as a regular io pin? From what I can tell, it would cause all kinds of weird unpredictable behavior if I tried to use that pin as a regular IO pin!
Is there another pin I can use for HSU?
Reply
#6
Try to avoid using these pins as ESP32 will require them during startup: gpio2,gpio12,gpio5,gpio15,gpio0
Reply
#7
I changed the relay controller (PCF8574) address to 0x20, so now there should be no conflict.
However when I connect the PN532 (using a level converter) and perform an I2C scan, I get these errors:

(107493) i2c.master: I2C transaction timeout detected
E (107494) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up

The PN532 works fine when I connect it to an Arduino board. Do you know what might be the cause for these timeout errors?
Reply
#8
because your module use 5v level. ESP32 use by 3.3v level.
Reply
#9
(05-12-2025, 08:36 AM)admin Wrote: because your module use 5v level. ESP32 use by 3.3v level.

The module is connected via a level converter, as stated in the previous post.
Reply
#10
i suggest you find a 3.3v level version, maybe your conver module have issue.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)