Using delicate 5V IC to toggle 12V device with MOSFET, Diode, resistor

8 replies · 2K views · last reply
NotASmurf
Messages
150
Reaction score
2
Hey all, I have a 5v IC that is triggered by a sensor to unlock the 12v lock, I am using a NPN transistor as a switch with the 5v VCC as the gate, I need it to sink back to the GND of the IC without blowing it, is this safe? If not what changes would you suggest, it has been years since I've had to do this, and I'm used to using H-Bridges for such things, any help appreciated.

Circuit schematic: 12v lock in series with a diode across a 12v supply, the lower end switched to ground by an NPN transistor driven through a 1k ohm resistor from a 5V supply.
 
Attachments
  • Circuit schematic of a 12v lock driven by an NPN transistor switch, with a flyback diode across the lock, a 1k ohm base resistor, and separate 12v and 5v supplies labelled with + and - terminals.
    1635523522027.png
    3.9 KB · Views: 311
You don't show the emitter position in the NPN transistor, but I assume it points to ground since you are using it as a low-side switch.

What IC is driving this transistor base through the base resistor Rb? Is it a CMOS IC (so its output swing to the 0V, 5V rails), or does it have TTL outputs (so the low output is not really to the 0V rail)?
 
It is an arduino uno, and yes to the emitter position
 
NotASmurf said:
It is an arduino uno, and yes to the emitter position
What are Vol @ Iol and Voh @ Ioh for that Arduino?
 
technically 40ma on both, but in practice runs 80ma most of the time
 
My reason for asking about Vol is that if it doesn't reliably go down to 0V (which you typically get with CMOS outputs), then you may want to add a base pulldown resistor like this:

Transistor switching circuit: Vin feeds a 1kΩ series resistor to the base of an NPN BC109 transistor, with a 10kΩ resistor from base to 0v. The collector drives a relay coil on +Vcc with a flywheel diode across it, and the emitter returns to 0v.

https://www.electronics-tutorials.ws/wp-content/uploads/2014/04/switch1.gif?fit=273%2C245
 
  • Like
  • Informative
Likes   Reactions: DaveE, Tom.G and dlgoff
If the VOL of the Arduino is 0.5V or more, I suggest adding a diode in series with the 1k resistor of the circuit that @berkeman suggested; Anode towards the Arduino, Cathode towards the transistor.