# Can i switch npn transistor using 12v

I want to switch on 5V when switch is connected to 12V. I have been using relay to do this, but I am wondering if I can use NPN transistor or something similar that is cheaper and smaller than a relay.

This is the logic i am going for:

Version 2:

• yes, you can. a MOSFET is probably better for switching (cooler, lower current, less waste), but a BJT will work given the currents are within spec. BJTs care about current. – dandavis Apr 3 '18 at 1:27
• All the NPN i checked on digikey all have Max Base, emitter Voltage of 5V. Do you have any recommendations? @dandavis – ABHISHEK Shah Apr 3 '18 at 1:36
• that's fine, it's a confusing spec you shouldn't worry about for the application you describe. note that the base resistor divides the current anyway (with another "resistor" sized to bring (1/hfe)*IC current down to .7v), so there won't be 12v on the base. I would use an IRFZ44N... – dandavis Apr 3 '18 at 1:54

Yes you can:

simulate this circuit – Schematic created using CircuitLab

Some considerations though:

• With NPN transistors, you can't switch on the high side unless the base is a higher voltage than the emitter. If you're using 12V, you shouldn't have a problem with this

• NPN (and PNP) transistors look like a diode from the base to the emitter. If you try to drive it without someway to limit the current, the transistor will be destroyed. In the circuit below, R1 limits the base current to about 1/10 of what can flow through through the load resistor, placing the transistor firmly into saturation. This means that the transistor is on about as much as it can be, so it will have only a small voltage drop (~0.3V) across it.

• So my load (R_L) requires 5V and 250mA. So Vout will go to ground? Current to base will be (12-0.3)/27K = 0.43mA? If gain is 100 times, it will get me a maximum of 430mA? I just need 250mA so sounds like it will work perfectly. Please confirm I am talking sense – ABHISHEK Shah Apr 3 '18 at 1:46
• Ah, you had a 1k resistor there so I calculated based on that. You want to keep the base current about 1/10 to 1/20 of the collector current. So that would make the base resistor $\frac{12}{.250*.1}=4.8k$ – C_Elegans Apr 3 '18 at 1:52
• Yeah my apologies. Was not sure how to show load. It took 1K resistor by default. My worry is that the datasheet for 2N2222A says that Base emitter voltage max is 5V, and we are applying 12V, am i not reading it correctly? – ABHISHEK Shah Apr 3 '18 at 1:55
• Oh and if you're doing a high side switch (5v -> npn -> load -> ground), you need to calculate the resistor with $R_B=\frac{Vcc-5-0.7}{I_B}$, as the base will need to be above 5V for the transistor to turn on. If you don't do this, the transistor may not enter saturation and behave like a small resistor in series with your load, wasting power and generating heat. – C_Elegans Apr 3 '18 at 1:55
• The supply is 12V, but the resistor will have a large voltage drop across it, so the base will only be about .7V or so above the emitter. It's like a diode, as long as you have something to limit the current, the diode will only have its forward voltage across it, no more (simplified example). – C_Elegans Apr 3 '18 at 1:57

Of course you can, just look for a 12V Enchancment transistor on e-bay. Mofset transistor: 1)Enchancment:More VBase more I between source and drain 2)Deployment:More VBase less current between source and drain https://www.ebay.it/itm/IRLR3802PBF-Transistor-N-MOSFET-unipolare-HEXFET-logic-level-12V-84A-88W-TO-252/322342748233?hash=item4b0d200049:g:cRgAAOSwCGVX7X7k
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4699423909187317, "perplexity": 1839.4440582701523}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-21/segments/1620243989012.26/warc/CC-MAIN-20210509183309-20210509213309-00483.warc.gz"}