Close
0%
0%

ODrive - High performance motor control

Hobby brushless motors are incredibly cheap and powerful. However we need a way to make robots out of them. ODrive is that way.

Similar projects worth following
Stepper motors are ubiquitous in hobby robotics projects: If you make a robotics or automation project today, it is very likely you will use them. Almost all DIY projects from 3D printers and CNC mills, to air hockey and juggling robots use them. However in industrial automation, brushless servomotors have taken over, and it's clear why: They don't lose steps, are much more powerful, efficient, and silent.

However, brushless motors are not unique to expensive industrial automation equipment. In fact, you can get some very powerful and cheap motors at hobby shops. The electronics to drive these motors are also dirt cheap. So how come virtually no non-industrial automation systems use them?

To be honest, I have no idea. Seriously, a driver that allows this should clearly exist.
But since it didn't, I decided to make one.

And you are invited!
This project is open source, both in hardware and software, and I warmly welcome anyone who wants to join.

Boards are available

ODrive v3.5 boards are available at the ODrive Shop.

Key specs:

  • 2 motor channels, designed for >100A peak current.
  • 1 DC-DC converter channel
    • For powering the system with an arbitrary voltage power supply, or
    • Use of a brake resistor
  • 24V bus voltage
  • USB, CAN, UART, PWM, and step/dir interface (read more below)
  • Encoder feedback for arbitrarily precise movements
  • Supports power regeneration
  • Use of a high power density Li-Po battery means you can achieve >1kW peak power output with only a modest power supply.
  • It will feature various optimal control strategies and motion profiles.
  • Permissive licence on both hardware and software: You use this project in anything you like, even commercial products (as long as you attribute this project's contributors).

Demos

The design is based on two earlier prototypes.

Here are some very simple demos with v2. The peak power output in these tests were only about 60W. The new version (v3) will be able to deliver much more power.

Below is a demo with v1. The mass being moved is 3kg, and the peak power was about 200W. The noise is not from the motor, but from my poor mechanical design which means that the belt teeth rubs against the idler pulley edge.


Join the discussion!

Check out the ODrive Community.

Stay up to date


Motors

Check out the ODrive motor guide. You can also read this post about outrunner motors.

Interfaces

  • USB Serial port -- PC, BeagleBone, RaspberryPi, etc.
  • CAN -- CANOpen and CiA 402 is a possibility
  • UART -- Arduino, mBed, etc.
  • PWM -- RC Recievers, Arduino, etc.
  • Step/direction -- Existing motion controllers
  • Some general purpose digital and analogue pins

Protocols

  • G-code parser for interfacing with existing automation tools
  • Many types of command modes
    • Goto (position control with trajectory planning)
    • Position commands
    • Velocity command
    • Torque command

Architecture


The drive is designed to be able to deliver incredibly high peak power, more than 1kW per motor channel. However, power supplies that can deliver this kind of power are expensive. Also, when the actuator is being decelerated, there is energy absorbed. Most power supplies do not like having energy dumped back into them.

The solution: Put high-power energy-storage on the DC bus. A battery like this one can deliver around 3kW. These types of batteries also have a fairly high charge rating, and if the regeneration is only over a couple of 100 milliseconds, they can probably handle a fair bit more than specified. Thus, they should be able to handle the full range of regeneration power in most robotics applications.

This means we have a variable voltage DC bus, that fluctuates with the battery's state of charge. So the way we power the system is via a DC-DC converter. There is another upside to this as well: we can use any voltage power supply and just convert it to the bus voltage. I expect most people will use an inexpensive ATX power supply (specifically the 12V rails). In many robotics applications the motion consists of several discrete movements, only some of which are high power. In this case, we can have access to a very high peak power, but only require a very modest power supply.

Another thing that's nice about using a battery for stabilising the DC bus, is that if multiple of these drives reside on the same bus, there is no fighting over the regulation of the bus voltage: a single board can have the DC-DC connected to a PSU, and the rest of the boards in the system can just use the bus. If fact, you can even skip populating the DC-DC on the slave boards.

The system is also capable of using a brake resistor to dump the regenerated energy instead of a battery to absorb it. This is a simpler and possibly safer setup, and is also what the project will use in the first instance, until the battery storage feature is ready.

Applications

So this project is good for some things,...

Read more »

  • 2018 in Review and New EU Webshop Open

    Oskar Weigl12/30/2018 at 06:11 3 comments

    Many of our European customers will be happy to know that the EU webshop is now officially open. Most of our products are now stocked and available from a warehouse in the UK. The shipping times to Europe should be drastically improved when ordering from there.


    Now that we have reached the end of the year, I want to take the opportunity to summarise some of the highlights of the past year, and to thank each and everyone of you for the incredible support we've received.

    In the beginning of 2018 we released ODrive v3.5, and with that we reached a stable hardware version. With that we were able to focus our efforts on improving the firmware, supporting software and the overall user experience.

    We saw over 100 new features, improvements and fixes (full details in the Changelog). Just to lift out some highlights, we have implemented:

    • Trapezoidal trajectory planner
    • Switching frequency increased to 24kHz for silent operation
    • Storing of configuration parameters to Non Volatile Memory
    • Many encoder related improvements, including index pulse encoders and Hall sensor feedback
    • RC PWM input

    On top of this there are currently many excellent features waiting in Pull Requests which will be our priority to merge as soon as possible.

    We love seeing so many fantastic projects come to life with the help of ODrive. Check out the Projects category on our forum to see all the ones people have chosen to share. I want to highlight two projects that I found to be particularly excellent.

    The first one is a modular, heavy duty Swiss mill-turn machining center for cutting metal called SwissMak, which uses ODrive to precisely control the two spindles, and will also use ODrive for the movement axes in a future version. They successfully completed a kickstarter, and the first set of machines are being manufactured at this very moment.

    front iso view 2 jan 17

    The other project I want to feature is the Stanford Doggo, a quadruped robot made by a group of students at Stanford University. Check out more photos, and watch it walk, dance and jump extremely high in their excellent video presentation here.

    Stanford Doggo

    To all businesses and hobbyists alike that have chosen to use ODrive; a huge thanks to everyone that have helped to make this possible.

    On top of that we want to specially thank all the direct contributors to the project. For your code contributions, test data, documentation improvements and for providing help to other users on our forum and Discord. Thank you so much, your contributions are invaluable.

    In 2018 ODrive went from a promising project to a successful product and business. We hope to continue on this trend and make ODrive even better.

  • Jan 2018

    Oskar Weigl01/15/2018 at 09:49 0 comments

    Robot Arm and More

    The ODrive project has been very fortunate to attract such a strong community of enthusiasts. Today we want to feature the excellent work done by Richard Parsons, who's been very active on the ODrive Community. In the video below he demonstrates his direct-drive robot arm, how he built and wired up the servo axes, his step/dir tests and finally his high speed pen plotter.

    ODrive v3.4

    Since the last newsletter update, ODrive v3.4 has become available. From a user-perspective, not much of the design has changed from v3.3. However, we now have a 48V version available. It has the same current handling capacity as the 24V version, hence it has twice the power. We are talking around 3kW peak power per axis.

    We can't wait until the videos of projects with this kind of power show up!

    New Encoder

    We now stock the CUI AMT102 encoder in the ODrive Shop. This is a compact 8192 counts/rev encoder with index pulse. It comes with a custom 2m shielded cable that matches the pin-out for the ODrive.

    The increased resolution will help with smoother motion and less "hunting" vibration when holding position. Also, in a couple of weeks, when we expect have the index pulse feature finished, it should enable the ODrive to restore the encoder calibration. This means that the encoder calibration only has to run once to commision the drive, and then skipped every run from then on.

    Above is a design by [Wetmelon] on the ODrive Community. It uses the 1.6kW N5065 motor and the aforementioned AMT102 encoder, to make a NEMA23 compliant compact and high performance servomotor. The above prototype is printed in PET-G filament, that has a glass transition temperature of 88C, so despite using a 3D printed part it should be ok for applications that don't run the motors too hot. If you are interested, he also made a design that uses a 10:1 gearbox, check it out.

    Your Project

    If you also have a project that you are working on that uses the ODrive, or even one that could make good use of an ODrive, we'd love if you shared some pictures with us.

  • ODrive v3.4 Ready Soon

    Oskar Weigl11/24/2017 at 01:09 0 comments

    We have managed to sell out of ODrive v3.3, thank you everyone who has shown such support! The batch of ODrive v3.4 are due to arrive in about a week from now, and we hope to have them tested and available to ship in the beginning of December.

    As you might be aware, we used to have a restriction asking you to not order more than two drives at a time. Now we are able to order much bigger batches, so this restriction is lifted: order as many ODrives as you would like. With this batch and going forward, I think we should be able to keep ODrive from going out of stock.

    On that note: If you are an OEM or Distributor, please get in touch, as we now have the capacity to take large orders.

    Thanks to everyone who has helped to make this possible,

    Cheers, 

    Oskar.

  • Announcing 48V ODrive Board

    Oskar Weigl11/06/2017 at 23:05 2 comments

    Many of you have requested that there should be available a 48V version of ODrive. I'm happy to announce that this is expected to become available in the beginning of 2018. To be notified when it will be possible to order, please sign up here: https://goo.gl/forms/EUJP726GsLaBf5YN2.

    Some things to note:

    • The price is expected to be $149.
    • The current handling capacity will not decrease, hence the power handling capacity will in principle be double that of the 24V version.
    • We will keep offering the 24V version at the same price as before: $119

  • Cogging Torque Compensation

    Oskar Weigl11/06/2017 at 22:55 0 comments

    Inexpensive hobby brushless motors are powerful, but they are not built for precision applications. One of the undesirable characteristics of less expensive motors is cogging torque. This is the torque generated by the permanent magnets in the rotor being attracted to the iron in the stator in an unbalanced way.

    In more expensive motors this is avoided by skewing the rotor magnets, as shown below. This balances the reluctance torque across the skew angle, which eliminates most cogging torque.

    Straight and skewed rotor magnets.

    Interestingly, the cogging torque exhibited by the motor is a constant function of the rotor angle. That means that if we can figure out what it is, we can improve the performance by simply compensating for it.

    And that is exactly what we did. Thanks to the implementation of a calibration and compensation algorithm by @Wetmelon on the ODrive forums, we can estimate and cancel the cogging torque.

    Cogging torque map: Current as a function of encoder count. Measured values in blue, fitted values in orange.

    Without and with anticogging, showing rotor position at 25 RPM commanded velocity. Note that the feedback gains were not very stiff for this test.

    Note that the above is just an excerpt of the full writeup, please see that for more detail, and full resolution plots.

    This algorithm is already merged to the devel branch of the ODrive firmware, and after sufficient testing will be available in the next release.

  • UART and Arduino Library

    Oskar Weigl10/18/2017 at 01:43 1 comment

    The UART feature is now ready for testing.

    Many of you have been waiting for the ability to control the ODrive from another microcontroller, and so this feature complements the USB and let's you do exactly that.

    I have also made a first revision of an Arduino library that lets those of you who wish to use Arduino get started quickly. If you don't use Arduino, you can still have a look at the library to see how the communication is implemented, and copy that to your platform.

    The UART feature is currently in a pull request, which means that the documentation on the master branch hasn't updated yet. Please check the documentation on the uart branch instead. Here are some of the important things that are new for UART:

    If you have any problems, or if everything worked perfectly, or anything in-between: please help us with feedback. Once this feature has been confirmed to work for enough people, we will merge it to the devel and hence master branch in the next release.

  • Three Demos

    Oskar Weigl10/02/2017 at 04:09 0 comments

    It's so awesome to see what kind of cool stuff people are doing with the ODrive. Here are 3 demos of fairly different nature. I think they are awesome, I hope you do too!


    Willam Osman put ODrive on a PowerWheels. This video is actually a few months old now, and I probably should have posted it earlier. Anyway, watch that thing do doughnuts:

    The Arduino library and UART communication is under way, a usable release should be ready in a couple of weeks. Check out the first demo:

    Bauerslab posted his awesome Skittle Sorter on the ODrive forum. It's really awesome to see the diverter teleporting around. If you wanna skip to the action, it starts at 6:15.

  • Which voltage in your application?

    Oskar Weigl08/25/2017 at 03:40 0 comments

    It’s good to know what voltage range people want to use ODrive for in their application. Right now the voltage rating is for 24V, but it’s fairly easy to change. There is a current handling penalty to increase it though, so it might be useful to offer two versions. To help us decide between the different options, please answer the poll about what supply voltage would be the most ideal in your application. You may check multiple options if they apply to you.

    Thanks!

    Link to poll

  • Electrical issue discovered

    Oskar Weigl08/13/2017 at 07:57 0 comments

    Thanks to the help from the community, recently we uncovered a hardware bug that affects all ODrives manufactured to date (v3.3 and earlier).

    This bug is described in more detail here, and the fix is described in detail here.

    In short, the bug means that the GND on the GPIO pins and the M1 motor gate driver has significant spikes of electrical noise. This causes glitches on the control signals on the GPIO pins, and motor control glitches on M1.

    If you plan on using M1, it is strongly advised that you apply this fix. You can follow the instructions as linked above. If you do not feel comfortable applying the fix, you can also send the board to me (San Jose, CA, USA), and I will apply the fix for you, free of charge (you pay shipping to me, I pay shipping back to you). If you need help to apply the fix to your board, please email info@odriverobotics.com, and we can arrange it.

    We have already started applying the fix to all the ODrive v3.3's:

    The fix applied to an ODrive v3.3.

    Applying the fix to all the ODrive v3.3.

  • Sensorless Mode

    Oskar Weigl08/04/2017 at 23:50 0 comments

    Quite a few of you have requested sensor-less operation: running the motor without an encoder. This is now a reality:

    Video shows open-loop startup speed-ramp followed by switching to closed loop FOC velocity control.

    The main limitation of this mode is that it's not able to provide precise control at very low speeds (it can however spin up to speed using not-so-precise control). Therefore, this mode is great for applications where the primary operational regime is at speed. So not great for CNC machines or polargraphs, but great for electric skateboards and conveyor belts.

    If you are interested in the technical details, or have an ODrive and want to try this out, please see the Sensorless mode post on the forum for more detail.

View all 32 project logs

Enjoy this project?

Share

Discussions

Auke Ro wrote 10/23/2020 at 12:08 point

Is there any way to figure out how the speed/torque curve of this motor look like? I have calculated the torque which I need at a specific RPM but cannot decide if this motor will do

  Are you sure? yes | no

meeranali-khan wrote 04/27/2020 at 19:16 point

Can anyone help me to operate a three phase frameless motor of T-motors model number is RI-80.? 

  Are you sure? yes | no

arcade perfect wrote 11/05/2019 at 15:30 point

Awesome project. I expect this question has been asked many times, but speed, torque and encoders aside, how does the precision compare to standard stepper motors?

  Are you sure? yes | no

Krzysztof wrote 11/06/2019 at 08:09 point

The answer to such question is "yes". Encoders are what enables precision. If your encoder has 8192 steps, you WILL get almost 41 steps per normal stepper step (typically 200 steps and 32 microsteps in steppers) and it will be more accurate than microstepping. It's rather easy to do with just about any PID controller. Holding torque can be comparable to steppers, but dynamic torque will be MUCH higher, speed will be much bigger too.

  Are you sure? yes | no

arcade perfect wrote 11/06/2019 at 23:23 point

that's great!

  Are you sure? yes | no

David Gedney wrote 08/10/2019 at 02:54 point

This beautiful device made my project possible!  Thanks to the Odrive team for what they put together.  

  Are you sure? yes | no

Raphaël Casimir wrote 06/27/2019 at 08:54 point

Hi ! About regenerative braking, is there more info about the wiring diagram (do we just need to disable the break resistor?) and the parameters to enter ? I do not find these infos on the wiki.

Thanks a lot in advance.

  Are you sure? yes | no

JuanSe Sandoval wrote 02/17/2019 at 12:32 point

Hi Oskar, when do you plan to introduce the ROS package? 

  Are you sure? yes | no

saigenku wrote 12/07/2017 at 08:13 point

Will this encoder work with ODrive?  https://hackaday.io/project/11418-massmindorg-abosoluteincremental-rotary-encoder

Since the misalignment between axis and or magnet will affects the alignment of  physical angle and the AB signal, I guess some kind of calibration mapping (encoder output to real angle) will be needed.

  Are you sure? yes | no

Robert Mateja wrote 11/30/2017 at 15:39 point

Looking from another angle, it is possible to drive 3-phase hybrid stepper with ODrive? Principle is the same, just a few more poles, or I miss something?

  Are you sure? yes | no

Capt. Flatus O'Flaherty ☠ wrote 11/07/2017 at 18:00 point

This looks perfect for the main drive for my autonomous tractor (https://hackaday.io/project/21744-weedinator) - I'm looking forward to be able to try out the 48 volt version.

Currently I'm running the wheels through a 100:1 gearbox with a large NEMA34 stepper but, from what you say, the servo motor should give me a lot more power?

NB. the tractor is designed to run at very low speed and torque is important.

  Are you sure? yes | no

Oskar Weigl wrote 11/07/2017 at 20:55 point

Yeah, a lot more power indeed. Have a look at the ODrive Motor Guide to pick out a motor that might suit you. You can take a copy of the spreadsheet and change the bus voltage to 48V, to see the performance at that voltage.

https://docs.google.com/spreadsheets/d/12vzz7XVEK6YNIOqH0jAz51F5VUpc-lJEs3mmkWP1H4Y

  Are you sure? yes | no

j wrote 01/26/2018 at 00:13 point

Where did you find/calculate the torque for those motors? 

  Are you sure? yes | no

engedilto wrote 10/11/2017 at 16:31 point

Can I apply this drive with a 2x1 reduction between the motor and encoder?

I want to gain more application power

  Are you sure? yes | no

Oskar Weigl wrote 10/11/2017 at 20:24 point

I would recommend to put the encoder on the motor side of the reduction, it will give you more resolution. The control stability may be reduced if the encoder is on the other side of the transmission's backlash. On the other hand, you can compensate for output backlash. So it really depends what is better: but it is more common to have it on the motor side.

  Are you sure? yes | no

eduardo calegari wrote 10/11/2017 at 12:13 point

I believe that if I want to use the encoder in emc2 the encoder will be connected to the parallel port connected in the emc2 software, the same encoder will send the signal to odriver and to the software.

  Are you sure? yes | no

Oskar Weigl wrote 10/11/2017 at 20:22 point

In that case yeah just connect the encoder to both the parallel port and the ODrive.

  Are you sure? yes | no

eduardo calegari wrote 10/09/2017 at 13:28 point

Does the driver accept connection with mach3 and emc2 with encoder interface?

  Are you sure? yes | no

Oskar Weigl wrote 10/09/2017 at 21:18 point

I know step/direction signals input will work. What is the encoder interface electrically?

  Are you sure? yes | no

eduardo calegari wrote 10/09/2017 at 13:26 point

the version 3.3 that this the sale in the site already has been corrected the problem of the gnd or I will have to make the correction at home.

  Are you sure? yes | no

Oskar Weigl wrote 10/09/2017 at 21:11 point

The problem is already corrected.

  Are you sure? yes | no

eduardo calegari wrote 10/09/2017 at 13:23 point

Hi, I would like to know if in the interface with the software, the software knows the position of the motor through the encoder or only the driver knows the position of the motor.

  Are you sure? yes | no

Oskar Weigl wrote 10/09/2017 at 21:12 point

Not sure I understand your question, but you may read the position of the motor from the ODrive to the host at any time.

  Are you sure? yes | no

Jan Hlavatý wrote 09/07/2017 at 23:10 point

Hi, would this work with one of the 42BLF BLDC motors? They have 4 pairs of poles (so 4 electrical roations per physical revolution)... would still need to add an encoder of course (they have just simple 6 position hall sensors which is not enough for me).

  Are you sure? yes | no

Oskar Weigl wrote 09/08/2017 at 00:55 point

Yes I think it probably will work.

  Are you sure? yes | no

eduardo calegari wrote 09/04/2017 at 12:09 point

Oskar Weigl
I would like your opinion, if Tim Wescott's book Applied control theory for embedded systems is a good apprenticeship?

  Are you sure? yes | no

Oskar Weigl wrote 09/04/2017 at 23:58 point

Hm I dont know, I haven't read that book.

  Are you sure? yes | no

Jan Mrázek wrote 06/29/2017 at 16:24 point

Very nice project! I am excited to buy at least one unit, when they come out!

I have two questions:
- I am not able to view Altium sources, so I cannot find out the physical dimensions of the board. What are they?

- What is the encoder you are using in the following photo? ? Where can I buy them?


  Are you sure? yes | no

Timothy Girard wrote 06/25/2017 at 03:38 point

I saw you at the Maker fair and was so blown away. Then, I couldn't find your information and ended up searching the maker site. Anyways, So glad your idea is taking off. I need the V4 3 axis version you mentioned below for a high performance router table. Any Idea on when you might dive into that? Frankly, I will make do with something simple until your ready. The cost difference / Performance is off the charts compared to anything out there. It was really cool watching the pick and place demo at the fair and my son saying "hey, those look like my quad motors"...

  Are you sure? yes | no

Oskar Weigl wrote 08/25/2017 at 03:29 point

Thank you!

So it will still be a while before the development on the 3 axis version will start. The main reason for having 3 axis is cost reduction; the 2 axes on the current ODrive work almost entirely independent anyway. That is, if you buy two ODrive v3.3, you get four independent axes, so it's not much different the fact that it's across two boards, if that makes sense.

  Are you sure? yes | no

fabien.bruning wrote 05/30/2017 at 08:51 point

Super cool project, do you have any estimate on when new boards can be ordered?

Thanks!

  Are you sure? yes | no

Oskar Weigl wrote 08/25/2017 at 03:26 point

Hi, the v3.3 batch is now out.

  Are you sure? yes | no

Guilhem Saurel wrote 05/23/2017 at 08:54 point

Hi !

I've ordered a v3.2 from my research lab in EU, and for some paperwork, my staff would need an invoice… It is possible ? If not, at least the VAT ref from Sweden, or a postal address in US would be nice :)

Thanks !

  Are you sure? yes | no

Oskar Weigl wrote 05/26/2017 at 05:22 point

Hi Guilhem, please email info@odriverobotics.com.

Cheers!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates