localhorst wrote: ↑31 Jan 2024, 10:47
So, from what I understand, it's in general not a good idea to power the ESP32 and the I2C devices with 5V.
I think a little more nuance is needed here:
- In contrast to many Arduino boards, ESP
mcu's are to be powered with 3.3V, and use 3.3V logic on input and output pins.
- ESP
boards can be powered with 5V via the USB connector (when available) or the 5V pin on the board, as nearly all ESP (dev)boards have a voltage regulator on board to convert from 5V to 3.3V. Don't power the ESP board with 5V via the 3.3V pin! That'll damage the mcu!
- The DAC (board) can be powered from 3.3V (you can use a 3.3V pin from the ESP board) or 5V. When powering the DAC with 5V, a level converter
should be used on the I2C pins, to protect the GPIO pins of the ESP and any other I2C devices against these too high voltages.
- ESP8266 chips have clamping diodes installed on (most) GPIO pins, that protects them from 5V input signals, but they can't properly deliver the 3.5V level required for a 1/HIGH level of a 5V device input, so that combination either does not work at all, or is working unreliably. It is strongly advised
not to use 5V input/output signals, but to use a level converter if the connected device requires 5V signals.
Side note: Most (if not all) I2C devices support 3.3V VCC and 3.3V I2C signal levels. Some also support 5V VCC, and then also use 5V I2C signal levels.