An Intuitive Motor: IQ Control’s Serial-to-Position Module

Back when I was a graduate student, my advisor Tom Knight bestowed upon me many excellent aphorisms. One of them was, “just wrap a computer around it!” – meaning, rather than expending effort to build more perfect systems, wrap imperfection-correcting computers around imperfect systems.

An everyday example of this is the noise-cancelling headphone. Headphones offer imperfect noise cancellation, but by “wrapping a computer around it” – adding one or more microphones and a computer in the from of a digital signal processor (DSP) – the headphones are able to measure the ambient noise and drive the headphones with the exact inverse of the noise, thus cancelling out the surrounding noise and creating a more perfect listening experience.

Although the principle has found its way rapidly into consumer goods, it’s been very slow to find its way onto the engineer’s workbench. It’s the case of the cobbler’s children having no shoes.

In particular, it’s long bothered me that motors are so dumb. Motors are typically large, heavy, costly, power-hungry, and riddled with small mechanical imperfections. In comparison, microcontrollers are tiny, cheap, power-efficient, and could run software that trims imperfections while improving efficiency to the point where the motor + microcontroller combo is a win over a dumb motor on almost every metric. So why aren’t we wrapping a computer around every motor and just calling it a day?

Then one day a startup called IQ Motion Control showed me a demo of their smart motor, the IQ Position Module, at HAX in Shenzhen. My eyes instantly lit up – these guys have done it, and done it in a tasteful manner. This is the motor I’ve been waiting years for!

Meet the IQ Position Module
Simply put, the IQ Position Module is a brushless DC motor that talks serial and “thinks” at a higher level. I don’t have to design any complicated drive circuitry or buy a proprietary controller that talks some arcane or closed standard. I just plug an FTDI cable into my laptop, hook up power, clone a small git repo and I’m good to go.

Because of the microcontroller on the inside, the IQ Position Module can emulate a range of behaviors, from a simple stepper to a range of BLDC drive standards, but the real magic happens when you tell it where you want it to go and how fast, and it figures out the best way to get there.

“But wait”, you say, “my servos and brushed DC motors can do that just fine, I just control the pulse width!” This is true for crude and slow motion control applications, but if you really want to run at high speeds – like the ones achievable by a BLDC – you have to consider things like acceleration and deceleration profiles.

The video below shows what I mean. Here is a pre-production IQ Position Module that’s being commanded to turn once in two seconds; then twice, three times, and finally ten times in two seconds. The motor can go even faster, but the figurine I attached on top isn’t balanced well enough to do that safely. Notice how the speed “ramps up” and back down again, so that the motor stops with the figurine in precisely the same position at the end of every cycle, regardless of how fast I commanded the motor to turn.

That is magic.

And here’s a snippet of the core code used in the above demo, to give you an idea of how simple the API can be:

Just tell it where you want it, and by when — and the motor figures out an acceleration profile. Of course other parameters can be tweaked but the default behavior is reasonable enough!

A Motor That’s Also an Input Device
But wait! There’s more. Because this is a “direct drive” system, there’s no gears to shear. Anyone who has busted a geared servo motor by stalling or back-driving it knows what I mean. IQ Position Modules don’t have this problem. When you stop driving the IQ module – put it in a “coast” mode – it turns freely and without resistance.

This means the IQ motor doesn’t just “write” motion – it can “read” motion as well. Below is a video of a simple motion copy demo I cooked up in about an hour (including time spent refactoring the original API), where I implement bidirectional read/write of motion between two IQ Position Modules.

The ability to tolerate back-drive and also “go limp” is advantageous in robotics applications. Impact-oriented tasks — such as hammering a nail or kicking a ball — would rapidly degrade the teeth in a geared drive train. Furthermore, natural human motion incorporates the ability to go limp, such as the forward swing of a leg during walking. Finally, biological muscles are capable of applying a static force without changing position, such as when holding a cup on its sides without crushing it. Roboticists have developed a wide range of specialty actuators and techniques, including series elastic and variable stiffness actuators to address these scenarios. However, these mechanisms are often complicated and pricey.

The IQ Position Module’s lack of gearing means it’s back-drive tolerant, and it can apply an open-loop force without any risk of damage. This means you could, for example, use it to build a robot arm that can hammer a nail or pick up a cup. Robotic elements built using these would have far greater resilience to motion interference and impact forces than ones built using geared servos.

Having Fun with the IQ Position Module
While attending 34C3 back in December 2017, I managed to sit down for about an hour with my good friends Prof. Nadya Peek and Ole Steinhauer, and we built a 2-axis robot arm that could do kinesthetic learning through keyframing, using nothing more than two IQ Position Modules, a Dunkin’ Donuts box, a bunch of schwag stickers we stole from the FOSSASIA assembly, and the base plate of an old PS4 … because fail0verflow.

