3 FIG. 2: Heat engine output signal. a Characterization of the in-plane mechanical bending resonance by external excitation at different chamber pressures. b,c,d Operation of the heat engine at I$_{dc}$ = I t +0.01 mA at a chamber pressure P =0.01 mbar. In panel b the spontaneous start-up of the engine is measured by an analogue oscilloscope when a current I$_{dc}$ =1.20 mA is switched on at t =0 s. The self-sustained sinusoidal output signal is measured c by a digital oscilloscope and d by a spectrum analyser that determines the power spectral density (PSD). From the oscilloscope data in panel c , the amplitude x 0 of the centre-of-mass is estimated to be x 0 =43 nm, using x 0 = v ac, 0 / ( V$_{dc}$K pr ), with V$_{dc}$ =0.99 V and an AC amplitude v ac, 0 =27 mV. it converts part of the resistive heat into work W$_{e}$ . The piezoresistive beam therefore operates as a heat engine. Figure 1e shows the P − V diagram and Fig. 1f the phases of the thermodynamic cycle of the engine. In phase the speed of the mass results in an expansion of the engine beam at high temperature. In phase the strain in the beam is tensile, such that it is cooling because the piezoresistance of n -type silicon is low. As a consequence the temperature of the beam is reduced in phase such that the beam contracts at low tem- perature, until it reaches phase where the compressive strain causes a high piezoresistive heating power, result- ing again in an elevated temperature in phase . is given by ω$_{0}$ = √ k/m . In the small-signal approx- imation, the linearised equation of motion of the heat engine driven resonator is equivalent to the well-known harmonic oscillator: m ¨ x + √$_{km}$ Q$_{int}$ ˙ x + k ∗ $_{eff}$x = 0. For a si- nusoidal motion x = x$_{0}$e iωt near the resonance frequency ω$_{0}$ the imaginary (damping) part of this equation be- comes zero at a threshold current value I 2 $_{t}$=( Q$_{int}$ Im β ) − $^{1}$. Above this DC current I$_{dc}$ > I$_{t}$ the power generated by the heat engine beam exceeds the intrinsic losses and the resonator will be brought into sustained oscillation by the engine beam. The heat capacitance of the beam results in a thermal delay between piezoresistive heating power and temper- ature in the engine beam. As a consequence, the beam expands at a higher beam temperature T$_{b}$ than at which it contracts. The amplitude of temperature variations during the oscillation measured in Fig. 2c is estimated to be 0.2 K by finite element simulations. During each period of oscillation the silicon working substance in the piezoresistive beam therefore goes through a thermody- namic cycle, similar to a Stirling engine, during which After having shown the operation of the heat engine above the oscillation threshold I$_{t}$ , we now investigate its characteristics at lower DC currents. Below the threshold the displacement x of the resonator will still exhibit ran- dom thermally excited ’Brownian’ motion. The spectral Heat pump and refrigerator