Need Help with Hardware I/O on Core2



  • I'm interested in starting a project using an M5Stack Core2 AWS that I have which would principally be communicating through the Serial Port (GPIO1 & GPIO3) with a Ham Radio device.

    I'm not real familiar with the hardware on the M5Stack, but I need to interface with the serial port for communication.

    I don't understand how I physically connect to the M5Stack GPIO pins 1 and 3. When I remove the 4 Allen screws, I have access to the GPIO pins, but how to I get access to them when I have the lower part connected to the display? Is there a way to get the connections through one of the outside I/O connectors?

    I've looked at the docs (https://docs.m5stack.com/en/core/core2) but it isn't clear to me how to do the hardware interface.

    I'm fairly familiar with Arduino programming, so I'll go with that for now.

    Sir Michael, W0IH



  • Hello @SirMichael

    you do not want to use GPIO1/3 as they are connected to the USB serial converter and are used for downloading and debugging.

    That said the serial port you can use is the blue Groove port C (GPIO13/14) accessible on the AWS M5GO Bottom. See here - section PinMap / M5GO-Bottom For AWS PORT.

    Then use Serial2 to communicate like it is done in this example.

    Thanks
    Felix



  • Felix,

    That really helps, and makes sense! That appears to be the bottom that I have on my M5Stack. I should be able to figure it out from there...

    Silly question, but what do I use for an I/O connector?

    Thanks!
    Sir Michael



  • Hello @SirMichael

    maybe use a Groove cable and cut off one side? Or use a Groove cable with a GROVE_TO_4P. Or use a GROVE2DUPONT cable.

    Thanks
    Felix



  • Hello @SirMichael

    and another thing. While the Groove port provides 5 V (red cable) the data lines (yellow and white) are connected directly to the ESP32 which is strictly 3.3 V.

    So, dependent on what voltage level the device you want to talk to is using, you might need a voltage level shifter.

    Thanks
    Felix



  • @felmue
    Yes, I'm aware of the voltage limits. I'm pretty sure that I have some Serial converters that will limit the Rx voltage. I had bought some MAX3232 serial converters on ebay for a previous project that were garbage, but ordered real MAX parts to replace the chips.

    I will verify that they are not just TTL level converts.
    I appreciate the reminder.
    Sir Michael



  • I am surprised that Grove level shifters are not part of the M5Stack hardware offering.

    Just today I went onto JLCPCB and designed myself a PCB that can fit in shrink tube and has a Grove socket on each side, the board has a level shifter that converts a Grove (5V power + 3.3V logic) to pure 5V power + 5V logic. (it's a level shifter board that generates its own 3.3V reference with an LDO). I made an order of 90 boards at a shipped cost of $135, so a little over a buck a board. I am just surprised nobody seems to sell this, least of all M5Stack with a core offering of 5V power + 3.3V logic on just about everything.

    By the same process I could quickly make a set of boards that takes 5V power 3.3V logic from one side, and gives 3.3V power 3.3V logic on the other (just by duplicating the design, rearranging the components and deleting the level shifter). I'll probably do it the day I need it. Or maybe sooner.