5V input concern on M5StickC
-
@ajb2k3 ESP32 ADC takes up to 3.3v. Tips for tuning when reading that full scale be found here: https://www.youtube.com/watch?v=RlKMJknsNpolink text
-
@grelm If you find out anything more about the ability of the M5StickC to handle 5v IO please post it. Once I have a second unit I will probably disassembly one to see if I can identify any protection on the board. Meanwhile I am looking at level shifters but there is nothing on the market that is easy to interface with the grove connector. May have to resort to making up something inline that uses only 5v to power both the high and low side (with a regulator from the 5V) and see if that works.
-
@wikistik said in 5V input concern on M5StickC:
@grelm If you find out anything more about the ability of the M5StickC to handle 5v IO please post it. Once I have a second unit I will probably disassembly one to see if I can identify any protection on the board. Meanwhile I am looking at level shifters but there is nothing on the market that is easy to interface with the grove connector. May have to resort to making up something inline that uses only 5v to power both the high and low side (with a regulator from the 5V) and see if that works.
New product idea here, you better go and develop it before someone else does!
There isn't any protection, 5v on the io will go directly into the esp32! -
@ajb2k3 Yeah it would be awesome if someone put a level shifter with the grove connectors on the market. I'm not interested in manufacturing. I may make a few up for the people I work with though.
-
Just providing a bit of information on this topic. I have a project that uses the XKC Y25 T12V liquid level sensor (5-24V). I feed the sensor with 5V and GND from the M5stickC pin extension headers on top. I'm reading the sensor's digital status (LOW/HIGH) on pin G36. When I disconnect the wire from pin G36, the sensor reads ~4.9V during a HIGH state (as expected). When I connect the wire to pin G36, the sensor reads ~3.7V during a HIGH state. So I can only assume the I/O-lines are clamped to 3.3V somewhere inside. It would be good to see the schematic to confirm this though.
-
Thanks for the info @world101. I have posted my notes on the 5 volt concern with the M5StickC here: http://tinkerfarm.net/projects/the-m5stickc/the-5-volt-danger-with-the-m5stickc/.
I will update these if new data emerges. -
It seems that the ESP32 (M5Stack and M5Stick) Groove I2C pins (and all GPIO pins of the ESP32) are 5 Volt tolerant.
-
The M5 16-Key Capacitive Touch Unit uses a MEGA328 Chip directly connected to the Groove I2C connector of the M5Stack/Stick. The 328P runs on 5 Volts. The SCL / SDA connectors are protected with inline 470 Ohm resistors limiting the current to the ESP32 GPIO Inputs (21,22 resp. 32,33). You will find the full schematic in https://m5stack.com/collections/m5-unit/products/makey-unit under the "More information" tab. (The 328P is programmed to behave as an I2C slave).
-
Baoshi in his blog (https://www.ba0sh1.com/blog/2016/08/03/is-esp8266-io-really-5v-tolerant/) found some old datashees from expressif describing the ESP8266: "All digital IO pins are protected from over-voltage with a snap-back circuit connected between the pad and ground. The snap back voltage is typically about 6 Volts, and the holding voltage is 5.8 V".
Conclusion: If you are using external 5 Volt devices with an I2C Groove bus attached to the M5Stack, you will be on the safe side by limiting the current to the SCL/SDA inputs to the M5 Stack passing through 470 ohm resistors. There is no need to implement level shifters. You may even put 4K7 resistors on the SDA/SCL lines as pull up resistors to 5 Volts.
-
-
@crami25 said in 5V input concern on M5StickC:
It seems that the ESP32 (M5Stack and M5Stick) Groove I2C pins (and all GPIO pins of the ESP32) are 5 Volt tolerant.
-
The M5 16-Key Capacitive Touch Unit uses a MEGA328 Chip directly connected to the Groove I2C connector of the M5Stack/Stick. The 328P runs on 5 Volts. The SCL / SDA connectors are protected with inline 470 Ohm resistors limiting the current to the ESP32 GPIO Inputs (21,22 resp. 32,33). You will find the full schematic in https://m5stack.com/collections/m5-unit/products/makey-unit under the "More information" tab. (The 328P is programmed to behave as an I2C slave).
-
Baoshi in his blog (https://www.ba0sh1.com/blog/2016/08/03/is-esp8266-io-really-5v-tolerant/) found some old datashees from expressif describing the ESP8266: "All digital IO pins are protected from over-voltage with a snap-back circuit connected between the pad and ground. The snap back voltage is typically about 6 Volts, and the holding voltage is 5.8 V".
Conclusion: If you are using external 5 Volt devices with an I2C Groove bus attached to the M5Stack, you will be on the safe side by limiting the current to the SCL/SDA inputs to the M5 Stack passing through 470 ohm resistors. There is no need to implement level shifters. You may even put 4K7 resistors on the SDA/SCL lines as pull up resistors to 5 Volts.
A point of notice here that the signal lines are not always 5v as the units often have their own 3v3 voltage regulator fitted to them.
A second point of notice with the makey makey, it is possible to "Short Out" some of the pins which can cause the M5Stack to restart or just shut down.
First time I did this i though i had killed my M5Core. -
-
@ajb2k3 Until Espressif changes their datasheet on the ESP32 this is officially not a 5V tolerant device. Many devices will work with it, but I will continue to test each one before telling people it is OK.
-
@wikistik It would be nice to have a list of compatible "Safe" addons
As I said before, M5Stack units have internal 3v3 regulators to reduce the 5v down to safe voltage.
I have mentioned this in my UIFLOW book with the circuit diagram of the regulator.