What screw size should be used to mount a TIP31 in a TO220 package to a bare PCB (no heatsink?) I presume a nut will also be required on the other side, so would appreciate a part number for that too. (I'm not too clued up on mechanical stuff, so go easy on me.)
Electronic – What screw should I use to mount a TO220 package
I use a panheaded M3 screw with a matching nut for TO220.
Put the nut on top of the package so that any excess screw length sticks upwards.
It may be cheaper to buy machine screws (and nuts) of similar thickness at a nearby hardware store. My local screw dealer charges by weight, so I end up paying pennies (cents) for what I need in my hobby projects.
What matters most is that your screw fits in the mounting hole, which is about 3.5mm in diameter.