You don't use machines, you use chemistry.
1. First off, there's the spectro method, where you send in a sample of your powder and a reference to a lab. This way you'll get a definite answer, complete with quantification of the different impurities present. But this is costly, and uses a machine. A spectroscopy machine. Check out Raman, there's a description here on the forum.
2. Another way is TLC, Thin Layer Chromatography. There's a description of that process here on the site, and you'll find plenty of Youtube material olso. It's something you can do yourself, but you need a bunch of materials and some basic knowledge.
3. Then there's melting point. Pretty straightforward: you take a small sample of the powder and heat it until it melts. Every substance has it's specific melting point, and if the result is off it means the powder is impure and contains stuff that alters the melting point.
But if it's a simple question of trying to decide how much dope there actually is in let's say a gram of your purchased product, I would probably do an A/B extraction and see what I end up with. Dissolve a sample the purchased salt in water, basify it and collect the freebase. Then salt it out again and compare the weight of the resulting salt with the weight of the sample. Either that or just try and wash out the additives with something that dissolves them but not the product. If possible.