Optogalvanic detection of negative ions in discharges