Autofocus for projector

I want to add auto focus in a projector. How should I design the mechanism? I have finalized to use Sharp IR sensor and servo motor with Arduino. How should I proceed further?

krpst:
How should I proceed further?

If you want help with the code, you should describe the algorithm you intend to use that will enable the IR sensor to detect out-of-focus and in which direction. Since you have "finalized to use Sharp IR sensor" you presumably have such an algorithm else you couldn't have chosen the sensor. If you explain the algorithm, and the code you tried so far, I'm sure you'll get some help.

Does that mean that you want to use an IR remote control to control the servo? A more detailed description of your project would be welcome.

The how to use this forum-please read sticky has some advice on what we need to know to help you.

I want to use IR sensor to detect the distance of the screen/wall and adjust the focus using motor.But how should develop the mechanism to rotate lens to adjust focus?

I am developing algorithm, I may need help in future on algorithm but right now I want to know how will I rotate lens?

krpst:
I want to use IR sensor to detect the distance of the screen/wall and adjust the focus using motor.

Is that how commercial systems work? I always thought it was some optical voodoo of actually detecting the out-of-focusness. But assuming that you're right, how will you determine the relationship between the distance and how far out or in the lens needs to be?

krpst:
right now I want to know how will I rotate lens?

That, surely, depends on the mechanical make-up of the projector, and is something only you can grapple with, with the thing in pieces on the table in front of you.

Yes, Like the commercial projectors.

krpst:
Yes, Like the commercial projectors.

But do they actually work by measuring the distance, not by detecting that the image on the screen is unfocused?

If so, you need to know how far in or out the lens needs to be for a given distance. Do you know that relationship?

Hal_Posoyan:
But do they actually work by measuring the distance, not by detecting that the image on the screen is unfocused?

If so, you need to know how far in or out the lens needs to be for a given distance. Do you know that relationship?

I have no Idea.

Let me know if you got any idea about that.

Thanks

But surely after you’ve focused it , then you don’t need to do it again ?
My experience of projectors is , if you move one , getting it to line up with the outline of the screen and square to it is the hard bit, manual focusing the easy bit

krpst:
I have no Idea.

Let me know if you got any idea about that.

Thanks

If you removed the covers from your projector and examined the mechanism carefully, you might learn how they autofocus.

Paul