Release 2016.8.2 / Update 2017.11.1

AR-FOCUS wiring

In short, AR-FOCUS is just a thing of running the servo motor in the standard library in the Arduino.However, I took many functions that “I want to use like this” in. It will be convenient setting for use as follow-focus. I’ve convinced in the useful abilities.


Although this sketch is limited in wired use, it is simple and easy to build, I think.

Since my poor knowledge about electricity, there may be mistakes in the circuit diagram. Please ask to your friends who is familiar with science.

Wiring illustration


Circuit diagram


Instruction video

Required parts



It must be 30 KB of the area to write a sketch, at least. Beacuse of this over-capacity, it may be impossible to write to compatible machines. You need to be careful. There are over 50% code about graphics in this sketch. But sorry to say, this is limit of my ability, for now. I hope you make it upgrade and be compact.

This sketch uses ‘u8glib’ for graphics. And you have to be aware of the corresponding of your machine for it. I have already knew that I2C connection works in ‘Arduino UNO’ and ‘Pro mini’. But on some machine, it won’t work like SAMD21, teensy. SPI is OK.

I kept away ‘delay’ function from this sketch as much as possible. So ‘AR-FOCUS’ will be faster, if it be run on faster Arduino, I think. In the terrible case about response of variable resistor, you’d better to think of your machine speed.

Verified microcomputer

Servo motor


You can use any servo motor, if it works by ‘servo’ library. There is a variety choice in the conditions of your money or lens.
In my experience, all I can say is “Cheap ones has poor ability”.


My recommendable servo motor is ‘Futaba RS304MD’. Basically, this is a serial servo motor. But, it also work on PWM control. It has resonable price, 300 degree rotatioin, silent operation sound. In some situations, You need particular options to attach parts. So, it may be expensive at total. – servo category
Akizuki – servo category
Futaba RS304MD – japanese

OLED(SPI) screen


I made this sketch for 128×64 pixel display screen. As you know UNO allows to use in I2C or SPI. But in some microchips, you may fail to use by I2C. So SPI is more safer.

Variable resistor


This is main part. I usually use 10kΩ. But this is not necessary specification.

Akizuki – japanese
marutsu – japanese

3colorLED&Rotary encoder plus switch


This is a electric parts that became collectively. You can buy in several web shop.

You should check the spec of your Arduino, because it work with 5 volt. You can assemble individually, 3 color LED, rotary encoder, switch. Also, you can invert switch logic on sketch. Speaking further, maybe you don’t have to use LED if there is no problem to use screen only. But, LED makes it look good.

3colorLED&SW&Rotary Encoder

Switch for AUTO MOVE


This is switch for AUTO MOVE function。This should be momentary switch.

Akizuki – japanese
marutsu – japanese

Condensers & resistors

I didn’t calculate precise value for these parts. So you should watch out in wiring diagram, especially using in 3 volt microchips. I think it won’t destroy its microchips as long as using Arduino UNO, maybe. But it may affects bad wastage of the battery.

Akizuki – japanese
marutsu – japanese

Power supply


You can use both Arduino and motor in a 6 volt battery in several situation. But usually motor uses large current. So I divided battery in the diagram. On the other hand, Some USB battery has large capacity so that use in one pack. Set larger condenser on, if you want to use it.

Switch for power


Also you need a switch for power. The power supply will be troublesome if you don’t have it. – switch

Other equipment

Camera Rig


You have to get retainer to hold motor to your lens , and containers for electric parts. But this is very ‘DIY’ works. It’s up to you. – camera rig



There needs something to move your lens by motor.
I use tire parts of radio-controlled models. TAMIYA is famous in Japan. – Tire

Very important thing is most servo motor rotation is 180 degrees.


If your wheel smaller than your lens rotation range, you can’t cover all range.

I strongly recommends you to lock by gear. Because slips of your servo disturbs precise control.


At first, I was planning to gearless attachment. I have given it up.