This was improvisational making at its best; we didn’t really plan the encounter so much as it emerged out of the chaos that is the Computer Congress. While Nadya was busy cutting, folding, and binding the cardboard into a 2-axis robot arm, Ole “joined” (#lötwat?!) together the power & serial connectors, and I furiously wrote the code that would do the learning and playback — while also doing my best to polish off a couple beers. Nadya methodically built one motion axis first, and we tested it; satisfied with the result, she built and stacked a second axis on top. With just a bit of tweaking and prodding we managed to pull off the demo below:

It’s a little janky, but given the limited materials and time frame for execution, it hints at the incredible promise that IQ Position Modules hold.

So, if you’ve ever wanted to dabble in robotics or motion control, but have been daunted by control theory and arcane driver protocols (like I’ve been), check out the IQ Position Module. They are crowdfunding now at CrowdSupply. I backed their campaign to reserve a few more Position Modules for my lab – by wrapping a smart computer around a dumb motor, they’ve created a widget that lets me go from code to physical position and back with a minimal amount of wiring and an accessible API.

Their current funding campaign heavily emphasizes the capabilities of their motor as a “better BLDC” for the lucrative drone market, and I respect their wisdom in focusing their campaign message around a single, economically significant vertical. A cardinal sin of marketing revolutionary tech is to sell it as a floor wax and a dessert topping — as painful as it may be, you have to pick just one message and push hard around it. However, I’m happy they are offering the IQ Position Module as part of the campaign, and enabling me to express my enthusiasm to the maker and robotics communities. I’ve waited too long to have a motor with this capability in my toolbox — finally, the cobbler’s children has shoes!

29 Responses to “An Intuitive Motor: IQ Control’s Serial-to-Position Module”

  1. Joel Dillon says:

    This isn’t new though, surely? I’ve had some of these for years…

    http://www.trossenrobotics.com/dynamixel-ax-12-robot-actuator.aspx

    • bunnie says:

      Hey that’s cool, thanks for the link! Out of curiosity, can the Dynamixels work as a zero-force input device too?

      Didn’t mean to make it sound like this was the one and only — but I couldn’t resist using the “revolution”-ary pun. After all, just about everything fundamental to computers was invented in the 60’s, and since then it’s just been smaller/faster/better versions of the same no matter what Intel or ARM want you to think :)

      In particular, you’re correct that almost every servo motor has a microcontroller inside it, even the very simple ones; there has to be some logic to go from pulse width to angle. I decided not to go into it for the sake of brevity, so I’m glad you brought this up in the comments.

      However, the IQ Position Module is the first consumer-oriented motor module I’m aware of that’s direct-drive BLDC. Maybe there’s others I should be looking at too; I’d love to hear all about them here in the comments!

      • Ryan says:

        I’ve used the Dynamixel MX-64 in a platform positioning/arm application. It has a high-res absolute encoder (4096 ppr as I recall). It can go limp, but it’s probably a lot stiffer than your BLDC because of the gears. But you also get 1000 oz-in of torque which is nice when moving a 2 lbs target. I’m not sure how else you’d get real torque for an arm without the gears, fancy controller or not.

    • Markus Blechschmidt says:

      – has a gearbox (and are plenty noisy)
      – No-load Speed: 59 RPM

    • Matt says:

      Hey Joel and all,

      Yes, these are fairly similar to the Dynamixels. If you go to our Crowd Supply page (last paragraph of Bunnie’s post), and scroll (way) down, you can see a comparison of some features between an AX series Dynamixel and our motor.

      You’re right, a number of the features overlap. There are also a handful of new things in the IQ motors. They also fill a space that’s right in between stepper motors and smart geared servos like the Dynamixel.

      The Dynamixel has the IQ modules beat on torque (thanks to the gearbox), but the IQ modules have the Dynamixel beat on speed (thanks to the lack of gearbox). The IQ modules have the Dynamixels beat on raw power because much more of the module is motor (the part that makes power), rather than gearbox (the part that converts power).

      They’re like apples and oranges. They’re both fruit, but different fruit. Now you have more choices!

  2. jack lecou says:

    I think the bigger brother of this would be integrated industrial servos like, e.g., Clearpath motors, which have been around a while. That isn’t a knock at all though — a more accesible, hobby-sized, Arduino-ized version of those sounds like it’d definitely have a big niche.

    (For affordable BLDC servo applications in general, there’s also controller boards like odrive, though obviously that’s not quite as fully integrated a ‘plug in and hack’ solution.)

  3. Chorca says:

    If you’re looking to break them out, there’s the new-and-under-development ODrive controller for BLDC motors: https://odriverobotics.com/#odrive
    A bit different in that it’s designed to split the encoder and motor out and drive them separately, but can be talked to in a similar way to use it’s own acceleration and planning.

  4. Michael says:

    What about energy recovery? Is 4Q mode possible? Or does it have internal resistors? Where does the energy go when in generatoric mode, accidentally or not?

    • Matt says:

      Yes, these are 4Q motors. The energy goes back to the supply (whatever that may be). This is great for rechargeable batteries and less than great for power supplies. There’s a built in “regen limit” that prevents the motor from over-volting the supply. You can also slow the motor down by using “brake mode” or “coast mode”, neither of which regen.

  5. someone says:

    Is the software running on the microcontroller open source?

    • Matt says:

      Not at this time. The communication libraries for interfacing with the motors are open source (both Bunnie’s and IQ’s).

      • someone says:

        Will you be open sourcing the microcontroller code or is that the secret sauce in your business model?

        • Matt says:

          The microcontroller code is one ingredient of the secret sauce. If we don’t need that ingredient for the sauce then we want to release the microcontroller code (probably BSD-3), but since we’re a young company we don’t want to close off our options quite yet. Sorry.

  6. compra unica says:

    Good post! Thanks!

  7. Nate says:

    Old floppy drives had acceleration tables to step the drive head. Many fastloader routines for the C64 had a custom step table, hence why they sound different.

    I love digital systems working in the analog domain.

  8. Timon says:

    Just out of curiosity. Are these the modules you were playing around with on 34c3? The cardboard robot you guys made was quite amazing for the quick hack it was. Didn’t really have a chance to ask you at the time.

  9. […] We think of motors typically as pretty dumb devices. Depending on the kind, you send them some current or some pulses, and they turn. No problem. Even an RC servo, which has some smarts on board, doesn’t have a lot of capability. However, there is a new generation of smart motors out that combine the mechanical motor mechanism with a built-in controller. [Bunnie] looks at one that isn’t even called a motor. It is the IQ position module. […]

  10. […] We think of motors typically as pretty dumb devices. Depending on the kind, you send them some current or some pulses, and they turn. No problem. Even an RC servo, which has some smarts on board, doesn’t have a lot of capability. However, there is a new generation of smart motors out that combine the mechanical motor mechanism with a built-in controller. [Bunnie] looks at one that isn’t even called a motor. It is the IQ position module. […]

  11. […] We think of motors typically as pretty dumb devices. Depending on the kind, you send them some current or some pulses, and they turn. No problem. Even an RC servo, which has some smarts on board, doesn’t have a lot of capability. However, there is a new generation of smart motors out that combine the mechanical motor mechanism with a built-in controller. [Bunnie] looks at one that isn’t even called a motor. It is the IQ position module. […]

  12. […] pensamos en los motores normalmente como bastante tonto dispositivos. Dependiendo de la especie, que les envíe algún o algunos de los pulsos, y que a su vez. No hay problema. Incluso una RC servo, que tiene un poco de inteligencia a bordo, no’t tiene un montón de capacidad. Sin embargo, hay una nueva generación de smart motores que combinan la mecánica mecanismo motor con un controlador integrado. [Bunnie] mira que no’t incluso llamó a un motor. Es el IQ posición del módulo. […]

  13. […] We think of motors typically as pretty dumb devices. Depending on the kind, you send them some current or some pulses, and they turn. No problem. Even an RC servo, which has some smarts on board, doesn’t have a lot of capability. However, there is a new generation of smart motors out that combine the mechanical motor mechanism with a built-in controller. [Bunnie] looks at one that isn’t even called a motor. It is the IQ position module. […]

  14. […] We think of motors typically as pretty dumb devices. Depending on the kind, you send them some current or some pulses, and they turn. No problem. Even an RC servo, which has some smarts on board, doesn’t have a lot of capability. However, there is a new generation of smart motors out that combine the mechanical motor mechanism with a built-in controller. [Bunnie] looks at one that isn’t even called a motor. It is the IQ position module. […]

  15. […] We think of motors typically as pretty dumb devices. Depending on the kind, you send them some current or some pulses, and they turn. No problem. Even an RC servo, which has some smarts on board, doesn’t have a lot of capability. However, there is a new generation of smart motors out that combine the mechanical motor mechanism with a built-in controller. [Bunnie] looks at one that isn’t even called a motor. It is the IQ position module. […]

  16. Nifa says:

    Being a layman in this field, is it possible to use the same on AC induction motors. Can we go away with reduction gear if used in EV powertrain.

  17. […] und beispielsweise an einen zweiten Motor weitergeben, wie Andrew „bunnie“ Huang in einem Beispielprojekt zeigt. Als Direktantrieb ohne Getriebe werden die Module schließlich nicht beschädigt, wenn sie […]

  18. Raeann Prigg says:

    An Intuitive Motor: IQ Control

    […]Every time you have the opportunity to, play the guessing recreation.[…]