🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Goplus dc motor driver

    General
    5
    20
    35.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ajb2k3A
      ajb2k3
      last edited by

      Unfortunately the module is so new that not many of us have got it. but from the LV8548 datasheet the motor driver can only output 20v @ 1amp max so as long as your blower falls within the specifications of the motor driver then you should be ok.
      Please not that you will also need an external power supply for the goplus in order to drive the loads.

      UIFlow, so easy an adult can learn it!
      If I don't know it, be patient!
      I've ether not learned it or am too drunk to remember it!
      Author of the WIP UIFlow Handbook!
      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

      1 Reply Last reply Reply Quote 0
      • R
        rob.biernat
        last edited by

        Thanks.

        Powering the blower fan was my next question.

        Right now when I use the mosfet module my fan is powered separately and isolated from the m5 stack. I use those cheap usb power banks the size of a big pen.

        Thanks

        Rob

        1 Reply Last reply Reply Quote 0
        • ajb2k3A
          ajb2k3
          last edited by

          what is the fan?

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          1 Reply Last reply Reply Quote 0
          • R
            rob.biernat
            last edited by

            Hi

            Yeah it's a 5V blower. Doubt it will be more then 0.5A so should be good here

            You mentioned I will need to power my m5stack externally? Why can't I use one of the bases that has a battery?

            Or do you mean I need to provide separate power to the go plus module itself via the onboard servo power input. If that's the case then it's not that different to providing separate power to fan and using relay or mosfet.

            Anyway it usually takes a week to get to Australia so hopefully I can play with it next week

            Rob

            Rob

            1 Reply Last reply Reply Quote 0
            • ajb2k3A
              ajb2k3
              last edited by

              Yes, a separate supply to the gobase for the motors.
              That is the best way to think of it.

              It is wise to provide a separate power supply as trying to draw from the M5Stack own internal supply could damage the device. I'm getting a collection of custom leads now for powering things from a various power supplies.
              I have USB > Grove (for neopixels)
              Lego PF to XT30 for powering the lego module,
              Barrel jack to XT30 for connecting modules to the workshops lab power supply.

              UIFlow, so easy an adult can learn it!
              If I don't know it, be patient!
              I've ether not learned it or am too drunk to remember it!
              Author of the WIP UIFlow Handbook!
              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

              1 Reply Last reply Reply Quote 0
              • R
                rob.biernat
                last edited by

                My goplus arrived yesterday so I'm going to have a play with it over the weekend.

                However I have a question regarding the two dc motor outputs. What physical connection do these use? From the pic I thought they were 2 pin jst but I just tried connecting up a dc blower fan that uses 2pin jst and it wouldn't fit.

                Also regarding the xt30u input for power it says 9v to 24v however I'm not planning on using anything larger then 5v. Is this an issue. In this case I plan on just powering the dc motors with a 5v usb power bank.

                Thanks

                Rob

                ajb2k3A 1 Reply Last reply Reply Quote 0
                • ajb2k3A
                  ajb2k3 @rob.biernat
                  last edited by

                  @rob-biernat I don't have one so I cant guess but there are several different versions of the 2pin JST. In what way does it not fit and can you provide photos of the connections?

                  UIFlow, so easy an adult can learn it!
                  If I don't know it, be patient!
                  I've ether not learned it or am too drunk to remember it!
                  Author of the WIP UIFlow Handbook!
                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                  1 Reply Last reply Reply Quote 0
                  • R
                    rob.biernat
                    last edited by

                    My blower fan uses what I think is jst ph series which has a 2mm pitch.

                    It seems like it's a fraction too large for the m5 stack though.

                    Surely someone on this forum knows the specifics?

                    ajb2k3A 1 Reply Last reply Reply Quote 0
                    • ajb2k3A
                      ajb2k3 @rob.biernat
                      last edited by

                      @rob-biernat Normally the fans connections are using the 2.54mm JST PH spacing which would explain the issues.

                      UIFlow, so easy an adult can learn it!
                      If I don't know it, be patient!
                      I've ether not learned it or am too drunk to remember it!
                      Author of the WIP UIFlow Handbook!
                      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                      1 Reply Last reply Reply Quote 0
                      • R
                        rob.biernat
                        last edited by

                        Ok no probs. For now I have stuff going with a jumper wire hack but I can buy some proper jst cables tommorow.

                        Is the person who wrote the go plus firmware and sample code on this forum? I can understand most of the code but since the code is not documented and not included in the m5 stack arduino library I need some help understanding the messages that get sent out on the i2c bus and what they do.

                        ajb2k3A 1 Reply Last reply Reply Quote 0
                        • ajb2k3A
                          ajb2k3 @rob.biernat
                          last edited by

                          @rob-biernat Looks like he is but he is not active.
                          @zhouyang can you help?

                          UIFlow, so easy an adult can learn it!
                          If I don't know it, be patient!
                          I've ether not learned it or am too drunk to remember it!
                          Author of the WIP UIFlow Handbook!
                          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                          1 Reply Last reply Reply Quote 0
                          • R
                            rob.biernat
                            last edited by

                            Ok so I have the dc motor controller working but when will the sample code be cleaned up and documented. At the moment it's a bit rough with lots of magic numbers scattered through the code. Ideally a proper api

                            1 Reply Last reply Reply Quote 0
                            • R
                              rob.biernat
                              last edited by

                              Any updates from the bloke who wrote the code?

                              1 Reply Last reply Reply Quote 0
                              • R
                                rob.biernat
                                last edited by

                                Anything from the programmer?

                                ajb2k3A 1 Reply Last reply Reply Quote 0
                                • ajb2k3A
                                  ajb2k3 @rob.biernat
                                  last edited by

                                  @rob-biernat said in Goplus dc motor driver:

                                  Anything from the programmer?

                                  Nope, still waiting.

                                  UIFlow, so easy an adult can learn it!
                                  If I don't know it, be patient!
                                  I've ether not learned it or am too drunk to remember it!
                                  Author of the WIP UIFlow Handbook!
                                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                                  1 Reply Last reply Reply Quote 0
                                  • lukasmaximusL
                                    lukasmaximus
                                    last edited by

                                    Is this the code in question?

                                    #include <Arduino.h>
                                    #include <M5Stack.h>
                                    
                                    #define IrPin 13
                                    #define PLUS_ADDR 0x62
                                    
                                    int32_t number = 0;
                                    uint8_t press = 0;
                                    
                                    
                                    void setup() {
                                        M5.begin(true, false, false);
                                        M5.Lcd.setTextFont(6);
                                        M5.Lcd.clear(BLACK);
                                        M5.Lcd.setTextColor(ORANGE, BLACK);
                                        Wire.begin();
                                        ledcSetup(1, 38000, 10);
                                        ledcAttachPin(IrPin, 1);
                                    }
                                    
                                    void plus_encode() {
                                        Wire.requestFrom(PLUS_ADDR, 2);
                                        while(Wire.available()) {
                                            int8_t encode = Wire.read();
                                            uint8_t press_n = Wire.read();
                                            number += encode;
                                            if(press_n == 0xff) {
                                                press = 0;
                                            }
                                            else {
                                                press = 1;
                                            }
                                        }
                                    }
                                    
                                    void loop() {
                                        char data[20];
                                    
                                        plus_encode();
                                        ledcWrite(1, ledcRead(1) ? 0 : 512);
                                        sprintf(data, "%d  %d        ", number, press);
                                        M5.Lcd.setCursor(100, 100);
                                        M5.Lcd.print(data);
                                        vTaskDelay(200);
                                    }
                                    

                                    I have a feeling the engineer who wrote the code may no longer work at M5Stack but i'll make an enquiry.

                                    1 Reply Last reply Reply Quote 0
                                    • L
                                      liushasha
                                      last edited by

                                      @rob-biernat
                                      PH2.0

                                      https://item.taobao.com/item.htm?spm=a1z10.3-c-s.w4002-21223910208.112.64e66a4bJ99Q2L&id=522578768957

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        rob.biernat
                                        last edited by

                                        Ok given the bloke who wrote the code has left can someone please at least document the i2c messages?

                                        1 Reply Last reply Reply Quote 0
                                        • V
                                          vany5921
                                          last edited by

                                          https://github.com/m5stack/GoPlus/blob/master/src/src.ino this is sourece code

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post