This paper presents a simple, cost-effective and robust atomic force microscope (AFM), which has been purposely designed and built for use as a teaching aid in undergraduate controls labs. The guiding design principle is to have all components be open and visible to the students, so the inner functioning of the microscope has been made clear to see. All of the parts but one are off the shelf, and assembly time is generally less than two days, which makes the microscope a robust instrument that is readily handled by the students with little chance of damage. While the scanning resolution is nowhere near that of a commercial instrument, it is more than sufficient to take interesting scans of micrometer-scale objects. A survey of students after their having used the AFM resulted in a generally good response, with 80% agreeing that they had a positive learning experience.