Description
Tutorial: How to Use the Bipolar Transistor 2N3904
The NPN bipolar transistor 2N3904 is a fundamental component for electronic projects, ideal for amplification and switch control. It is particularly useful for beginners who want to learn the basics of transistor logic.
What you need
- amplification projects
- relay control
- current flow regulation
- basic circuit for Arduino projects
Steps
- Check the polarity of the component: the actual pin ‘E’ (emitter) must be connected to the negative terminal of the power supply.
- Connect the pin ‘B’ (base) to the Arduino digital pin for control.
- Connect a load, such as a light bulb or relay, between the pin ‘C’ (collector) and the positive power supply.
- Use the digitalWrite() function of Arduino to control the state of the transistor (HIGH = active, LOW = inactive).
- Check the datasheet for the maximum base current value to avoid damaging the component.
- If necessary, add pull-up or pull-down resistors to the base to improve circuit stability.
- Test the functionality with a multimeter in continuity mode to verify if there is a connection between the ‘E’ and ‘C’ pins.
- Modify the Arduino sketch by adding commands to test different input conditions.
Example code
void setup() {
pinMode(2, OUTPUT);
}
void loop() {
digitalWrite(2, HIGH); // Attiva il transistor
delay(1000);
digitalWrite(2, LOW); // Disattiva il transistor
delay(1000);
}
Mini project
Create a simple LED control circuit with Arduino and the 2N3904 transistor. Connect the Arduino to a light bulb via the transistor to control its illumination.
Common mistakes
- Do not check the polarity of the pins
- Ignore the maximum current specifications in the datasheet
- Omit necessary base resistors
- Use a PNP transistor instead of an NPN
Recommended accessories
- Base resistor (1kΩ)
- Multimeter
- Arduino Uno
- 5V relay
Frequently asked questions
The transistor overheats during use.
Check if there are sufficient pull-up/pull-down resistors and that the maximum current specified in the datasheet has not been exceeded.
I can’t get the circuit to work with an LED.
Check the transistor connections, verify the power supply, and add a current-limiting resistor to the LED chain.
What are the main applications?
Audio amplification, relay control, current regulation for external devices.







Reviews
There are no reviews yet.