A Pragmatic Guide To Motors With Jonathan Beri

[Jonathan Beri] is a Maker of all sorts, with an affinity for robots, APIs, and Open Source. By day he works on making Android & iOS SDKs easier to use and by night he can found begging a PID controller to “just work already.” Recently he contributed to, “Make: JavaScript Robotics,” printed by Maker Media (2015).

[Jonathan] covers a lot of ground during his motors talk at the 2015 Hackaday SuperConference. He discusses brushed DC, stepper, servo, and brushless motors. Although just scraping the surface of each type of motor [Jonathan] touches the important details you can use to determine which type of motor is best for your project. The slide show he has put together has quite a bit of information and tips for beginners that might go overlooked when choosing a motor. For instance a list of 30 attributes that should be considered when selecting a motor. Included in that list are the 7 attributes [Jonathan] places priority on when he chooses a motor for one of his projects. We’ll delve deeper into that after the break.

Controlstep-hrot

Once you nail down a motor type for your project the real challenge begins, the controller. [Jonathan] does an excellent job laying out the big picture options for someone with little to no experience with motor control. Along the way he throws in little tips like exchanging the transistors in your H-Bridge for MOSFETs when you need more power, then he double tips by reminding you to add heatsinks when adding power. We know [Jonathan] can’t keep you from letting the magic smoke out of your MOSFETs, but he is going out of his way to try.

Stepper motors may seem more complex, after all unlike brushed DC motors which have 2 wires to connect to positive voltage and ground, stepper motors can have 4, 5, 6, or 8 leads to wire up. [Jonathan] calms us down before panic ensues by breaking down exactly what is going on in a stepper motor. How the coils of a stepper can be related to a DC motor he previously discussed. Moreover he goes into several examples for controlling these multi-wired beasts and explains why he uses one technique over another.

[Jonathan] also mentions that their may be a follow up talk on closed loop control so keep a close eye on his hackaday.io project page. Check out the video after the break for [Jonathan]s rundown on various motors including schematic controller examples and where to find example code.

Lead By Example

We would like to take a moment to acknowledge how awesome [Jonathan Beri] is for sharing the experience of giving a technical talk first hand. From outlining the broad strokes of his talk on hackaday.io in its early stages all the way through the finished slides for his presentation. [Jonathan] commented his presentation (better than most of the code we write) with his talking points and sources so be sure to look for that. You can click through his presentation as you watch the video above or revisit it from the comfort of mid-project frustration as needed. All that is to say: one last thank you to [Jonathan Beri] is well deserved for sharing his process in such an open and transparent way, we hope to see more from [Jonathan] in the future and we might just hold you to that closed loop control follow-up talk too ;).

Jonathan can be found on GitHub, Twitter as @beriberikix, and Google+ as +JonathanBeri.

8 thoughts on “A Pragmatic Guide To Motors With Jonathan Beri

  1. As far as I know, there is still no single-chip solution that is an Hbridge for a DC motor, but with a built-in blanking period, ADC for BEMF, plus the summing-offset opamp you need to scale it, and a basic speed regulator (like a 3rd order Z transform formulation of a PID controller).

    Actually, I think that would make a pretty nice entry for the One Square Inch Project, if they run that again. Just a board that you can attach to over SPI, program the gains, program the motor constant, and just give it a speed to control to …

      1. That is a pretty cool reference. I have landed on the website for that company several times before, they definitely know what they are doing.

        The last topology in that list, the “Switching Mode Analogue Speed Controller”, that is how we do it on our robot board in lab. But it takes a microcontroller that luckily has a pretty convenient “special event trigger” for the ADC, so it can just be set S&H in the last 1% of a PWM period, and then the PWM is limited to 95%. And then it takes an op-amp and 5 precision passives, and a 1/2*Vref reference, and then an H-bridge for the motor.
        It would be kind of nice if that was all rolled into a single IC.

  2. I’m a bit confused: Jonathan surely has lots of enthusiasm and stuff he delivers helps to get you up and running quickly. On the other hand, you cannot successfully control a brushed DC motor with a potentiometer set as a voltage divider – more losses than output. The H bridge as drawn will spontaneously combust without drive logic once the power is applied – the current will flow out of the base of a PNP device straight into the NPN base, saturating both. The spike protection diodes are also a must if the thing is expected to work more than once. I also disagree with FETs getting warm: They only do if improperly driven on chosen – especially in hobby, several-watt applications. I had a 12V 1A motor controlled with a pair of SOT23-6 dual mosfets – not warm at all.

    1. The problem is that MOSFET requires huge amount of current to drive the gate capacitance. If you are not aware of this and try to switch a MOSFET from a microcontroller, the rise/fall time will be horrible. The MOSFET burns up because it is operating in linear mode during the slow rise/fall time. The larger the MOSFET die is, the more capacitance it will have, the slower rise/fall time and more wasted power.
      Time to go beyond DC analysis mindset.

  3. I’m a bit confused: Jonathan surely has lots of enthusiasm and stuff he delivers helps to get you up and running quickly. On the other hand, you cannot successfully control a brushed DC motor with a potentiometer set as a voltage divider – more losses than output. [edit: spam link removed]

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.