Skip to main content
8 votes
Accepted

What's the function of this transistor on Arduino Mega?

It's a P-channel MOSFET. It's job is to act as a "dropless" diode. The principle is this: MOSFETs have a built-in diode across them in reverse bias (an effect of the chemistry) The P-channel MOSFET ...
Majenko's user avatar
  • 106k
8 votes
Accepted

LED not blinking when using a transistor

Without a common reference (ground) between the Arduino power supply and the external power-supply, again, you have a floating base, as you can't know what the Arduino's 5v output (or local ground) ...
JRobert's user avatar
  • 15.3k
7 votes
Accepted

Switching a Solenoid Using Arduino's 5V Output?

Low-side switching an inductive load (such as a relay) using a microcontroller (such as Arduino), NPN BJT transistor (with full base resistor calculations), and snubber/flyback diode Note: this answer ...
Gabriel Staples's user avatar
7 votes
Accepted

Controlling a 5V fan and ultrasonic fogger with an arduino - do I need an external power supply?

About the ultrasonic fogger: The product description is misleading. This is a pure transducer. That means it does not generate its own ultrasonic frequency and is thus not DC. You need to provide an ...
chrisl's user avatar
  • 16.5k
6 votes

Newbie Arduino DC motor problem

I see a couple of issues here, which are related to your questions. I will use numbers here, but these do not necessarily correspond to the numbers you have used when asking. The first thing you need ...
nbloqs's user avatar
  • 161
5 votes

Transistor amplifier to drive speaker using Arduino PWM

Your amplifier arrangement is fundamentally flawed. At the moment you are "tickling" the top end of the electromagnet in the speaker - that is, you are energising it when the Arduino outputs a HIGH, ...
Majenko's user avatar
  • 106k
5 votes
Accepted

How can I connect nearly 450 LEDs to an arduino without drawing too much current?

First you should consider changing your whole idea so that your LEDs don't draw nearly 10A. I am assuming that for each segment you have 14-20 LEDs wired in parallel, each with its own current ...
Majenko's user avatar
  • 106k
5 votes
Accepted

How come my transistor doesn't work?

Is there the only wire from Arduino to the Base of Transistor? Basically you need something like this: If you reverse the transistor (E and C), builtin protection diode will be in forward direction, ...
KIIV's user avatar
  • 4,777
5 votes
Accepted

How to detect if LED is switched on in external circuit using Arduino NANO?

I'm afraid your circuit does not work. In fact, the base of the transistor is always connected to the power, regardless the LED being ON or OFF. Therefore the BJT would be always in the ON-state. Also ...
next-hack's user avatar
  • 411
5 votes
Accepted

Vary voltage using relay. Is this possible?

No, you can't vary the voltage with a relay. The only way you could do it with a relay would be to have a selection of different voltages available, and then use multiple relays to select which ...
Majenko's user avatar
  • 106k
5 votes
Accepted

Switching fan on with transistor, fan running very slowly

With a 2.2K resistor you're massively limiting the current that can flow through the transistor. I haven't looked up the specs on that transistor, but taking typical values for Vbe (0.6V) and Hfe (100)...
Majenko's user avatar
  • 106k
4 votes
Accepted

Why is my circuit working only when I touch it?

Sounds like you have guessed it: although it's very hard to say from those photos, it doesn't look like you have the circuit grounded. Connect a ground from the Arduino to the black wire from the ...
Mark Smith's user avatar
  • 2,181
4 votes

Do I need a transistor if my relay has an optocoupler?

That isn't just a relay you are linking to. That's an entire board that, among others, contains a relay (blue box). This board already has a transistor to drive the coil inside the relay. It also has ...
Gerben's user avatar
  • 11.3k
4 votes
Accepted

How to eliminate noise from PWM controlled 12V fan at low speed

I had the same problem with a 5V fan. Something simple worked for me: To decrease the PWM frequency. You probably want to do this using pin 9 or 10 (for the Uno) as changing the frequencies of other ...
SAS's user avatar
  • 56
