Here's a sample :
The 2N2222 is a general purpose transistor and a lot of NPN transistor can be used.
The D1 diode is very important : it avoid current feedback on switching, don't forget it or you can damage the microcontroller !
The relay (K1) should be a 12V coil, but the switching load should be adapted to your need ! if you need to switch a 1A lamp, it is not the same as a 20A heater !
The 12v can be different depending on your need, it can vary from 5V to 24V, but i don't recommand to go over 24V with this schematic (and especially with the 2N2222 which as a Vce max of 30V)... at higher voltage a optocoupler is prefered ... but it depends on the switching speed you need !
Aucun commentaire:
Enregistrer un commentaire