Customized high precision solenoid and optimized winding. The solenoid is used in the sampling mechanism for a drug test analyzer.