4 votes

Using a transistor to get 100mA on a IR led

Increasing the power to the LED isn't the best way of increasing the distance. In fact it's the worst way. The 100mA is only for a small duty cycle. You can power it with 100mA but only for a ...
Majenko's user avatar
  • 106k
4 votes
Accepted

Using a transistor to get 100mA on a IR led

Here is a diagram from Peter Bennett's answer to an Electronics Stackexchange question, How much voltage to give my IR LED?: As you can see, the current-limiting resistor is in series with the IR ...
James Waldby - jwpat7's user avatar
4 votes
Accepted

Solenoid "vibrates" instead of pushing

From your schematics it looks like: you connected the power supply backwards (on both schematics actually, I wonder how come you did not fry your Arduino) the external supply and the Arduino do not ...
Edgar Bonet's user avatar
  • 44.3k
4 votes
Accepted

Why is it I need transistors and resistors to turn a DC motor with an Arduino but I can connect it directly to a battery?

If you want the motor to rotate continuously, without using PWM, and without switching the motor on and off from the Arduino, you can connect the motor straight to 5 V and ground. If you then add a ...
ocrdu's user avatar
  • 1,795
3 votes

Control a 5 volt water pump with an Arduino

To use an NPN, connect a power rail of 5V to the pump's positive terminal, and from its negative terminal wire it to the transistor's collector pin. Wire emitter to GND, and place a >=220 ohms ...
user2497's user avatar
  • 311
3 votes
Accepted

How can I switch a 1.5V buzzer with my Arduino?

You simply need to ground the circuit. In row E on your breadboard just under where you connect the - of the battery, connect that to the ground pin on the UNO. This causes the buzzer to start working....
redstarcoder's user avatar
3 votes

12 V relay using Arduino

If it's working with 12v on the input but not 5v, it sounds like the base resistor value (which is missing from the diagram) might be too high. A value of around 1k should ensure the transistor is ...
Daniel 's user avatar
3 votes

Why does the transistor burn out

TinkerCAD may have mislead you on the pinout for the transistor TinkerCAD PN2222A
markshancock's user avatar
3 votes

Why does the transistor burn out

By this, does it mean that you still have a problem turning the pump on? Because a PN2222A should handle up to 1A through its collector, as the datasheet states http://www.mouser.com/ds/2/149/PN2222A-...
jDAQ's user avatar
  • 193
3 votes

connecting a small motor to arduino using a transistor

I like your thought process (even though it might not be completely correct), I've seen how little thought were put in for such simple circuit design in the Arduino community, including from some ...
hcheung's user avatar
  • 1,549
3 votes

Why are transistors necessary before LEDs?

The port pins of your Nano can deliver current in a quite limited range, and six LEDs need a lot more to shine brightly. The transistors are amplifying the available current. However, 4k7 resistors in ...
the busybee's user avatar
  • 2,200
2 votes

How to ground a arduino with an external power-source?

I would be careful about "ground loops" when using two supplies connected to the mains electricity. You may get strange results. If you are using a lap top then maybe disconnect it from the charger ...
BillyBag2's user avatar
  • 217
2 votes

How to ground a arduino with an external power-source?

Majenko explained how to figure out what is what. I'm just repeating the shematics again with "additional" description: Current limiting resistor R1 is REQUIRED, if you don't want to destroy Arduino ...
KIIV's user avatar
  • 4,777
2 votes
Accepted

How to ground a arduino with an external power-source?

Ground is usually (though not always, but in your case it is) the point of lowest potential in a circuit. In your circuit that is the "negative" connection of the power supply. Note that the "negative"...
Majenko's user avatar
  • 106k
2 votes

How come my transistor doesn't work?

The program is fine. Looking at the first photograph - The Ground of the Arduino needs to be connected to the ground of your circuit. I do not understand the two-transistor part of your circuit, so ...
Kingsley's user avatar
  • 773

Only top scored, non community-wiki answers of a minimum length are eligible