5V input concern on M5StickC



  • I just acquired a M5StickC and it seems a good general purpose device for teaching micro controllers and prototyping. However I have one one concern. The ESP32's GPIO pins are not 5 volt tolerant. The Stick outputs 5V on both the Grove connector and the header pin. So if a student connects a switch between the 5V header pin and one of the GPIO pins bad things are going to happen, correct? Just wanted to confirm this danger.

    Also what is the function of the BAT header pin?



  • BAT pin used to connect lithium battery, and if use 5v connect to ESP32 GPIO, Esp32 will be damaged



  • Thanks on BAT. Why is the grove port 5v I wonder? Seems like a really bad choice in designing this since one ends up connecting a 5V grove device to an 5V intolerant ESP32.



  • @wikistik It is because the grove standard uses 5v power lines but each unit contains a 5v to 3v3 step down power supply where needed.



  • According to the M5Stack schematic, the ESP32 I/O-lines are clamped to 3,3V by Zenerdiodes of the diode array RLSD52A031V.
    Just make sure, that the current from the 5V-line thru the diodes does not exceed the rated continious value.
    As I want to connect several DS18B20 temperature sensors via Grove B port, I will have to connect a 4,7 kohm resistor between 5V-line and data-line (which is connected to GPIO 26 of the ESP32).
    Although I didn't find the continious current rating of the DS18B20, I think it will be ok: I = (5V-3,3V)/4700 ohm = 0,36 mA. P-Diode = 3,3V*0,36mA=1,2mW.!

    ADDENDUM/NOTE: the attached schematic is an extract of the M5STACK schematic and my comments are therefore valid for the M5STACK only. Unfortunately I have not found the Schematic of the M5STICKC and therefore I don't know if there are clamping-Diodes build in.

    0_1560408590015_M5Stack-3.3V-Clamping-Diodes.jpg



  • @wikistik never connect a bare switch to modern devices as they will have trouble reading them. Always use a voltage divider to connect a button. For an example if this, look in the projects forum for the UIFLOW Hand book and you will find the schematics for the button units made by M5Stack reproduced inside.



  • @ajb2k3 If every unit from SEEED steps down power to 3v3 for the return data then there is no problem and I will retract my complaint about giving the stick connector 5V out. I guess I will have test them one by one, which will be kind of fun :). The appeal of the grove connector in a educational setting is that a student can just connect a grove module to the Stick and use it without additional circuitry. So this is the sort of thing I am concerned about getting 5V back from from the grove module on the Stick input:
    https://www.seeedstudio.com/Grove-Button-p-766.html
    https://www.seeedstudio.com/Grove-Slide-Potentiometer-p-1196.htmllink text

    I know how to use a voltage divider when working with the header pins and a bread board setup.

    I am very interested in using bunches of these Sticks in the classroom and want to find all the gotchas now. Current doing battery rundown testing.



  • @wikistik don’t worry about it we learn from asking. What confused me was the esp32 specs say that analogue in is supposed to be between 0&1 volt which has left me head scratching. Grove doesn’t require a 5 v signal only a 5v supply to devices. The system allows for both 5&3v3 device but it’s up to the manufacturers to specify if there device is 5v or not.



  • @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.