We present a study of heating small opaque substrates using a blue laser diode. It can be used as a method of temperature control for small sensors, e.g., atomic magnetometers. A blue laser from a low-cost engraving machine is used to illuminate an opaque material sheet (1×1×0.2 cm3) attached to a 1-cm glass cuvette whose size is similar to a typical vapor cell in compact atomic magnetometers. The input electric power of the laser diode (P) is supplied by a laser driver board and controlled via a computer by a pulse width modulation. We investigate the heating method using the electric power (P) between 2.67 and 4.67 W and 4 types of opaque materials: a silica bonded investment material, a gypsum bonded investment material, a silicone epoxy, and a mortar. The results show that in all cases, the temperature of the cuvette increases with time until it reaches a maximum value (Tmax) within 10 mins. For all tested materials, Tmax always increases with the power P. For a given power P, Tmax depends on the material type. At the maximum power of 4.67 W, Tmax are 52°C, 64°C, 81°C, and 88°C for the silica bonded investment material, the gypsum bonded investment material, the silicone epoxy, and the mortar, respectively. Therefore, among the tested materials, mortar is the most effective material for laser heating.