Looking for best camera for macro photo

Hi,

I’m looking to create a robot to capture details on coins. As a proof of concept, I currently use Lego for the frame and I plan to use micro:bit or Raspberry pi as a micro controller. I’m unsure if a micro:bit will be enough to control 3-4 servo, 1 camera and the lights.

So, long story short, which camera can someone propose me good camera for such project? It needs to be capable of taking whole coin (about an inch-wide) as well as small details (think about one character on the coin like “2” in “2024”).

It doesn’t need to be capable to do so by remaining static. My plan is to make it move from near to far to take the pics.

Thank you very much for your help. This is my first try designing a robot.