NOT gate questions

Hey, so I'm building a bunch of NOT gates the basic way for a fun address bus system. I understand the concept but now I'm trying to decide which parts to buy.

In this pic is a basic NOT gate. Since I'm using arduino, my input signals will be ~5v. Can I not just use a 2n2222 for the transistor and skip R1, or is it necessary to have a resistor there?

Also, what might you recommend using for R2?

Thanks very much!

You need R1, to limit current into the transistor base.
You’ll be applying 5V, but the base-emitter ‘on’ voltage will be about 0.7V. Just for testing, both resistors could be 10K. Base current will be about (5V-0.7V)/10,000 = 430uA.
Collector current will be a little under 500uA. It’s (5V - Vce(on))/10,000. So if Vce(on) is 0.1V, Ic will be (5V-0.1V)/10,000 = 490uA.

Hey, so I'm building a bunch of NOT gates the basic way for a fun address bus system. I understand the concept but now I'm trying to decide which parts to buy.

It's fine to do this a learning experiment, but there's rarely a need to invert the Arduino's outputs in hardware, since you can so it in software.

You might want a hardware inverter if you happen to need an inverted and a non-inverted signal from the same output.

And, you need a bunch of inverters (or even if you don't need a bunch) you might want to use a [u]hex inverter chip[/u].

OldSteve:
You need R1, to limit current into the transistor base.
You’ll be applying 5V, but the base-emitter ‘on’ voltage will be about 0.7V. Just for testing, both resistors could be 10K. Base current will be about (5V-0.7V)/10,000 = 430uA.
Collector current will be a little under 500uA. It’s (5V - Vce(on))/10,000. So if Vce(on) is 0.1V, Ic will be (5V-0.1V)/10,000 = 490uA.

So if I chain the output into another NOT gate, will I need another resistor before the base?

CantSayIHave:
So if I chain the output into another NOT gate, will I need another resistor before the base?

No, not in this configuration:-
Double inversion.JPG
The first transistor’s collector resistor limits current into the base of the second transistor.

Edit: This could be used as a non-inverting level-shifter. The input to the first transistor could be 5V, and the second transistor’s collector resistor could be connected to a 12V (or other) supply.
(The first transistor’s collector resistor could be connected to either supply. It makes no difference to the output if the resistors are chosen correctly.)

Thanks very much! That's everything I needed