We have designed and built a compact breadboard prototype instrument called WatSen: a combined ATR mid-IR spectrometer, fixed-focus microscope, and humidity sensor. The instrument package is enclosed in a rugged cylindrical casing only 26 mm in diameter. The functionality, reliability and performance of the instrument was tested in an environment chamber set up to resemble martian surface conditions. The effective wavelength range of the spectrometer is 6.2-10.3 μm with a resolution Δλ/λ = 0.015. This allows detection of silicates and carbonates, including an indication of the presence of water (ice). Spectra of clusters of grains < 1 mm across were acquired that are comparable with spectra of the same material obtained using a commercial system. The microscope focuses through the diamond ATR crystal. Colour images of the grains being spectroscopically analysed are obtainable with a resolution of ∼20 μm.