Optically stimulated X-ray diffraction (OSXRD) modifies a traditional powder XRD by attaching a thermocouple, a precision temperature controller (PID control), and a thyristor power regulator firing a halogen lamp (75 w, 220 V, red-infrared) that provides up to 210°C to the sample. The included OSXRD software allows the diffractometer to be controlled and sequential profiles (ASCII files) to be obtained. These profiles are subsequently processed, obtaining new files: (1) Three-dimensional (cps versus 2θ versus time-temperature), (2) peak areas and (3) maximum 2θ positions. The automatic temperature control loop, using the proportional-integral-derivative control (PID) method, and the modifications of the XRD chamber are described. Some examples of hydrated minerals were examined in the OSXRD prototype: (1) the epsomite-hexahedrite phase transition in different isothermal analyses (28°C, 30°C, 32°C) and (2) the dehydration of the interfaces of a fibrous aragonite. Three-dimensional plots show the epsomite-hexahedrite phase transition in detail. However, in the case of aragonite (no phase transition) the 3D plot does not show visible changes, but the graph of peak-areas distribution versus temperature increases in sinusoidal shape, suggesting steps during the dehydration processes.