A self-operating broadband spectrometer on a droplet