Release 2017.6.20 / Update 2017.11.3

Use motor driver

I took a experiment using DC motor driver, because I thought it works as follow focus.

As a conclusion, it was a failure. But this way and the Sketch works very well for other purpose, I think.

TA7267BP

TA7267BP. I got this motor driver a year ago, because it was cheap.

Then I have been forgotten it for a while. But I found it few days ago and retry to use. And I found it works very smooth with “non-click rotary encoder” Sketch.

So I made their rigs roughly and checked whether it works or not.

The TR7267BP’s pin arrangement is as follows.

This IC seems to be out of date. It is hard to find on web shop in Japan.

Sengoku Net

But on this article, my Sketch is so simple that easy to find replacement IC perhaps.

Necessary parts

I used gearbox product which I can get easily in Japan. But, I don’t recommend this, because this product is unable for precise motor task.

Wiring

I heard this TA7267BP IC is not suitable for such small motor. But temporary, it works.

And on the photo, I use 5V battery as motor supply, which is inappropriate for this 3V motor. You should use proper voltage for your system.

Sketch

Download Arduino sketch file from down below. Or copy and paste from closed window.

Sample Sketch file – DC motor driver contorl

*This sample sketch needs “MsTimer2” library. You have to install it if you haven’t got it yet.

You may feel this sketch rather long. But most of the part is for reading encoder. The main function is just “Read encoder” and “Add voltage for a while (10 ms) to encoder’s direction”.

About defined value

I mention several defined values.

#MOVE_VAL

This value is moving motor duration. This number is in milliseconds. Set it as you like.

#REV_RAG

There are some idling in gear when the rotation has been reversed on my gearbox. So this defined value add extra duration when reversing. Set 0, if you don’t want it.

The reason I failed

The motion is very good, but it lack of torque.

 

The lens which I wanted to use with is too tight to rotate on this system. This “SIGMA 30mm F1.4” lens is old, and hard to move focus ring.

But some on recent lens, it worked. So usefulness of this sketch will depend on your situation and what to move for.

Reference

panchiga’s blog – DCモーターを制御する

Leave a Reply

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