A carbon-dioxide-producing lung model capable of simulating spontaneous breathing is presented. It consists of a piston in a cylinder, a mixing chamber and a dead space volume. The piston is driven by a direct-current motor controlled by a micro-processor and a servo unit. Respiratory waveform and rate, tidal volume, carbon dioxide production and dead space are easily adjustable within a wide range. The model is easy to handle and accurately mimics a given breathing pattern. It seems suitable for investigations of rebreathing and carbon dioxide elimination in different anaesthetic circuits.