Pahub error with CORE2 with GoPlus2



  • I have a PAHub not connected error if I use a GOPLUS2 with my CORE2. The Pahub works perfectly, then if I add the GOPLUS2, I have a Pahub not connected error.
    I tried to change the I2C address to 0X71 or 0X75 without success ...0_1612029359667_IMG_5732.JPG



  • Hello @Arno

    I don't have a GoPlus2, so my assumption might be incorrect.

    That said, looking at the GoPlus2 schematics there is an MBus pin used for IR_OUT. On M5Stack devices that pin is GPIO5, however on M5Core2 that pin is GPIO33 which on M5Core2 is also used as PA_SCL. The I2C bus operates with pull-up resistors on SDA and SCL lines, but the IR_OUT circuit in GoPlus2 has a pull-down resistor on GPIO33. My guess is that the IR_OUT circuit interferes with the I2C operation.

    For reference: M5Stack bus vs M5Core2 bus GPIOs

    Thanks
    Felix



  • @felmue
    Excellent analysis.
    I am surprised that there is not a compatibility table between the modules and CORE as well as the modules between them!

    Have any idea how to connect CORE 2 :

    • GOPLUS2
    • 2 x TOF UNITS
    • 2 x ULTRASOUND UNITS
    • AMmeter UNITS
    • Voltmeter UNITS
    • Relay UNITS
    • NeoPixel

    Thank you in advance for all the help you gave in this forum



  • Hello @Arno

    you are welcome.

    If my analysis indeed is correct and IR_OUT in GOPLUS2 is the reason I2C stops working properly on port A, then for the units you'd like to connect to the M5Core2, I personally would modify the GOPLUS2 and cut the trace from GPIO33 to the IR_OUT. With that one modification you'd regain the functionality of port A. Then with the help of the PaHub this should cover the TOFs, Ultrasonics, AMmeter and Voltmeter units. I assume the Relay unit can be connected to the GOPLUS2. The NeoPixel I don't really know. The battery bottom for M5Core2 uses GPIO25 for that, so I guess that would work. How to connect to GPIO25 w/o soldering I have no idea.

    Option 2: use an M5Stack device instead of the M5Core2

    Option 3: find another GPIO that is free and can be used in place of GPIO33. However without electrical modification I don't see how the units could still simply be plugged into existing ports.

    Option 4: Modify M5Core2 port A to use GPIO21 and GPIO22 (same as M5Stack devices do).

    Option 5: wait and hope that M5Stack will release an updated GOPLUS2 module which works with M5Core2 out of the box.

    Thanks
    Felix



  • I took your advice # 1 by turning off IR OUT and it works wonderfully. thank you again for your help, it allows me to progress quickly.
    0_1612126567247_8c4b9ab2-bcf6-4888-96e3-326390967cb9-image.png



  • Hello @Arno

    nice! Thank you for the feedback. I am glad to hear it works now.

    @Zontex @m5stack :
    Maybe it would make sense to add a note in the GoPlus2 description about the incompatibility with M5Core2?
    And if not happened already maybe think about a modified GoPlus2 version where the GPIO for IR_OUT can be chosen through a dip switch to allow it to work with M5Stack and M5Core2 devices?

    Thanks
    Felix



  • @arno Hi Arno, could you share the code of turning off the IR_OUT?



  • @lishengkkk I only use UIFLOW, no need to change the code once the connection is cut



  • @arno Hi, Arno, thanks for the reply, but the 'cut' here means physically cut the wiring on the PCB board?
    is it fine if we physically cut it on the board (there might a big chance to damage the board)?



  • @lishengkkk all it takes is a small stroke of the cutter and the track is cut cleanly.
    I scraped off the white paint to get to the copper. So if needed a drop of solder and everything works as it did at the start.0_1649879088139_Afficher les photos récentes.png



  • Why are you trying to connect the Pahub which uses i2c to the Goplus2's analog IO ports?
    the ports don't support I2C and so the PaHub won't work on it?
    The Goplus2's analog ports are connected and controlled by the STM32 that provides the analog expansion and so again I2C devices will NOT work connected to those ports. Thats why the ports have black surrounds and not red surrounds.



  • Hello @ajb2k3

    just curious - from where did you get the impression we'd like to connect PaHub to the analog IO ports of the Goplus2?

    The setup is like this. PaHub is connected to port A of the M5Core2 and works as expected. But as soon as GoPlus2 is stacked the PaHub stops working due to a conflict of GPIO33 which is used for I2C on port A (on M5Core2) as well as for IR_OUT (on GoPlus2).

    The hardware modification I suggested is to sacrifice IR_OUT (by cutting the trace) so that PaHub (connected to M5Core2) still works when GoPlus2 is stacked as well.

    Thanks
    Felix



  • @felmue said in Pahub error with CORE2 with GoPlus2:

    Hello @ajb2k3

    just curious - from where did you get the impression we'd like to connect PaHub to the analog IO ports of the Goplus2?

    The setup is like this. PaHub is connected to port A of the M5Core2 and works as expected. But as soon as GoPlus2 is stacked the PaHub stops working due to a conflict of GPIO33 which is used for I2C on port A (on M5Core2) as well as for IR_OUT (on GoPlus2).

    The hardware modification I suggested is to sacrifice IR_OUT (by cutting the trace) so that PaHub (connected to M5Core2) still works when GoPlus2 is stacked as well.

    Thanks
    Felix

    Looks like I missread the posts.
    I'm going back to bed, Sorry!