Skip to main content

Timeline for Driving 12v logic from an MCU

Current License: CC BY-SA 4.0

13 events
when toggle format what by license comment
Aug 23, 2022 at 14:19 comment added TimWescott Putting 3.3V on the left end of the resistor causes current to flow into the base. That turns the transistor on, which allows current to flow through the collector if there's a voltage to drive it. For the values given, there should be around \$260\mu\mathrm A\$ going through the base, around \$1.2 \mathrm{mA}\$ going into the collector, and about \$0.2\mathrm V\$ drop from collector to emitter.
Aug 23, 2022 at 13:44 comment added Travis Su And here I thought for a NPN transistor on the left when !Signal pulling high on 3.3V in then the output signal should be 12V out. But you wrote the opposite. Am I missing something?
Apr 15, 2019 at 22:58 comment added TimWescott @evildemonic 1: I like 'em. 2: It seems they're more available to total newbies. 3: So I don't have to explain "logic level", or find through-hole part numbers for logic-level FETs. Frankly, there should be a logic-level to 12V driver out there someplace, but I couldn't find one in a casual search.
Apr 15, 2019 at 22:48 comment added evildemonic @TimWescott Just out of curiosity, why did you choose BJT over MOSFET?
Apr 15, 2019 at 22:12 history edited TimWescott CC BY-SA 4.0
Add schematic for second case.
Apr 15, 2019 at 22:00 comment added t3ddftw They are two separate functions and would each be tied to their own pin. My apologies for not clarifying this sooner.
Apr 15, 2019 at 21:59 comment added TimWescott Do you want to do this from the same microprocessor pin (i.e., is it your mute control)? Or are you doing two different things on two different pins?
Apr 15, 2019 at 21:58 vote accept t3ddftw
Apr 15, 2019 at 21:57 comment added t3ddftw Excellent -- thanks! I would like to pull a 12v signal low using 0-3.3v logic I/O and I would also like to use the same 3.3v logic to drive a 12v signal high. My assumption here is that I could use a 2N3902 with 12v at the collector and my MCU at the base and when I drive my MCU high, the PNP should output 12v from the collector. Am I mistaken?
Apr 15, 2019 at 21:50 comment added TimWescott I've clarified my answer. I'm not sure what you're asking for -- do you want to translate a 0-12V signal back to a 0-3.3V logic input?
Apr 15, 2019 at 21:50 history edited TimWescott CC BY-SA 4.0
added 133 characters in body
Apr 15, 2019 at 21:40 comment added t3ddftw Thank you! This is indeed very simple, and it should get the job done since I don't need to supply any current. Am I correct in assuming that in order to drive a 12v signal (again, little to no current), I could use the emitter as my signal pin and drive it in the same manner?
Apr 15, 2019 at 21:27 history answered TimWescott CC BY-SA 4.0