Don't neglect to consider the "hyper focal" distance. Without knowing how to achieve this, you can still approximate it's effect by focusing 1/3 to 1/2 into the area your are seeking to capture the greatest depth of field. Hyper Focal distance is the space between the closest and most distant points that are in acceptable focus. By focusing about a third or half way into the scene, you will separate these points as far apart as is possible for the lens you are using. Try it.
Christian Amateur Photographer