ODrive with 4 channels? (4 motors control)


#1

Hi,

One board to control 2 motors is awesome in itself but my question is if there are any plans to have a version to control 4?
It would be very useful for robots that have 4 wheels, each controlled independently

Thanks,
Cristian


#2

Yes actually ODrive v2 was 3-axis, and the current firmware architecture is designed such that the motor axes run independently, so it shouldn’t be a big problem to have more axes.

That said, there are some obstacles for having many axes on one board:

  • Hardware units for 3-phase PWM and encoder decode. You need one for each axis, and it’s easy to find microcontrollers that have two sets, I’ve seen a couple that have 3 sets, and I’ve never seen one that has 4 sets.
  • You can use an FPGA to scale the above, but they are either expensive or don’t have very high performance CPU-cores. Also the toolchain not as free and open.
  • Economics: It’s easier for me to make 1 product than to make and inventory multiple products. Therefore it’s better to have a 2-axis ODrive and let people who need odd number of axes lose value for 1 axis, than to have more axes and have people lose more value on average.

My recommendation is to just use 2 ODrives. The idea is that the axes operate independently in the microcontroller threads, such that it ideally shouldn’t matter that you have 4 axes across 2 boards instead on a single board.


#3

Thanks, that makes sense, I am actually doing exactly that, using 2 ODrives, I was just wondering if there is a simpler version for my case


#4

So how would I coordinate movement across multiple axes on different odrives? I would need some common timing reference at least so that different axis components of a multiaxis move dont execute out of sync…

Ideally for a cartesian machine like 3D pinter I would like to broadcast one 3D spline segment with endpoint speeds and have each motor do its part…


#5

At the moment you will need some sort of external motion controller/planning. I saw on the forums there is some work being done add some motion control/trajectory generation on board for the 2 axes. @Wetmelon I think you have started to look into some of this code work? I can’t remember if it was planned for having some kind of master/slave configuration to go between multiple ODrives.

I’m not sure of your exact end goal but as it is now your best bet would be to use the new Step/Dir interface with something like a smoothieboard/tinyG with the 2 ODrives(4 axes) as external drivers to the motion controller board. Assuming you get the motors reasonably tuned on the ODrive and your axes speeds setup right in the motion controller board all the motors should respond within an acceptable timeframe for coordinated motion.

I will leave this open to @madcowswe to give an official answer. Just thought I would chime in.


#6

Thanks @qjones, yes it’s pretty much like that.

Basically: right now there is no motion module present, so you would need to do that externally. This external motion controller needs to send position commands in realtime to each of the axes, and they independently track these. This should work the same for any number of axes across any number of boards. The realtime position commands can be over any interface: USB, UART, or step/dir.

Indeed, one of the most straightforward ways to get this working today is to take a smoothieboard/tinyG/etc. and hook up the step/dir lines and let the ODrives be the output instead of the stepper driver.

We do have a motion controller module on the roadmap, but it’s not easy to say when that will be implemented. So one day we could be able to receive a full spline and let the ODrive do the motion tracking, but for now it’s not available.

I hope that answers your questions, please let me know if anything is unclear.

Cheers,
Oskar


#7

I’m using a product from a guy named Thanos (http://motionsim.blogspot.com/) who has his own motion controller developed - if you have any interest in discussing ideas.


#8

Sure, feel free to start a motion sim thread!