I had to resort to using my Nikon DSLR with to 105mm macro lens… primarily due to the necessity of controlling the shape, direction, area, angle, etc. of the light source. Back in the 1980’s and 1990’s various CD manufacturing plants, used various different methods of engraving a matrix code on a particular production run of a CD.
So, some of them possibly used a YAG laser to cut the letters and numbers as a few dozen dots, or parallel lines… or literally just drawn out the edges of the letters and numbers as vectors.
Some of them look like someone carefully scratched the letters and numbers into the surface of the stamper by hand, with a sharp metal object.
Anyway, depending on the microscopic shape, of the area, of the characters, the angle of the light is most important, so plan on moving your light(s) and camera around every time for every disc. Also get used to constantly adjusting the aperture of your lens too… because you’re basically taking a photo in the mirror, and with a large depth of field you’re going to just get a picture of your light source.
(Also, you’ll need to keep decreasing your shutter speed, and cranking down your ISO, so you’re not constantly blinding yourself by taking a photo of your light source in a mirror…) (but only sometime when the reflection angle is small… many times the angle between the light and the lens is large… and you’ll need to increase your shutter speed, because now it’s dark…)
So… what works pretty well, maybe 70% of the time, is a diffuse light box surrounding as much of your CD as possible. You can improvise with any large white or gray surface (paper or cloth, etc.) that’s evenly lit. Keep in mind that you will see the shape of the light in the reflection on the CD. If you put a bright or dark object nearby, you’ll see a bright or dark stripe on the CD…
So… this doesn’t work for some matrix code engravings… so in those cases I use a white LED flashlight (point source), and with the camera on a tripod (same as above if I didn’t mention) move the camera, CD, and flashlight around until the matrix is clearly visible. I have a remote control shutter release for my camera, with makes it so much easier to do…
I’ve experimented with a green laser pointer too, sometime that works better, and other times worse. It is really good if you want to get a clear photo of which areas of the CD have engraved data, and which areas have been left unwritten. (In a light box, the surface of the CD will appear a smooth continuous gray color – with a laser pointer you get a bright stripe on a dark background, but within the stripe you can clearly see a high contrast “grain” where the lands and pits are engraved)
So… on some CDs, none of the above work, because you need the light reflected almost exactly perpendicular to the surface of the CD. For those CDs I need to use a ring flash. (It works for other CDs too, but mine was built back in 1972, and is a pain to use, and I can’t see what I’m doing, and the capacitors take like 15 seconds to recharge after each flash…) The reflection angle is so narrow, the lens is physically in the way of the light. You can tilt the camera or CD a little bit to make this easier, but you will introduce distortion and blurring…
… unless you have a bellows or tilt-shift lens.
I forgot to mention: I mount my camera on a tripod, and set it level to the surface on which I’m placing the CD, so that all parts of the CD are exactly the same distance from the camera lens. (i.e. the image is flat) I open the aperture as wide as possible, so only the surface of the CD is in focus, and the reflected light source is out of focus. (I even use a bubble level to check.)
… And then my life gets complicated and I don’t upload the photos for a year…