Interfacing Micro Metal Gearmotors with Unity3D

Hope you are having a great day.

First of all, I am new to Polulu products and this forum but have been informed about the high quality components the brand offers. (Am looking forward to use extensively for future projects).

I am interested in using high-power actuators as an input/output mechanism to use in conjunction with a virtual reality environment.

Specifically, I hope to have closed-loop position/speed control (can I achieve both?) based on what is happening in the virtual environment (Unity3D, C#), while simultaneously reading motor load (current).

I have acquired a couple 1000:1 Micro Metal Gearmotor HP 6V with Extended Motor Shaft as they have sufficiently high power. In addition, I have obtained Magnetic Encoder Pair Kit with Top-Entry Connector for Micro Metal Gearmotors, 12 CPR, 2.7-18V with the necessary JST connectors.

However, I am not sure what is the best method or what additional components would be necessary to achieve the functions I desire. I do assume that I would need to use a USB-compatible motor controller such as Jrk G2 21v3 USB Motor Controller with Feedback, but as noted in the Main features of the Jrk G2 family description,

Note: the Jrk does not support using quadrature encoders for position control

Your suggestions and guidance would be heavily appreciated.

Best,
PLL

Hello, PLL.

Please note our company name is Pololu, not “Polulu”.

The easiest way to implement a setup like what you are proposing would probably be to use one of the RoboClaw Motor Controllers from Basicmicro. The RoboClaws include integrated quadrature decoders that enable closed-loop control and have internal current sensing capabilities. For motors like our Micro Metal Gearmotors the 2x7A version should be more than sufficient. Please make sure to review the RoboClaw user manual (which is available on each RoboClaw’s product page under the “Resources” tab) to verify whether it will be appropriate for your application.

Alternatively, you could find an appropriate programmable microcontroller (one with hardware appropriate for reading potentially high frequency encoder signals, e.g. interrupts) and motor driver to build your own control solution, but that will of course require a much more demanding design process.

- Patrick

Thank you PatrickM for your clear guidance.

I checked your recommendations and the 2x7A seems to be just what I needed.

I looked at the datasheet and got a grasp on how to connect the components together. If you have suggestions for additional learning material (pictures and videos) on using the RoboClaw Controllers, recommendations would be much appreciated as well.

My apologies. Pololu. (Now I don’t think I can ever get it wrong again).

Thank you.
-PLL

Basicmicro has several downloadable resources and application notes for the RoboClaws, so I suggest scanning through those to see if you can find any that would be useful for you. There are links to these available on the product page under the “Resources” tab.

- Patrick

1 Like

Thank you once again.

Hope you have an amazing day.

-PLL