Interfacing the Wroom32 with a 1.8v I2C Sensor
Interfacing the Wroom32 with a 1.8v I2C Sensor
Hello hobbyists, engineers and experts!
I am designing a system using the Wroom32d which comes with an integrated SPI flash useful for my application use case.
My dilemma: I am interfacing an I2C sensor operating at 1.8v with the Wroom32d. I am aware from the datasheet on page 5 which states that the Wroom32d module when powered up prevents the strapping pin MTDI from being pulled high. This strapping pin is used to set internal LDO state.
I intend to read environmental values with the sensor, then communicate the data to the module for record keeping using the SPI flash along with the internal memory space of the MCU.
My question: Since I cannot successfully interface a 1.8v pin with a 3.3v pin for the I2C line....does the above MTDI constraint in the datasheet constrict me from using the 1.8v power domain totally, or only when powering up the device (P.O.R, Brown-out etc)? In other words, is it possible to turn off the internal 1.8v LDO in software during normal operation of the device to allow record keeping tasks to be performed, obviously turning it back on to enable I2C communication between 1.8v sensor and 3.3v
I have a devkit but unfortunately it uses the normal Wroom32 w/o flash so I cannot test readily.
Thank you in advance for your reply
I am designing a system using the Wroom32d which comes with an integrated SPI flash useful for my application use case.
My dilemma: I am interfacing an I2C sensor operating at 1.8v with the Wroom32d. I am aware from the datasheet on page 5 which states that the Wroom32d module when powered up prevents the strapping pin MTDI from being pulled high. This strapping pin is used to set internal LDO state.
I intend to read environmental values with the sensor, then communicate the data to the module for record keeping using the SPI flash along with the internal memory space of the MCU.
My question: Since I cannot successfully interface a 1.8v pin with a 3.3v pin for the I2C line....does the above MTDI constraint in the datasheet constrict me from using the 1.8v power domain totally, or only when powering up the device (P.O.R, Brown-out etc)? In other words, is it possible to turn off the internal 1.8v LDO in software during normal operation of the device to allow record keeping tasks to be performed, obviously turning it back on to enable I2C communication between 1.8v sensor and 3.3v
I have a devkit but unfortunately it uses the normal Wroom32 w/o flash so I cannot test readily.
Thank you in advance for your reply
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Interfacing the Wroom32 with a 1.8v I2C Sensor
While technically perhaps possible, there's no support for it in ESP-IDF. (It would be a bit iffy in general, as it would also switch the flash to temporarily use 1.8V for its power supply.)
Re: Interfacing the Wroom32 with a 1.8v I2C Sensor
Hello ESP_Sprite
Thanks for the reply. I understand the "iffyness" but was wondering if thats safe for the flash which is meant to be 3.3v right? 1.8v isnt enough juice to power it...no? I dont really need the flash except for bulk data storage and almost none existent retrieval as the data will be pushed to the cloud as often as the power management implementation permits.
Thanks for the reply. I understand the "iffyness" but was wondering if thats safe for the flash which is meant to be 3.3v right? 1.8v isnt enough juice to power it...no? I dont really need the flash except for bulk data storage and almost none existent retrieval as the data will be pushed to the cloud as often as the power management implementation permits.
Re: Interfacing the Wroom32 with a 1.8v I2C Sensor
Hello WiFive
Thanks for the reply. Please pardon my noobiness, but do you mean using a level shifter for 3.3v to 1.8v or the other way round? Like where do I apply the level shifting? Am I shifting the signal into/out of the ESP32 from 3.3 to 1.8v or would it be better engineering to shift from 1.8v to 3.3v for the sensor Vdd? I hope i have framed the question right.
Thanks a lot
Thanks for the reply. Please pardon my noobiness, but do you mean using a level shifter for 3.3v to 1.8v or the other way round? Like where do I apply the level shifting? Am I shifting the signal into/out of the ESP32 from 3.3 to 1.8v or would it be better engineering to shift from 1.8v to 3.3v for the sensor Vdd? I hope i have framed the question right.
Thanks a lot
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Interfacing the Wroom32 with a 1.8v I2C Sensor
Easiest way is to level translate your I2C bus back and forth. By the way, it may pay off to see if the I2C sensor can tolerate 3.3V on its I2C bus: some do and if so you don't need the level translator at all.
Re: Interfacing the Wroom32 with a 1.8v I2C Sensor
Hello ESP_Sprite
Thanks for the response once again.
I was thinking using the level shifter at the system end rather than at the sensor end. According to the Idd vs Vdd graph in the datasheet, the sensor consumes more current at higher voltages. If i shift the voltage down from 3.3v to 1.8v at the system side, it should compensate for the use of a level shifter which consumes its own bit of power, Right? Is this assumption proper?
The I2C sensor is an HDC2010 temp and humidity sensor. The Datasheet says that the absolute maximum rating of the SCL and SDA pins are 3.9V but the electrical characteristics says VIH is 0.7xVDD. See: https://www.ti.com/lit/ds/symlink/hdc20 ... 52FHDC2010
The VDD pin for the sensor in my device sees 1.8v from an LDO regulator.
Does having a max rating of 3.9v imply that the sensor will be able to communicate with the 3.3v MCU GPIO through I2C?
Thanks Again
Thanks for the response once again.
I was thinking using the level shifter at the system end rather than at the sensor end. According to the Idd vs Vdd graph in the datasheet, the sensor consumes more current at higher voltages. If i shift the voltage down from 3.3v to 1.8v at the system side, it should compensate for the use of a level shifter which consumes its own bit of power, Right? Is this assumption proper?
The I2C sensor is an HDC2010 temp and humidity sensor. The Datasheet says that the absolute maximum rating of the SCL and SDA pins are 3.9V but the electrical characteristics says VIH is 0.7xVDD. See: https://www.ti.com/lit/ds/symlink/hdc20 ... 52FHDC2010
The VDD pin for the sensor in my device sees 1.8v from an LDO regulator.
Does having a max rating of 3.9v imply that the sensor will be able to communicate with the 3.3v MCU GPIO through I2C?
Thanks Again
-
- Posts: 73
- Joined: Mon Mar 09, 2020 7:36 pm
Re: Interfacing the Wroom32 with a 1.8v I2C Sensor
Sprite makes an interesting comment about connecting to a I2C device. While there is a question of the remote device being able to survive getting 3.3V Inputs, Is there not the corollary of the ESP32 being able to recognize a low voltage one ? As I recall a 3.3V system is normally going to want 70% of VDD to call it a one and 7-% of 3.3 is 2.3V which is well above 1.8. If the ESP32 is making the 0/1 decision at a lower level, I would like to know what it is. Is it reducing the dead-band or dropping both limits to a lower value?
Re: Interfacing the Wroom32 with a 1.8v I2C Sensor
Why not supply it with 3.3v as well and save all this trouble? Why do you need the 1.8v rail at all? Is there something I'm missing?
There is, that's why Sprite is suggesting either a level shifter to bring up the sensor's 1.8v logic to 3.3v for the ESP32, or to pull the whole bus up to 3.3v if the sensor can tolerate that (it can, if its supply is also 3.3v).Scott.Bonomi wrote: ↑Wed Sep 23, 2020 1:14 amIs there not the corollary of the ESP32 being able to recognize a low voltage one ?
**
Actually the datasheet seems to suggest it is fine with I2C up to the max voltage regardless of VDD. 0.7xVDD is just the logic level.
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Interfacing the Wroom32 with a 1.8v I2C Sensor
+1 on Borchuz. Seems you can just feed your sensor off 1.8V and it will tolerate 3.3V levels on its SDA and SCL pins. Technically, as I2C is open-drain, all you would need to check is if the Vil threshold of the sensor and ESP32 are compatible with the voltage each one puts out when sending a '0', but I highly doubt that would be an issue here. I'd say you can just hook everything up, feed the ESP32 3.3V and the sensor 1.8V, and go for it.
Who is online
Users browsing this forum: Google [Bot] and 105 guests