General Advice for new robot project with 12 BLDC motors

I am starting to do a rough design for the second generation of my small quadruped robot. My current model uses 12 hobby style servo motors. These are grossly under powered but do allow me to develop the software.

Now I want to work on a robot that uses 12 BLDC motors, My goal is to start in 2023 and aim for the lowest possible cost implementation. I’d like to aim for motors that have peak current of about 30 amps. Again, I need 12 motors. I’d like to use an (about) 800 KV out runner “drone motor”.

I am looking for advice on the motor driver. I can design simple PCBs in KiCad. But my degree is in computer science. Design goals are (1) cost and (2) overall volume (cubic inches) of the entire set of 12 FOC drivers.

One way to lower cost is to design the driver board(s) so that it uses parts (MOSFETs) from JLCPCB’s “short list” because then they will sell it to you for pennies and solder the SMT part for free. Is there a MOSFET part anyone can suggest? Even better, a reference design I could use for that part?

Advice on a microcontroller. I doubt any cortex-M can run 12 copies of simple FOC. I’d expect to run out of both pins and CPU cycles. Reducing the number of microcontrollers reduces the overall volume and cost. Which is the best for this? Has 3 or 4 motors per uP been done?

I know I will have to build many prototypes but maybe you all can help by offering some realistic advice.

If you are wondering, The top level controller in the robot is a Raspberry Pi4 running a real-time Linux. It is connected via Wi-Fi to a 16-core Xeon server. This off loads weight, volume and cost from the robot but I can’t offload FOC or MOSFETs. My goal is to get this to < $100 per motor for the motor, driver and sensors. I can lower the peak power if it saves enough cost and space.

Hey Chris,

Sounds like a cool project!!

There are several people on this forum who are working on quadrupeds, check out the posts and YouTube channel of @David_Gonzalez - he also has a Discord dedicated to quadrupeds.
You could also take a look at his “Dagor” BLDC controller, specifically designed for his quadrupeds - perhaps it suits your needs. Not sure if he has any available right now.

To answer some of your questions:

  • I’m not sure if anyone has run more than 3 BLDCs on a single MCU with SimpleFOC.
  • It’s totally impossible to run 12 BLDCs on one MCU, I can tell you that right away, but its also not a very realistic proposition to run 3 or 4 on a single MCU
  • You can buy some BLDC drivers (intended for use with gimbal motors) that can handle 3 BLDCs - check out the Storm32 boards, or ST-Microsystem’s STEVAL-GMBL02V1
  • But these are very low power, 2Amps or so per motor is all you can realistically get.
  • For the dynamic movements of a quadruped you probably will want torque control and current sensing, so its not just the PWM outputs you have to consider but also the ADC inputs. Even high end STM32 MCUs only have 2 advanced control timers…
  • Consider that each motor will need 3 phases and a sensor, which has at least 5 wires. Imagine trying to run 12 x 8 wires from a central MCU board to all the motors - I think it will be a major design challenge
  • 30A is very high current - you will definitely need heat sinks and probably active cooling (fans) for motor and driver to handle such currents. Cables carrying 30A will need to be very thick wires, and the PCBs will need great care in their design to actually handle such a load without burning up.
  • I’m no expert on this topic, but I suspect you won’t actually need such high currents in practice.
  • I would recommend going for a design where each driver has its own MCU and sensor, and independently handles FOC control of one motor. If you design it in a way that mounts to the back of the motor, you can combine sensor and motor driver on a single PCB.
  • then there is the question of comms - for example using CAN-Bus can be a nice way to talk to 12 BLDC drivers from a central control unit
  • on the other hand I think the $100 target for motor + driver + sensor is fairly realistic, even if each motor has its own MCU, especially if you bring down the current requirements a little :wink:

I already mentioned the Dagor controller, and perhaps you can also check out the design of the Stanford Pupper2 BLDC drivers, or the MIT mini cheetah’s…
There’s a lower current design here:

And another one that I did here:

but its not well tested, and I plan to redesign the programming interface, which isn’t so convenient at the moment.

Interesting. This is very ambitious.

