Drosophila olfactory aversive conditioning has served as a powerful model system with which to elucidate the molecular and neuronal mechanisms underlying memory formation. In the typical protocol, flies are exposed to a constant odor stream while receiving a pulsed electric shock in the conditioning tube of a manual apparatus. We have devised a simple, low-cost semi-automated conditioning apparatus that computationally controls the delivery of odor and shock. A semiconductor-based odor sensor is employed to monitor the change of odor concentration in the training tube. The system thus allows electric shocks to be precisely matched with odor concentration in the training tube. We found that short-term memory performance was improved with a pulsed odor flow protocol, in which odor is presented in short pulses, each paired with electric shock, rather than as a constant flow. The effect of pulsed odor flow might be ascribed to the phenomenon of 'conditioned approach', where approach toward an odor is induced when the electric shock is presented before odor pulse ends. Our data shows that the system is applicable to the study of olfactory memory formation and to the examination of conditioning parameters at a level of detail not practical with a manual apparatus.