Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


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?

Reply
 
LinkBack Thread Tools Display Modes
Old 21st August 2008, 03:10 AM   (permalink)
Default

Why not just use a driver chip like a 74hc244 or even a ULN2004 (in conjuction with the transistors)? Wouldn't this be simplier? Or do you have real estate concerns? Or is it just because you want to design it this way?
__________________
"Remember, you're special.....just like everyone else."
rezer is offline  
Old 21st August 2008, 04:30 AM   (permalink)
Default

Quote:
Originally Posted by Analog View Post
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.
This will never work. It is because of the intrinsic diodes to Vss and Vdd on the IO pins of CMOS chips. Even when the pin is in Hi-Z or input mode, the pin voltage cannot rise above Vdd + 0.7V or 4.0V in this case nor can it go more than 0.7v below Vss.
The 2 transistor method (Fig 3), modified with the extra base resistor, will work. Just invert your software/logic level to the pin in the chip if needed.
I wouldn't touch the zener idea with a 10ft pole. Think what will happen if the 12V line rises or spikes to 16V or higher for some reason.
__________________
--- The days of the digital watch are numbered. ---

Last edited by kchriste; 21st August 2008 at 04:56 AM.
kchriste is offline  
Old 21st August 2008, 12:40 PM   (permalink)
Default

Quote:
Originally Posted by kchriste View Post
This will never work. It is because of the intrinsic diodes to Vss and Vdd on the IO pins of CMOS chips. Even when the pin is in Hi-Z or input mode, the pin voltage cannot rise above Vdd + 0.7V or 4.0V in this case nor can it go more than 0.7v below Vss.
If in Hi-Z, the I/O pin allows enough current to forward bias the E-B junction of the transistor, then I'd say you're right, but I doubt that it does.

As a precaution, I guess one could put a diode on the output of the I/O pin to prevent that from happening.
__________________
"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
Analog is offline  
Old 21st August 2008, 02:18 PM   (permalink)
Default

Quote:
Originally Posted by Analog View Post
As a precaution, I guess one could put a diode on the output of the I/O pin to prevent that from happening.
Please tell us how this diode should be fitted, pointing to the I/O pin or pointing to the PNP base?
__________________
L.Chung

Last edited by eblc1388; 21st August 2008 at 02:19 PM.
eblc1388 is offline  
Old 21st August 2008, 04:01 PM   (permalink)
Default

Quote:
Originally Posted by kchriste View Post
I wouldn't touch the zener idea with a 10ft pole. Think what will happen if the 12V line rises or spikes to 16V or higher for some reason.
That could prove problematic, since the circuit will eventually go into an automotive environment. I don't want to regulate the 12v input, just take it directly from the car's power circuit (fused, of course).

I agree with others, that the two transistor solution is a bit parts-intensive, but it seems like the only way.

I tried NPN transistor between the load and the positive supply. That didn't work because the base current had to pass through the load resistance, when the circuit is "on". That caused the transistor to turn on only partially, unless I had a very low load resistance.

It seems to me, I need both transistors for a truly robust circuit, the NPN for voltage gain, and the PNP for current gain.
Atomsk102 is offline  
Old 21st August 2008, 04:31 PM   (permalink)
Default

Quote:
Originally Posted by Atomsk102 View Post
since the circuit will eventually go into an automotive environment.
...Vehicle electrical systems, when the engine is running, have a "load dump transient" of several hundred negative volts.
...Bosch [among others] may have specs on the expected envelope for this "dirty" power.
...You'll need power conditioning at a system level for your circuitry; diodes, chokes, capacitors, maybe an IC regulator.
Willbe is online now  
Old 21st August 2008, 04:34 PM   (permalink)
Default

Quote:
Originally Posted by Analog View Post
If in Hi-Z, the I/O pin allows enough current to forward bias the E-B junction of the transistor, then I'd say you're right, but I doubt that it does.

As a precaution, I guess one could put a diode on the output of the I/O pin to prevent that from happening.
Allowing the transistor to turn on in high-Z state is not the issue. You don't want to exceed the max input voltage to the IC, which in this case would be 12V with a pull-up resistor.
__________________
"Remember, you're special.....just like everyone else."
rezer is offline  
Old 21st August 2008, 05:09 PM   (permalink)
Default

Quote:
Originally Posted by eblc1388 View Post
Please tell us how this diode should be fitted, pointing to the I/O pin or pointing to the PNP base?
My poorly worded comment, I meant a breakdown (zener) diode from the input pin to ground to clamp the input voltage. This may be a circular argument, because if we believe the premise of the purpose of this type of clamp, then it would mean the transistor would never turn off. I would like to experiment some with this just to see what happens.
__________________
"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
Analog is offline  
Old 21st August 2008, 05:09 PM   (permalink)
Default

Quote:
Originally Posted by rezer View Post
Allowing the transistor to turn on in high-Z state is not the issue. You don't want to exceed the max input voltage to the IC, which in this case would be 12V with a pull-up resistor.
Yes, I agree.
__________________
"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
Analog is offline  
Old 21st August 2008, 05:37 PM   (permalink)
Default

There are a couple of other two-transistor configurations that will work.
Attached Images
File Type: png level shift.PNG (8.9 KB, 22 views)
__________________
Ron

Roff is online now  
Old 21st August 2008, 08:59 PM   (permalink)
Default

Look at the High Side power switchers from ST which have been designed for the car environment.

Makes life so much easier for switching larger currents.

If its only a small current you need to switch then go with the above suggestions
picbits is offline  
Old 21st August 2008, 09:51 PM   (permalink)
Default

Quote:
Originally Posted by AllVol View Post
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?
No, if the output is low, he is correct in saying that it will never turn off. The base is never more positive than the collector. What if you flipped the transistor in figure 2 upside down so that the emitter is connected to ground. then the base-emitter drop is dependant on the uC, not the source.

Try that.
piper91765 is offline  
Old 21st August 2008, 09:56 PM   (permalink)
Default

oops, I think that'd make it inverting.

Just follow this example from wikipedia if you want the transistor on the high side of the load.

http://en.wikipedia.org/wiki/Common_collector

Why switch to pnp?

Last edited by piper91765; 21st August 2008 at 10:00 PM. Reason: I'm stupid
piper91765 is offline  
Old 21st August 2008, 10:17 PM   (permalink)
Default

Quote:
Originally Posted by piper91765 View Post
oops, I think that'd make it inverting.

Just follow this example from wikipedia if you want the transistor on the high side of the load.

http://en.wikipedia.org/wiki/Common_collector

Why switch to pnp?
But the NPN emitter will always be about 0.7V lower than the base. With a 3.3V supply on the UC, the emitter will never go above about 2.6V, regardless of the voltage on the collector.
__________________
Ron

Roff is online now  
Old 22nd August 2008, 02:35 AM   (permalink)
Default

Quote:
Originally Posted by Analog View Post
If in Hi-Z, the I/O pin allows enough current to forward bias the E-B junction of the transistor, then I'd say you're right, but I doubt that it does.
They are MosFet Push-Pull outputs not bipolar transistors. When in Hi-Z mode the P and N channels MosFets are turned off but still connected between the Output, Vdd and Ground. MosFets have an intrinsic diode between the Drain and Source terminals that will conduct if the pin is driven above Vdd or below Vss by more than 0.7V.
__________________
--- The days of the digital watch are numbered. ---
kchriste is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
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



All times are GMT. The time now is 04:55 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker