We present a protocol for building and operating an automated fluidic system for continuous culture that we call the 'morbidostat'. The morbidostat is used to follow the evolution of microbial drug resistance in real time. Instead of exposing bacteria to predetermined drug environments, the morbidostat constantly measures the growth rates of evolving microbial populations and dynamically adjusts drug concentrations inside culture vials in order to maintain a constant drug-induced inhibition. The growth rate measurements are done using an optical detection system that is based on measuring the intensity of back-scattered light from bacterial cells suspended in the liquid culture. The morbidostat can additionally be used as a chemostat or a turbidostat. The whole system can be built from readily available components within 2-3 weeks by biologists with some electronics experience or engineers familiar with basic microbiology.