If your calculations are correct, if I understand correctly, 12 motors each 30A peak is a staggering 360A peak power supply current. Even at 12V which is probably the lowest realistic voltage (24 or 36 is probably more in line with batteries and converters) this is over 4kW of power – about a golf cart. If you go for more industry-standard 36V, you are looking at eye-popping 13kW. My electric car consumption at 35km/h is about that and the battery cables are as thick as water pipes. Your power management will be a lot bigger challenge than you may think. Designing such power management is something you must budget, because you cannot buy it, or at least I’m not aware of anything off-the-shelf I would trust my life and well-being to run around. I’ve seen electrical fires from high power equipment (this is my full-time job) and it will really put the fear of Mother Nature in you. You also need to find batteries to serve 360A peak power. Have you considered that? To give you an idea, this is what I’m talking about

This is as big as a car battery and weighs a lot.

You need to gear the motors. They won’t have the power to direct-drive your setup. Have you calculated the inertial mass of the robot and the torque required? Take into account the payload, batteries, cables, frame, motors, and auxiliaries?

I’m not sure designing the boards would be cheaper because the design itself is very expensive. Better go for off-the-shelf solution, as @runger pointed out.

All high power mosfets are extended components. There are no basic (“short list” as you say) components. The choice of MOSFETs is probably your least concern at that point.

One motor per controller, connected via CAN Bus to a central “brain”.

At that point I really think you should buy 12 Mini-Cheetah servos instead of buying and designing the whole thing. But that’s just my opinion.

Again, this is a very interesting and ambitious project. Please post your progress here.

Cheers,
Valentine

Thanks a bunch.

I realized that 12 motors per uP was impossible, and that for torque control I need a pile of pins.

I’m holding out for as much peak current as I can EDIT: I can just raise the volts, duh.

Good news that you think my $100 budget is “not nuts”

As I’m finding, using JLCPCB is a key to cost reduction.

I just read the DRV8316 data sheet. WOW, they make it easy.

I looked at the schematic on github. It is simple enough I could input it to KiCADand make an open source tool chain. I think adding CAN bus is a good idea. and needed

The real problem I have with hobby servos is control bandwidth. I can’t do dynamic balancing. an 8A limit at 24 volts might athletic enough.

I forgot to think. When I said “30 amps” that I could just raise the voltage. at 24V we are at ~200 Watts, that can be enough. with 30V it is more than enough. Peak torque is likely a landing after a jump (or a leg that is mechanically jammed) and not a normal thing

Thanks, Im still digesting the info. But 30A peak is not so bad as it sounds becaise in the real world you never have all 12 moters at peak. For example when walking two legs and off the ground and using very little power just to move through the air.

You would only hit peaks in odd cases like a landing after a jump. (or a mechanical jam)

But this is moot anywise because I see I can run a DRV8316 at 30 volts. So 8 amps is more thn needed and as siad, it is not the normal case and never on all 12 motors

That said a typical drone LiPo like I use on my current robot can suppoy 100 amps and not even get warm. Like this one 5000 ma lipo

This is dangerously incorrect. 5000mAh hobby battery at 100A will discharge in 3 minutes and start an electrical fire. I really hope you know what are you doing. The power dissipation of such setup would be anywhere between 1kW and 5 kW.

Cheers,
Valentine

Exciting project!

For motor cost, you won’t do better than this. 2208 size, $30 shipped for 16 of them. They are 1450kv delta, so can be converted to ~850kv wye (though not easily because the base blocks access to the wires plus there is epoxy).

For controllers, Lepton is designed for low cost. 10A in its basic form, but should be higher with my modifications to eliminate the places where the PCB copper alone carries the high current.

However there are only enough of the special MOSFETs left in stock for 9 of them, so it may require negotiating with me and Valentine (plus some SMD soldering) to scrape together the last few that you’ll need :slight_smile: It also does not have current sense, so if the voltage-based torque control is not precise enough then sensors will need to be added. There’s a pretty good chance I’ll end up doing it myself regardless, so just say so if you want me to hurry up.

I also wanted to do multiple motors per MCU to save cost and size, but after seeing that the STM32G01 is barely over a dollar, and coming up with a compact design where a single pair of fat power wires runs axially through the input holes in a stack of single-motor boards, I decided it wasn’t worth the trouble.

