We report on the development of a low-cost spectrometer, based on off-the-shelf optical components, a 3D printed housing, and a modified Raspberry Pi camera module. With a bandwidth and spectral resolution of ≈60 nm and 1 nm, respectively, this device was designed for ultraviolet (UV) remote sensing of atmospheric sulphur dioxide (SO2), ≈310 nm. To the best of our knowledge, this is the first report of both a UV spectrometer and a nanometer resolution spectrometer based on smartphone sensor technology. The device performance was assessed and validated by measuring column amounts of SO2 within quartz cells with a differential optical absorption spectroscopy processing routine. This system could easily be reconfigured to cover other UV-visible-near-infrared spectral regions, as well as alternate spectral ranges and/or linewidths. Hence, our intention is also to highlight how this framework could be applied to build bespoke, low-cost, spectrometers for a range of scientific applications.