  Contaminated substances such as counterfeit medication and food contami-nated
with pesticide residue is a pandemic of utmost urgency. Spectroscopy and
chromatography methods are often used but are expensive and complex and as such
a need exists for a device that can be easily operated in developing
commu-nities. We present a hacked visible spectrometer based contaminated
substance detector using machine learning. The Support Vector Machine (SVM),
Logistic Regression, linear Regression and Convolutional Neural Network (CNN)
models have been implemented and are trained on the acquired spectrum data. Our
results show that a lowcost method of identifying contaminated substances is
achievable with very high accuracy.
