Abstract The odour of grains is in many countries the primary criterion of fitness for consumption. However, smelling of grain for quality grading should be avoided since inhalation of mould spores or toxins may be hazardous to the health and determinations of the off-odours are subjective. An electronic nose, i.e. a gas sensor array combined with a pattern recognition routine might serve as an alternative. We have used an electronic nose consisting of a sensor array with different types of sensors. The signal pattern from the sensors is collected by a computer and further processed by an artificial neural network (ANN) providing the pattern recognition System. Samples of oats. rye and barley with different odours and wheat with different levels of ergosterol, fungal and bacterial colony forming units (cfu) were heated in a chamber and the gas in the chamber was led over the sensory array. The ANN could predict the odour classes of good, mouldy, weakly and strongly musty oats with a high degree of accuracy. The ANN also indicated the percentage of mouldy barley or rye grains in mixtures with fresh grains. In wheat a high degree of correlation between ANN predictions and measured ergosterol as well as with fungal and bacterial cfu was observed. The electronic nose can be developed to provide a simple and fast method for quality classification of grain and is likely to find applications also in other areas of food mycology.