what resister values to use with a transister NOT gate?

First, you shouldn't need a logic inverter on the Arduino output (or input). You can invert the state in software... :wink:

And, when you need an inverter, it's more common to use an inverter chip (or other gate wired as an inverter) than to use a transistor. The [u]7404[/u] (and 74LS04, etc.) is the "original" inverter chip.

OK....
250 Ohms is OK for the base resistor (1k would probably work too). The resistors depends on how much current you need out of the circuit.

...one website said most gates can only handle 20mA of current,

That's probably a good rule-of-thumb for a logic chip. The Arduino is rated for 40mA maximum. If you look at the transistor's datasheet, I'm sure it can handle more. (And, you should check the datasheet before you use a logic chip.)

The way a transistor works as a "switch" is that it has current gain, and you want to "saturate" the transistor so the calculated collector-emitter current is more than the current allowed by the collector-resistor. A typical transistor has a gain (hfe) of around 100.

  • Let's say we have a 50 Ohm "load" (or a 50 Ohm collector resistor). At 5V, that's 100mA.

  • If the transistor has a current gain of 100, you need 1mA into the transistor's base. That's 5k Ohms.

  • Since we want to be darn-sure to saturate the transistor, it's a good idea to cut the base resistance in half.

  • With a 2.5k base resistor, the we can be sure the transistor will remain saturated with loads of 50 Ohms or more (collector current of 100mA or less).