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

    Making a Robot: USB-C -> ATOM -> 2x SERVO2 ?

    PROJECTS
    6
    21
    20.3k
    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.
    • felmueF
      felmue
      last edited by felmue

      Hello @Schlabbermampf

      just to be clear. The servos attached to the SERVO2 module will not be powered from the Battery Module (or the battery bottom of the FIRE). The Battery Module will only power the M5Stack device.

      The SERVO2 module has a separate VBAT_2 line which is not connected to the VBAT of the Battery Module or M5Stack device. Check the schematic here. Subsequently the magnetic charger will only charge the battery for the M5Stack.

      You'll need to attach a separate battery to the SERVO2 module directly at the DC INPUT (6 - 12V) using the provided thick wired cable. And it probably will need substantially more capacity than the 500mAh of the Battery module anyways. One servo has a rated Locked rotor current of about 750mA and your battery needs to drive 12 of them. See specification here.

      And you'll have to charge the battery for the servos with an external charger.

      I would probably start w/o the battery for the servos and initially power them through an external power supply. With that setup you could measure the DC current of the working robot and then depending on how long it should run from battery decide on the size and capacity of the battery. (Which will add additional weight to the robot.)

      Thanks
      Felix

      GPIO translation table M5Stack / M5Core2
      Information about various M5Stack products.
      Code examples

      1 Reply Last reply Reply Quote 2
      • S
        Schlabbermampf
        last edited by

        @felmue Thank you for your kind answer! Since the shop description of the SERVO2 states: "When the battery base is used for power supply, the maximum output power is 5V / 2A." So it sounds like its possible in general but realistically to drive 1 or 2 servos at a time? or do i miss the point? i understand that the Battery-Module is way to weak to power all the servos at once.

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

          @schlabbermampf said in Making a Robot: USB-C -> ATOM -> 2x SERVO2 ?:

          @ajb2k3 yes makes sense, thats what the SERVO2 module shop-description says, i just get it to understand slowly ;D (just discovered the Documentation of all the M5 parts!) since i like to use the 360° servos with speed and direction control via PWM it may be possible to ensure (in software) a limit for the applied power in total.

          Looks like bridging the 30 pin MBus over some short distance with a cable is kinda overkill so a single stack it shall be.

          Power management strongly depends on what the servos have to lift, so overall weight-balance/efficiency of all parts is what its all about then in the long term (even when plugged into a full power source).

          So i want to get my hands on these pieces soon and start digging. happy to share some progress here :D
          Thanks for your kind and fast replies :D

          edit: here is the stack, quite simple. (hope these servos do not fry to soon):

          You will need to add a 200ms wait at the end of the program loop (or was it 500ms) to slow down the command transmissions otherwise they will fry (I have learned that the hard way after killing 3!)

          As @felmue stated, the battery packs will not power the servos, the servos will only be powered from the external supply. If you try, the Fire will suffer from "Brown outs" and keep resetting when more then a few try to operate.

          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 1
          • S
            Schlabbermampf
            last edited by Schlabbermampf

            @ajb2k3 okay makes sense somehow, so it is dangerous to change the commands to the servos with a very high frequency. That makes it of course harder to just run a single servo at a time xP
            But in general it sounds reasonable to control 12 servos but power only 1 at a time with a battery-module?

            1 Reply Last reply Reply Quote 0
            • felmueF
              felmue
              last edited by

              Hello @Schlabbermampf

              looking at the schematics I don't see a path from the 5V the M5Stack device provides to the outputs of the servos. I think that statement "When the battery base is used for power supply, the maximum output power is 5V / 2A". is wrong. Also a little below there is another statement "The module must use the external power supply of DC interface when driving the servo." which contradicts the first one.

              That said, I don't own this particular module so I cannot say for sure what is correct and what not.

              Thanks
              Felix

              GPIO translation table M5Stack / M5Core2
              Information about various M5Stack products.
              Code examples

              1 Reply Last reply Reply Quote 2
              • S
                Schlabbermampf
                last edited by Schlabbermampf

                @felmue thank you for clearing this up! the schemantics are surely to trust!
                taking a look at the "PLEN5Stack DIY Small Bipedal Robot" it uses a custom "Control-Board" to connect the servos, and has also a custom battery plugged into (1500 mAh)... 8 servos are though an optimistic number

                1 Reply Last reply Reply Quote 0
                • S
                  Schlabbermampf
                  last edited by Schlabbermampf

                  okay lets try this setup. from the descriptions it seems to be perfect for a robotic-arm. so just need 6 of these. interconnecting them in a row using the Port.B and Port.C plugs on the Motion-board and Grove cables.
                  in software the servo-controls get piped from the usb-connection down the Ports through all the ATOMs.
                  0_1642875503705_bb0556b4-238b-47e4-88ad-b90d90f978c1-image.png

                  Maybe this sounds reasonable. Sadly the ATOM Motion Kit is currently Out of Stock

                  edit: in case the servo-controls can not be passed easily/quickly though the row-connection (e.g. the data needs to be received and sent by each ATOM with major delay), it may make sense to connect them using a PaHUB2 and an additional ATOM for parallel distribution?

                  1 Reply Last reply Reply Quote 1
                  • S
                    Schlabbermampf
                    last edited by

                    On one hand things are going great and i'm learning a lot on the way.

                    On the other hand i realized that reading the Position of a servo, like it is shown in the Arduino example-code of the Motion Kit, is not sufficient as sensory-data (it just represents the applied position/velocity). Due to physical interaction i want to track the real, measured angle to compare with the desired.

                    So in the long run i'll use servos with Position-Feedback to read the angle from the additional wire. As noob its hard to compare any specs, but the "KST MR320 PF" may be appropriate as replacement (still confused about the min and max angle it can take, it must not turn infinite, but a range of at least 270° would be great).

                    For the current prototyping, i will extend each servo with an Angle-Module (potentiometer), combined with a PbHub and connected to the Motion-Kit. This may be a bit overkill (in cables and weight), but cheaper and sufficient to have a nervous-system as processing-inputs.

                    1 Reply Last reply Reply Quote 0
                    • H
                      hacxx Banned
                      last edited by

                      Your setup sounds doable! The ATOM Lite ESP32 can control two SERVO2 modules (12 servos each) without major issues, but powering 24 servos may require careful battery and power management. Using separate battery modules with a single charging base is smart—just ensure proper wiring and charging circuits. For streaming camera data over USB-C, the ATOM Lite might struggle; upgrading to an ESP32-C3 or Core might be better. LEGO framing is a great idea for prototyping! Start small, test servo control and power, then scale up step by step.

                      felmueF 1 Reply Last reply Reply Quote 0
                      • felmueF
                        felmue @hacxx
                        last edited by

                        Hello @hacxx

                        sorry, but I do not understand why you would reply to a post three years later. It just doesn't make sense to me.

                        Plus an M5Atom Lite doesn't stack well with any module as it doesn't have the M5Stack bus.

                        Thanks
                        Felix

                        GPIO translation table M5Stack / M5Core2
                        Information about various M5Stack products.
                        Code examples

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