Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By mojESP8266
#39307 Hi,

i am testing now I2C and i have problem connecting 5V(arduinos) with ESP-12e(3.3V).

I have successfully connected 2 Arduinos. 1 is homemade Arduino. I used A4(SDA), A5(SCL) and GND on both Arduinos. (I have read this instructions) https://www.arduino.cc/en/Tutorial/MasterReader

Code is simple. Sending 1 value from master to slave. When slave receives value from master it changes status of the green LED to HIGH and then sends back to master value that it is successful. Master is listening and it changes status of the red LED to HIGH. This works.

But now i want to add another module, this time ESP-12e. So i need to connect ESP pins(SCL, SDA, GND) to Arduinos pins(SCL,SDA, GND). But i also need to use voltage divider? How exactly should i do that?

I have tried connecting resistor 1 (10k) to Arduinos SDA and resistor 2 (20k) to GND. Repeating process for SCL.
https://en.wikipedia.org/wiki/Voltage_divider#/media/File:Impedance_voltage_divider.svg

When i do that Master Arduino LED stops responding, blinking as it cant listen to slave anymore or something?
Is there any nice sketch of connecting multiple arduinos with esp-12e?
User avatar
By mojESP8266
#39373
martinayotte wrote:I2C bus lines are bi-directional, so you can not simply do a voltage divider, it won't work.
You really needs to have voltage level translator (or shifter) :

Image


Tnx i have ordered few of them. 3.3V/5V

Do u know about any shifters in range 1V/5V or 1V/3.3V?