Heating a milligram-sized sample of material at a constant heating rate is usually achieved by controlling the temperature of an electric-resistance furnace with a proportional integral derivative (PID) controller. Here we present a new method for constant-rate heating that is based on a semi-empirical mathematical expression relating sample temperature, heating rate, and electric power supplied to the furnace. This method uses PID control only for second-order corrections of the heating rate. The linearity of the sample temperature vs. time curves obtained by applying this method to a simple furnace setup is the same as the linearity of the curves generated by modern commercial thermogravimetric analyzers.