UIFlow for StepMotor Driver M039 (HR8825)



  • Hi,
    We use the StepMotor Driver module M039 to drive 2 sliders (linear actuators). With UIFlow there are some blocks especially for this module. We faced some issues. Succeed to get around. And think it may be worth sharing our finds with you.

    0_1642086433188_IMG_9915.png

    1/ This module doesn't work with M5stack Core2 & AWS. Some GPIO pins are already in use. Haven't found that info clearly stated in the documentation or in the M5 shop. Maybe I missed it ?? It works well with Core1. But it's not easy to guess because it's a new module (august 2020).
    0_1642091337043_Capture d’écran 2022-01-13 à 17.28.28.png
    2/ Till you connect the StepMotor Driver it becomes impossible to reload a program by pressing "run" in UIFlow a second time. You need to reset the core1 each time you want to send your program again from UIFlow.
    3/ Don't set the freq to 0 or the rest of your program will fail silently... Set it to 1 instead if needed.
    0_1642086086737_Capture d’écran 2022-01-13 à 16.01.02.png
    4/ Can't succeed to pilot the 2 motors individually with the dedicated UIFlow blocks. When we use the Set single motor X state 1 and 2 motor are attached (say on X and Y), both start and stop at the same time. Same if you use Set single motor Y state 1 ... We get around this bug by using the Hardwares>PWM fonctions this way :
    0_1642085913698_Capture d’écran 2022-01-13 à 15.57.45.png
    Please notice that we use the PWM module with the 2 Core1 timers (0 and 3) and that our workaround will not work if you need to control 3 motors...

    A very tiring experience ! It would be great if the documentation be more explicit and that this module and UIFlow functions works a little "more" I would say.
    But at the end it works.