On-board diagnostic systems play an important role in the current generation of cars and will play an increasingly important role in the next future. The design of on-board diagnostic systems is a challenging problem under several points of view. In this paper we discuss the experience we made on such a problem within the VMBD project. In particular, we discuss an approach which tries to reconcile two goals: satisfying all the requirements and constraints imposed by the on-board application, and exploiting the advantages of the model-based approach as much as possible. The approach is based on qualitative deviation models for the automatic derivation of on-board diagnostics based on decision trees. In the paper we use a specific application, the Common Rail fuel defivery system, as a concrete example, briefly discussing the on-board diagnostics we designed for such a system and its prototype implementation and demonstration.