If you don’t have a CNC machine, I would recommend getting one if at all possible. It’s so nice being able to machine real high performance parts rather than trying to design around what is available. And simple things like figuring out how to screw down a brushless motor can incur a surprisingly high complexity/weight penalty compared to having the bearing tube/stator mount integrated into another part.

Teflon sheet is a miracle for low speed bearings. A thin 2mm wide strip can replace a big heavy ball bearing, and significantly reduce the size and weight of the part that holds the bearing too. But it does require very tight tolerances. Possibly doable with 3D printing, but this is another reason I love my CNC.

I’m looking at a 2023 start. Not going to hurry. The bottleneck is the higher level software that plans routes through doorways and around tress and the even higher level that decides the robot even needs to move.

Here is a slo-mo video of the current robot with very old version of the software.
youtu.be/eysH5BpcGs0
You can see it is good enough to let me work out movement and some control. I figure the new BLDC actuator will take at least a year of experimenting while I also work on this higher level stuff using existing robot. So I am in no rush.

There are enough of these type robots in the world that we do not need one unless it breaks new ground. I hope to do that by hitting a new low cost and a new kind of higher level control.
I want to only use parts that are and will continue to be easy to buy. That DRV8316 chip looks good.

I do have access to some CNC. I converted a cheap Harbor Freight Mini-Mill to CNC by adding stepper motor to each axis. It is still a low precision HF machine. I also have a 3D printer. The robot in the video is 100% printed in PLA.

I have made bearing by buying bronze bearing stock and press-fitting it into printed plastic. But the robot in the video is all ball bearings

You should definitely have a chat with @David_Gonzalez

Be careful not to go too low end. Don’t get anything with less than 128kB of flash, or you won’t fit SimpleFOC + CAN control.
I think for a robot limb you’ll ultimately also want current sensing, and to protect the motor unit from overheating a temperature sensor would be a good idea - so ADC will be important too IMHO.

True, but it’s also a horrible environmental poison. Its already in everyone’s blood, and will never leave…

:heart_eyes:

Yeah, if you can find motors that will perform well with 8A peak then that’s great having the MOSFETs and drivers all on a single chip, and PCB copper able to conduct it without overheating.

Do you have a particular speed reducer mechanism in mind yet?
GT2 belts are good because they’re so widely available and the pulleys can be 3D printed, but tensioning mechanisms are trouble.
If you want planetary gears, I recommend following Peter Wasilewski’s example and harvest them from cheap drills.
Cycloidal reducers are my favorite, but they do have a lot of parts (tip: you can shove teflon tube inside brass tube to make output rollers (and ring pin rollers if you use them)).
Capstans are interesting. If you haven’t seen Stanley, check it out.
Strain wave gears and linear actuators are too high reduction for quadrupeds.

Though if your primary interest is high level software, another option would be to contact people who have built quadrupeds and see if they’ll loan you a finished robot. It seems like most people are more enthusiastic about the mechanical design, and would probably appreciate having a software guy to collaborate with.

An alternative is HDPE rubbed with graphite https://www.youtube.com/watch?v=JB3qAJV5hoY

Hi,

I achieved a sub 100 usd per actuator with my quadruped; I actually price the whole robot under 1200 USD, including batteries and a brain (so far). I’ll drop my webpage if you want to read a little about it (I’m a little behind on the updates). :slight_smile:

Even though this project is not close to finished, I do have some thought about a next gen robot, I’m happy to chat!

1 Like

I looked and I see you are doing almost exactly what I think I want to do. I thought it would be good to make a kind of long “stick” with motors and pulleys inside and to use 12 identical sticks. I’m also thinking to make it easy to change from 6:1 to 9:1 and to somehow fit sensors in the stick.

One thing I have is a Harbor Fright mini milling machine converted to CNC. The mill is not ultra-high precision, but is slightly better then a 3D printer. So I have the option to make metal CNC parts. But I would 3D print prototypes. Metal parts would be good for both thermal and structure reasons.

I’d like to see your motor drivers. I think DRV8316 chips could work but I wonder what current you supply to motors and how feedback works.

I don’t want to copy your robot exactly, even if it is a full generation ahead of mine and it is. But if you want to collaberate on a future iteration with profesional-level CAD and software. I’m up for it. I’m using Fusion360 now but I’m trying to switch to FreeCAD and KiCad so as to make a 100% free tool chain that runs native on Linux. I’m doing a few FreeCAD tutorials today

