Hi! i'm having a little problem. Then i touch negative wire led's turn on, I don't know why...
Pin 2 in arduino always turned on. Then i don't touch negative wire, led don't turn on... Image:
Where are you getting such bad ideas about how transistors really work.
Your drawing is wrong, For one, you are missing a base current limit resistor. Are you sure you have a PNP transistor? Because that is what you have drawn... and that would be the wrong part here.
The original bad circuit is holding the PNP base-emitter junction at the point
of reverse breakdown, so a small extra voltage is perhaps all that's needed to
modulate the current substantially. Or it could be that the circuit is undergoing
parasitic oscillation which is damped down by touching the ground wire.
Anyway it doesn't matter, its completely wrong in the first place! You may have
damaged both pin 2 and the PNP transistor, note, double check they still work
(reverse biasing the base-emitter junctions usually fries a transistor, and the breakdown
voltage is often about 5V)
Now i have problem, pin from 2 to 12 led didn't turn on, but then i connect led to pin 13 its perfectly work. Please help. IMAGE:
LEDs require current limiting resistors when used this way. Pin 13 has one built-in, none of the other pins do. You may have burned out either the LED or the pins on the Arduino.
Arduino nano. from 2-12 pins i get 1.52 volts, from 13 3.40 volts, from 5v only 3.5 volts.
from 2-12 pins i get 1.52 volts,
Have you set the pins to be outputs using a pinMode call?
from 5v only 3.5 volts.
You sure your meter is correct?
Grumpy_Mike:
from 2-12 pins i get 1.52 volts,
Have you set the pins to be outputs using a pinMode call?
OH YES, i forget to write pinMode(ledPin, OUTPUT); Thanks dude, very helped. :))
from 5v only 3.5 volts.
You sure your meter is correct?
Then all led's off i get 3.60 volts.