Release 2016.8.2 / Update 2017.11.1

How to use AR-FOCUS

-before you start ‘AR-FOCUS’

This sketch is using EEPROM library to save status value. So, you have to ‘INITIALIZE’, at first. Or you can’t use in normal.



After you power on, push ‘ALT’ switch and ‘AUTO’ switch during startup screen. Initialize will be done if there is ‘ALL RESET’ appeared on screen, after you release the switch.

Reboot it.

Ready to go


At first, servo goes to center of its rotation range and ‘AR-FOCUS’ asks you are “ready?”. You can’t control servo until you push ‘ALT’ switch.


Set lens position to the center by measuring range from end to end. And attach motor to the lens.

You are ready to go now. But I recommend you to set cursor to ‘v’, before you push ‘ALT’. Because servo goes to VR position suddenly.

Basic mode in ‘AR-FOCUS’ is ‘CH A’. Motor is limited in narrow range, after initialization.

You have to set range of limit in ‘Calib Max’ and ‘Calib min’ mode.

Mode change


You can go to ‘Mode change’ by rotating and pushing ‘ALT’ switch. LED turns on blue. Select ‘Calib max’ mode by rotating encoder and push to go to the mode.

Calib max / min mode


Set range to the edge of your lens using encoder. You can see value on the screen.

If you finished, go out ‘Calib max’ by ‘ALT’ push & rotate. Also you adjust ‘Calib min’ in same way.

After you finished in ‘Calib min’, push ‘ALT’. Then it asks whether you want to “save to memory”. If you choose ‘Yes’, You can save the values to memory bank. Or if you select ‘No’, data is saved in temporary bank.

Basic : CH A mode

‘CH A’ is basic mode in ‘AR-FOCUS’. You can control servo real time within limit value by variable resistor.

Channel memory


In ‘CH A’ mode, it memorizes position by pushing ‘ALT’. There are four bank for position memory (B-E). ‘CH A’ always follows to variable resistor.

Push and hold ‘ALT’ switch for a period of time, if you want to delete.


If you push ‘AUTO’ switch, you go to ‘AUTO MOVE’ mode. And motor moves to next position from current position. This order depends on ‘LOOP PATTERN’.



You can adjust moving speed. Rotate encoder in ‘CH A’. LED turns to white and you can change value. This limit of time is 120 seconds. You can set different time for each channel. But, this value is set as default for each channel.

This mode return to ‘CH A’ automatically, if variable resistor’s value changes, or several time spent.



In ‘AUTO MOVE’ mode, you can skip to next position if you push ‘ALT’ again on moving.

If it were long press, you can abort auto move and it goes back to ‘CH A’.

SHIFT mode


It changes to ‘SHIFT’ mode, after ‘AUTO MOVE’, as long as current position is not ‘A’. You can’t use variable resistor unless in ‘CH A’.

Encoder is available instead for adjust the position.

Also you can adjust speed by pushing ‘ALT’. Long press of ‘ALT’ switch deletes current position and next position will be set as current position, instead.

About other functions


Sometimes motor rotation slides even if you limit ranges at “Calilb max / min”, by temporary power off, detaching, or slipping. So, ‘DETUNE’ allows you to shift the ranges. But this function is available if there is margin enough on servo angle. ‘!’ appears on screen, if ‘detune’ is active.

This function is saved in EEPROM.

Go to ‘Calib max / min’ mode if you want to save shifted detune values as default. You can see value has been shifted in the mode.

ROTE mode

‘ROTE’ mode lets you invert your variable resistor direction.

Each lens has different rotation directions. But, you can always control same direction by ‘ROTE’. You can check the direction of rotation by “<>” marks on screen.

This function is saved in EEPROM.


You can save or load calibrated values on ‘AR-FOCUS’.

But there are four bank which you can save by ‘AR-FOCUS’ operation. Otherwise, you can keep more data by rewriting ‘AR-FOCUS’ sketch directly. First, you go to ‘full val’ mode to set it ‘Yes’. And take memorandum of calibration max / min value. Then change variable definitions.

“lens_low” means values of “calib min” and “lens_high” is for “calib max”. And “lens_name” is for its name. These variable definitions are an array and the first array is reserved as “temp”.

If you change value, for example, set 300 to 150 of “lens_low”. And set 1500 to 1600 of “lens_high”. Also change name of “TK 11-16” to what you want. Please set it to eight characters or less.

*If you load or change value of calib max/min, memorized position is moved in the range.


You can adjust luminance of LED. The value range is 0 to 255.
This function is saved in EEPROM.


Basically, variable resistor value is mapped to a range of from 0 to 1800 in ‘AR-FOCUS’. But it is displayed in a range of from 0 to 180, if you don’t set ‘full val’ to ‘yes’. You have to see full value in order to change value of the sketch.

P-KEEP mode

When you power off, position and speed memory is erased. But you will be able to remain the data after power off, if ‘P-KEEP’ is on. The alteration is updated after certain actions, like auto move, so that you never mind. But generally EEPROM lifespan is under 10,0000 times. I recommend you not to keep always this ‘P-KEEP’ on.

‘+’ mark appears on screen, if you activate this function.


you can change pattern of ‘auto move’ by this mode.
There is three way.

  1. After moving from A to E, come back in reverse order to A from E (ping pong)
  2. After moving from A to E, returns to A (cliff)
  3. Always moving to up from relaying A (Splinter)


  • In ping pong, speed setting of ‘E’ is disregard.
  • In splinter, speed setting of ‘A’ is disregard.

This function is saved in EEPROM.

srvCalib mode

*This function is available when “#define SRV_CAB” is true.

“AR-FOCUS wired” uses “servo.write.Microseconds” on servo library. And its default PWM value are from 544 to 2400. You can change that. Encoder is for value change. ‘AUTO’ switch is for switching high and low. Incorrect PWM value may destroy your motor. You have to be careful.

This function is saved in EEPROM.

Flip Disp mode

The display of the screen can be turned upside down by ‘FLIP DISP’. Variable resistor and encoder follows to the changing.

This function is saved in EEPROM.