A guide to instrument design