I am a new person with tinkering electronics as I am from Computer Engineering.
I am working on a project with an Arduino that contains of a relay. I researched from the internet and found out that a suitable relay configuration uses a transistor, a flywheel diode and a relay.
I used a 2N2222 transistor a 1N4007 diode and a 12V relay (SRD-12VDC-SL-C).
I used the following schematic:
Here is my Fritzing wiring diagram:
When I connected the circuit according to my Fritzing wiring diagram. the labelled NPN transistor blew up in smoke. When I readjusted some wires next the transistor on the relay blew up in smoke.
Please help me eith the circuit diagram as I am not able to understand it properly. I suppose the Fritzing wiring diagram is wrong.
EDIT 1:
- Blue wire: data line from Arduino.
- Red wire: VCC.
- White wire: GND.