  An autonomous quantum thermal machine comprising a trapped atom or ion placed
inside an optical cavity is proposed and analysed. Such a machine can operate
as a heat engine whose working medium is the quantised atomic motion, or as an
absorption refrigerator which cools without any work input. Focusing on the
refrigerator mode, we predict that it is possible with state-of-the-art
technology to cool a trapped ion almost to its motional ground state using a
thermal light source such as sunlight. We nonetheless find that a laser or
similar reference system is necessary to stabilise the cavity frequencies.
Furthermore, we establish a direct and heretofore unacknowledged connection
between the abstract theory of quantum absorption refrigerators and practical
sideband cooling techniques. We also highlight and clarify some assumptions
underlying several recent theoretical studies on self-contained quantum engines
and refrigerators. Our work indicates that cavity quantum electrodynamics is a
promising and versatile experimental platform for the study of autonomous
thermal machines in the quantum domain.
