This project is submitted for

Description

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.

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.

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.

Project Logs

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.

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.

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

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.

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.

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 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.

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.

The first version of the much requested interface for ODrive, step/direction signals, is now ready. If you want to try it out, check these instructions.

Demo:

Step/direction is the most common interface used by existing motion controllers to talk to stepper motor drivers. With the support of step/direction, you can use existing motion controllers and let ODrive be a drop-in replacement for the stepper drivers. In the above demo, a TinyG is used, but the signals are the same as used by the Smoothieboard, Rambo, Mach3, RAMPS, well basically all of them.

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.

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.

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.

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.

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).

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"...

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.

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 :)

I like the lightplacer a lot...Hope this will work out soon! I'd like to come to MakerFair in SanMateo, but the flight is too long just to see this in action. Please keep us posted and upload a video. This looks similar to our NanoPlace machine, which runs on direct drive linear BLDCs with optical feedback encoder.

Do you use a optical, linear encoder, too? If not, try it! it is definitely worth the effort. Precision rises a lot compared to just using the rotary encoder. Or, even better, use a camera atteched to the tool as a motion feedback sensor! I saw the ADNS 3080 chip has great performance and is quite affordable. It is an optical mouse flowcam with up to 6400fps at 6bit grey sclace depth and 30x30 pixels. Something i want to give a try.

Which sequencer/automation software/realtime interface do you want to use for you projects?

I saw the SmothStepper ESS with Xilinx Spartan FPGA supports driving BLDCs with feedback sensors and step/dir interface at max 4 Mhz for up to 6 axis using a Ethernet based real time interface along with the Mach4 automation software. Maybe this is an option for our projects. I am not sure about Mach4 abilities to drive robots though, maybe there is a better solution? I am new to this...the Software I use at work is much too expensive for hobby projects.

Nice, thx for clearing things up. Waiting keen for the the board to arrive. So I will now order 21pcs Sony VTC4 cells (best economical/quality/longlife cell for the purpose) and a 240W powersupply that can be tuned to 25.2 V or 3.6V per cell (7cells in series/3parallel with oz890 smartBMS as balancer/ I2C-bus-monitor w/o FETs) to run two SK3-6364 motors

I dont get why there is a 12V input? Makes no sense to me. I want to use a 24V 10A powersupply from ebay, about $20 and no noisy fan sounds good to me, now that i payed over $100 for the V3.2 board. Using a PC powersupply is much too complicated and expensive for my purposes.

Please throw out that 12V input and replace it by a simple 24V input, thanks!!