From semiconductors to superconductors: a simple model for pseudogaps