I have a project where I need to measure 0 - 5 V. I’m using a ADS1115 to have a better precision, connected to a ESP12. Since the ESP is only 3.3 V tolerant and the ADS powered by 5 V (because it needs to be powered a the same voltage as the measured voltage), I put the two pull-up resistor of the I2C bus on 3.3 V.

Is it safe to operate like this?

  • I'd use a Bi-directional Logic Level Converter for I2C
    – LotPings
    Jun 26 '18 at 7:42
  • esp8266 has no problem with 5 V I2C
    – Juraj
    Jun 26 '18 at 7:47
  • Safe? Yes. Reliable? Not really. VIH is 3.5v at 5V VCC, and 3.3 is below that.
    – Majenko
    Jun 26 '18 at 7:56

Is your arrangement bsafsm Yes, perfectly.

Is your arrangement a good idea? No, it is not.

When the ADS1115 is run at 5V it needs at least 3.5V on the I2C bus to properly register a HIGH.

However you can pull up to 5v instead and you won't have a problem. Not only is the esp8255 tolerant of 5v, but that 5v is severely limited in current by the pull-up resistors, so even non tolerant inputs would have a hard time complaining. Worst case scenario, the ESP8266 pulls the bus down to maybe 3.8v (3.3v plus an ESD diode drop) which is fine for a logic high on the ADS1115.

However, if you want to do things properly, you really should use a proper I2C level translator.

  • Ok thank you. I thought the ESP i2c bus was only 3.3 v tolerant. I don’t have enough space to put a logic converter (my pcb has be 4cm * 6cm)
    – Cerberus
    Jun 26 '18 at 8:11
  • So use a PCA9306 in DSBGA package then - 1.98 mm x 0.98 mm (can you even see that...?) I have used the X2SON version (1.40 mm x 1.00 mm) before, and that was, while tricky, actually possible to work with.
    – Majenko
    Jun 26 '18 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.