A solid approach to taking highly detailed pictures of small objects is to use a technique called focus stacking, where you take multiple pictures of the subject, all focused on different parts of the subjects, in order to capture it entirely in focus, and then merge them in post, in my case using Photoshop.
In my attempt at taking photos of various minerals and rock samples, I ended up using a simple setup, consisting of my trusty K-3; the DA 50mm f1.8 lens; a tripod - set on a table, the shaft holding the camera reversed, so that the camera was mounted facing downwards, at the table; a cable shutter release; natural light coming from a window and a flashlight.
My approach was to focus as near as possible (turn the focus ring as close as it will turn), then slide the tripod down so that the highest point of the subject was in focus. This way, I was as close as possible to the subject, resulting in a larger subject in the frame (more pixels, more details
). Then I would take a picture, focus a bit further, take another one, and so on, until I captured shots that included every single part of the mineral in focus.