Studies have found differences in the concentration of volatile organic compounds in the breath of diabetics and healthy people, prompting attention to the use of devices such as electronic noses to detect diabetes. In this study, we explored the design of a non-invasive diabetes preliminary screening system that uses a homemade electronic nose sensor array to detect respiratory gas markers. In the algorithm part, two feature extraction methods were adopted, gradient boosting method was used to select promising feature subset, and then Particle Swarm Optimization (PSO) algorithm was introduced to extract 24 most effective features, which reduces the number of sensors by 56% and saves the system cost. Respiratory samples were collected from 120 healthy subjects and 120 diabetic subjects to assess the system performance. Random Forest (RF) algorithm was used to classify and predict electronic nose data, and the accuracy can reach 93.33%. Experimental results show that on the premise of ensuring accuracy, the system has low cost and small size after the number of sensors is optimized, and it is easy to install on in-car. It provides a more feasible method for the preliminary screening of diabetes on in-car, and can be used as an assistant to the existing detection methods.