Good, Cheap Camera for Close Ups? Macro?

First suggestion: look up reviews for your specific model of iPhone, and see how well its camera fared. My recollection is that some are good, and some not.

If you decide you need a camera, look in places like craigslist and Goodwill for ones that are dirt cheap because they're a few years old and don't have 40 gazillion megapixels. Many cameras with what are now considered "too small" sensors had superb optics. Unless the PCBs you're photographing are PC motherboards, 3-5 megapixels should be plenty.

I disagree with the suggestion of a tripod: you're going to want something more like a "copy stand" to hold the camera pointing dead straight at the PCB. If you try to use a tripod, you'll find that the legs get in the way, or you have to cantilever the camera out so far that it becomes unstable, or you have to try to prop up the subject at odd angles to get the camera's axis perpendicular to it. To make one really cheaply, start with a base that's nice and flat, and about 10-12 inches on a side. Something like one of those plastic kitchen cutting boards that's about half an inch thick should do. Mount a vertical piece of 2x2 lumber to it. Attach your camera/phone holder to another piece.of 2x2, and use a C-clamp to hold it horizontal at the right height.

You can get fancier and more expensive, but that's all you really need for occasional use.