![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I'm trying to use bipolar transistors as the output stage of a circuit controlled by an NXP LPC9221 µC. The illustration shows two of the configurations I've tried, and one about which I have questions. "On" and "Off" mean current flows or does not flow through the load resistor, in response to a given output from the controller. The "switch" represents the µC pin, connecting to either +3.3v or ground. ![]() Fig 1: shows a low-side NPN based switch. This works fine, but I want to move the transistor to the high-side of the load. Fig 2: shows my attempt to use a PNP, on the high side, to switch current to a load. In this instance, the transistor never turns off, even when I set the output high. I suspect that's because of the difference in voltage between the load and controller circuits. Fig 3: shows what I believe will do what I want, switch 12v, from the high side of the load, using a 3.3v signal. I'd like to know, is there a better solution to this problem, one that uses only one transistor? | |
| |
| | (permalink) |
| No there's not, and NONE of your solutions work either! Check my PIC tutorials under Hardware Extras for how to do it. | |
| |
| | (permalink) |
| In figure 2, the base resistor of the transistor is never connected to its emitter voltage to turn it off. In figure 3, when the NPN transistor turns on, the PNP transistor also turns on then both transistors burn out because there is no resistor in series with the base of the PNP transistor to limit the base current.
__________________ Uncle $crooge | |
| |
| | (permalink) |
| Strictly for my own educational purposes, what's the difference in what he shows and your tutorial. (See attached)
__________________ All those who believe in psycho kinesis, raise my hand. | |
| |
| | (permalink) | |
| Quote:
The fig #1 looks OK to me. With fig #2, the pnp, its the base drive voltage thats the problem. For an emitter voltage of +12V, the base is always at -12V via the base resistor to 0V or [12 -3.3] = -8.7V. So it never turns OFF.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 20th August 2008 at 07:08 PM. | ||
| |
| | (permalink) |
| I see what you mean, audioguru. Does this look any better? ![]() Last edited by Atomsk102; 20th August 2008 at 07:18 PM. | |
| |
| | (permalink) |
| It looks good now.
__________________ "Remember, you're special.....just like everyone else." | |
| |
| | (permalink) |
| In Fig. #2, can you set the LPC9221 I/O pins to a high Z state?
__________________ "Remember, you're special.....just like everyone else." | |
| |
| | (permalink) | |
| Quote:
Use the PNP of fig. 2 with a 1K base resistor. Run a 100Ω resistor from the base resistor free terminal to +12v. From this same base resistor terminal hook up the cathode of a 9.1v Zener diode, then the Zener anode connects through a 100Ω resistor to the switch wiper. With zero base current, there is then 10 mA flowing through this base drive circuit. When the switch is at +3.3v the Zener is just turning off and the transistor is shut off by resistor going to +12v. When the switch is at gnd, current flows through the Zener and so it is on and it turns the transistor on. The Zener cathode will be at ~+10v with respect to gnd. If the input "switch" can't sink 10 mA, change the two resistors to 1k but then your RL has to have a higher value and your base resistor can probably go to zero Ω. Last edited by Willbe; 20th August 2008 at 08:03 PM. | ||
| |
| | (permalink) |
| There is a way to do this using one pnp transistor. The circuit is shown below. Note that to turn the pnp off, you must put the output pin into a high impedance state, or change to an input. This is what most of us do when confronted with these types of limitations. HTH.
__________________ "Everything that is done in the world is done by hope." -Martin Luther "There are two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle."-Albert Einstein Last edited by Analog; 20th August 2008 at 09:41 PM. | |
| |
| | (permalink) |
| Apparently not high enough Z. The device has three output modes, Bi Directional, Push/Pull, and Open Drain. I tried Push/Pull and Open Drain, but neither one could make the circuit in Fig 2 shut off. I'm re-working my hardware to test the modified Fig 3 circuit now. | |
| |
| | (permalink) | |
| Quote:
I'd start from zero. What voltage & current can your input signal source or sink and what voltage & current does your load need? I can't imagine needing the power gain of two transistors to accomplish this [level shift of (12/2 - 3.3/2) = 4.5v and gain of 12/3.3= 3.6] interface function. Also, CMOS gates can be used as linear inverting/non-inverting amplifiers, so if you have some spare gates and a Zener, you can use them. | ||
| |
| | (permalink) |
| Thanks Willbe: I had a feeleing that a Zener could do the job, but I didn't know how to set up the circuit. Analog: That may work too. I might not have had the pull up installed correctly, when I tried it. | |
| |
| | (permalink) |
| In figure two, didn't the OP just make a mistake in his schematic, leaving the switch, which represents his uC output, high. In the verbage, he has the output being low, which would work, wouldn't it?
__________________ All those who believe in psycho kinesis, raise my hand. | |
| |
| | (permalink) | |
| Quote:
I don't have the exact numbers on the current requirements of each load yet, but they all require 12V in. For testing, I just used LEDs and 2N3906s. I figured, if I needed more current, I could go to something like a TIP125, later on. | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Singing Card | neo2478 | Electronic Projects Design/Ideas/Reviews | 7 | 21st June 2007 10:24 PM |
| home network blues | OutToLunch | Chit-Chat | 5 | 4th April 2007 09:51 PM |
| Student with the pic blues, all code, no action | rostifa | Micro Controllers | 10 | 22nd March 2006 09:31 AM |
| 16F877 programming blues. | dwarshout | Micro Controllers | 9 | 27th October 2005 04:21 PM |