user70376: I'm trying to trigger eight different 5 V relays using an Arduino Atmega 2560. The relays (70Ω coil) are powered by an external 5 V source, and I'm trying to trigger them through a driving stage which contains for each relay an NPN transistor (2N3904) and a 1 kΩ resistor directly connected to digital pin of the Arduino.
The relays in my application are supposed to be driven 2 by 2, not all of them at once.
My problem is that I don't succeed in triggering the relay with digital pins of my Arduino; once I connect it to the resistor, the voltage of the digital pins drops from 5 V to 0.4 V or less. The transistor needs only 7 mA to be triggered, the output current of the Atmega2560 pins is 20 mA max.
I tried with an external 5 V source, it triggers correctly showing 10 mA maximum of current through the driving stage.


user14095: Your circuit will no longer work. The original transistor you used was a NPN, you have changed it to a PNP connected somehow as a low side driver.  It is important to show the emitter, as it tells us what type of transistor it is, leaving it out as you have done causes many of us to assume you have done it correctly ie the emitter is connected to the ground.  Here is a Copy of a circuit from electronics-tutorials that uses a simple MOSFET: https://www.electronics-tutorials.ws/blog/relay-switch-circuit.html Note the 10K resistor from the port pin to ground, that guarantees it will be off during reset and setup.


70376: <p>I'm trying to trigger eight different 5 V relays using an Arduino Atmega 2560. The relays (70Ω coil) are powered by an external 5 V source, and I'm trying to trigger them through a driving stage which contains for each relay an NPN transistor (2N3904) and a 1 kΩ resistor directly connected to digital pin of the Arduino.</p>
<p>The relays in my application are supposed to be driven 2 by 2, not all of them at once.</p>
<p>My problem is that I don't succeed in triggering the relay with digital pins of my Arduino; once I connect it to the resistor, the voltage of the digital pins drops from 5 V to 0.4 V or less. The transistor needs only 7 mA to be triggered, the output current of the Atmega2560 pins is 20 mA max.</p>
<p>I tried with an external 5 V source, it triggers correctly showing 10 mA maximum of current through the driving stage.</p>
<p><a href="https://i.stack.imgur.com/7QGsM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7QGsM.jpg" alt="enter image description here" /></a></p>
 14095: <p>Your circuit will no longer work. The original transistor you used was a NPN, you have changed it to a PNP connected somehow as a low side driver.  It is important to show the emitter, as it tells us what type of transistor it is, leaving it out as you have done causes many of us to assume you have done it correctly ie the emitter is connected to the ground.  Here is a Copy of a circuit from electronics-tutorials that uses a simple MOSFET: <a href="https://www.electronics-tutorials.ws/blog/relay-switch-circuit.html" rel="nofollow noreferrer">https://www.electronics-tutorials.ws/blog/relay-switch-circuit.html</a> Note the 10K resistor from the port pin to ground, that guarantees it will be off during reset and setup.</p>
<p><a href="https://i.stack.imgur.com/MjHRW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MjHRW.png" alt="enter image description here" /></a></p>
