In the present work I analyze the factors that affect signal generation in the measurement of photothermal expansion with an atomic force microscopy probe. I discuss the general properties of the signal transduction mechanism considering two forms of light excitation, progressive and impulsive, and I derive guidelines for performance optimization of the measurement. I also provide a general framework to analyze the thermomechanical processes that underlie signal generation in terms of a thermodynamic engine cycle and I discuss the relationship between signal generation and efficiency of the mechanism. The work has been subdivided into sections for the sake of clarity.