Basically when 5v flow through the 1k resistor to the base of transistor a current of about 0005 amps 500 microamps flows and turns on the transistor.
Arduino transistor instead of relay.
If you need to switch something faster than once every second a relay would probably have a relatively short life and it would be worthwhile to go with the transistor option.
Von daher sollte das netzteil die leds direkt versorgen und nicht den weg über arduino machen.
As always it s a design trade off.
2 the transistor provides protection.
Here we are taking high input by push button switch.
Motor control by relay on arduino.
This is the relay we are going to use.
Switching with npn transistor.
Make the following circuit.
The electromagnet then pulls the switching.
Arduino benutzt du dann nur um die transistoren zu schalten.
A current of about 07 amps starts flowing through the junction turning on the electromagnet.
When you give high signal on input it connects the led to gnd.
A transistor in between will allow a 5v signal from the arduino to switch a 12v signal via the transistor to the relay thus turning it on.
Working and concept of relay.
Andys idee mit den relais ist gut aber man kann sie nur an oder ausschalten jedoch nicht per pwm dimmen.
To use relay with micro controller we need transistor also for switching.
In the event of a back emf voltage spike or some other undesired event only your transistor will be blown instead of the entire arduino.
This relay has got two poles means there are two switches but both are trigged by a single coil thus they operate simultaneously.
Nicht vergessen den gnd vom arduino und dem netzteil trotzdem zu verbinden.
1 2 switching by npn transistor.