Ball bearing work so well and you can buy them in any size for about a buck. The other thing they do for a plastic structure is ditribute the load. The point load from a small diameter shaft gets distributed over the full curcmfrenc of the ball bearing outer race.

I don’t tink(??) cycloidal drives are back drivable. A robot really needs back drivable reduction. Sun/planet and timing belts will back drive. Also the cycloidals seem to take up MANY cubic inches. and I only need up to about 9:1 reduction.

The only way I would use gears is if I found a better way to make them. Itis VERY time consuming to make gears on a mill and plastic gears need to be large. Cheap drills are not nearly cheap enough. Timing belts seem to be the best. As for tension. A 3D printed spacer can used. make a few different sizes and swap them until the tension is right. I actualy tried to print a timming belt in PLA, it worked for hours. So I can prototype with 3d printed belts for cheap.
Here is the video “proof” https://youtu.be/GPXICb9rSoE Yes I know the tension is loose but when a pig sings you don’t complain that it is off-key. I 3D printed the entire CNC conversion ecept for standard hardware parts.

:rofl: I like that.

And yes, ball bearings are good for plastic parts that need to be bulky anyway. But if you want small and powerful, metal with teflon is the way. Although Paul Gould’s 3D printed cycloidals are an interesting design, making the ring thin and flimsy and counting on the large output bearings to stiffen it from the inside. That keeps the outside diameter reasonably compact. 3D Printed Cycloidal Elbow Joint - YouTube

Cycloidals are backdriveable, but how easily depends on the ratio, machining precision, and inherent friction of the particular design. Making the ring as a squiggly line machined from a single block of metal (or 3D printed) has the highest friction. Better to use pins that can either spin in place or have rollers over them. James Bruton had good results with ball bearings and with nylon bushings Cycloidal Drive V3 & Robot Dog Test Leg - YouTube
Use teflon tube over needle bearing pins for a miniature version.

For machining gear-like things, I’ve found the best process is to first cut out the inside holes, then add more workholding in the center, cut a circle around the outside, and then start working the curvy profile. First use downward motion with the end mill to cut away most of the material inbetween each tooth, and finally do the continuous profile cutout (one rough pass, one finish pass).

The circle allows you to use a large and tough bit for full width slotting. And with the downward motion, the small bit never has to take a heavy side load. You also get much better chip clearing compared to cutting a curvy full width slot. For best results when nibbling with vertical motion, always keep the center of the bit over open space. Involute gear teeth need several bites to get all the way in to the base of the tooth.

For really tiny ones where you can’t get more workholding in the center, you can use stock thicker than the final gear so you don’t cut all the way through, then fill the groove with hot glue, flip it over, and machine down the thickness from the back until you break through.

But timing belts with 3D printed pulleys are cheaper and easier for low ratio like this, so probably better to stick with that.

If you haven’t seen it, this is a great resource as well for belt driven system: https://open-dynamic-robot-initiative.github.io/

The documentation for building this robot is pretty good, which can be found here: GitHub - open-dynamic-robot-initiative/open_robot_actuator_hardware

Yes, I have seen the ODRI website and even cloned their GitHub repository. I’m looking at the design in detail.

It appears that building one of their “Solo” 12-DOF robots would cost about $6,500 plus considerable amount of labor. What I am trying to do is design something like Solo with 12 motors and have the cost below $1,000. A 6X reduction in price might be possible but will be hard.

But look at recent advancements. Solo uses a set of 12 $90 rotational encoders and if these can be replaced by $1 Hall Effect-based sensors we save nearly $1K. They are also using 40 mm diameter motors that sell for $80+ each and the FOC drivers they use cost $100 each.

But using less powerful motors with lower amp drivers means reduced performance and hence different reduction gear ratios, and the changes ripple through the entire robot. (where every gram of mass counts)

Overall I think ORDI got it right, but they had a higher target budget and also there have been some recent price drops in electronics. My schedule goal is to have prototype joints working by the end of 2023. Seems slow but CAD files and PCB designs and test jigs to measure preformance and so on is a lot of work.

1 Like