February 17, 2018

Small motor controller with integrated position sensor

A while ago I added the hall effect encoder IC I've been using directly to the motor controller PCB.  The controller sits directly on the back of the motor (with a magnet added to the motor shaft), and the phase wires solder straight in.  I also have a pair of board-mounted XT30 connectors on the DC bus for easy daisy-chaining.  Otherwise, the board is basically identical to the previous version of this controller.  I've now built over a dozen of these, and have had no problems.


I plan on doing another revision of this controller using the new replacement to the DRV8301/2, the DRV8323, which Austin has played around with already.  That should let me shrink the controller even more.  I also plan on designing some general-purpose mounting brackets that fit a wide variety of hobby motors, to make it really easy to strap these controllers on the back of basically any small motor.  In a similar vein, I've also mostly written an auto-tuner for automatically measuring motor parameters for tuning the current loops.  I've verified that the measurement works, but haven't integrated it with the rest of my motor control code yet. 

Once I get those things done, it should be super easy for me to throw all the small motors I have onto the motor dyno and fill out the motor database quite a bit.

For testing and easy dyno-ing I machined some mounts for attaching the controller on the back of my T-Motor U8's and U8 knock-offs.  This isn't the intended use of this controller, but I'll get into that in a later post.


Parallel XT-30's for power, and parallel SPOX for the CAN bus.



Same old serial and programming connectors up top:


The whole reason for the linearization step in my autocalibration procedure was because I misplaced the encoder IC in my first revision of these boards, so the encoder sat .5mm off-axis.  So rather than waiting on the board revision to get things up and running, I fixed the problem in software.  The version of the controller here is fixed though.

Here are the eagle files and gerbers for the boards if you're interested, although I'll hopefully get to the DRV8323 version soon, making these obsolete.
2-layer
4-layer (2 extra layers on the power planes are way cheaper than 4-oz boards.  Helpful for daisy chaining)

9 comments:

  1. I'm assuming those are for the "hobbyking cheetah"? Having a very similar project going on, very curious to see your results! Also, have you check out halfbridge modules like CSD88599Q5DC that came with DRV8323 eval board? Might save you more space.

    ReplyDelete
    Replies
    1. That is indeed the purpose.

      I have looked at those half bridges, and even started laying out a board with them. They're significantly more expensive than a discrete bridge of similar performance though.

      Delete
  2. I really appreciate these posts! Keep up the amazing work. I'm building similar robots with stanford robotics club and your hobbyking cheetah has been much inspiration. Thanks! (http://nathankau.com/Stanford-Robotics-Club)

    ReplyDelete
  3. great work here!
    are you posting your code, as well?
    Thanks

    ReplyDelete
    Replies
    1. https://os.mbed.com/users/benkatz/code/Hobbyking_Cheetah_Compact/

      Delete
  4. Simply amazing work, I am seriously trying to fund a project here at Sussex University to replicate this incredible open field motor control design work, this is quite simply the future of legged walking robotic design, keep it up guys I am reading every post in detail and preparing resources for build (we will start with the super mini & jumping leg designs).

    ReplyDelete
  5. Where do you send to manufacture the PCBs?

    ReplyDelete
  6. Awesome project! May I inquire you as to why choose DRV832x over DRV8301/2 ? Besides the price and packaging, are there any significant performance difference? Because both of them operate up to 60V

    ReplyDelete
  7. Well passive devices are the main components used in electronics such as resistors, inductors, capacitors and transformers required to build electronic circuits. transistor

    ReplyDelete