Iron-based spin crossover complexes can be used as selective, visible sensors for barbiturates in the presence of other biologically relevant hydrogen bonding species.