NOT gate logic IC output

Thread Starter

Dritech

Joined Sep 21, 2011
901
Hi all,

I want to invert logic voltages using the NOT gate IC. At the 7404 output I placed a 1Kohms pot to vary the 5V output to different voltage levels. These will be used as reference set-points.
When I apply 0V to the input of the 7404, I am getting an output of 4.4 to 4.5V. Is this normal when the supply voltage applied to the IC 5V?
Also, when connecting the 1K pot to the output, the voltage the further dropping to approx. 4.3 to 4.2V. How can I prevent this from happening please?
 

Thread Starter

Dritech

Joined Sep 21, 2011
901
Thanks for the reply. Are there Logic ICs with 5V output? Also, how can I eliminate the drop in voltage when the 1Kohms pot is connected to the output?
 

WBahn

Joined Mar 31, 2012
30,045
CMOS chips typically come close to rail-to-rail -- if you don't pull much current from them.

With a 1k ohm load, you are asking it to drive 5mA. That exceeds the rated limits of some families and represents a pretty significant load for most others, which will cause a voltage drop.

You could use 5V CMOS with an opamp unity-gain follower to drive your pot. You could also use the logic output to turn on and turn off a voltage reference circuit.
 

AnalogKid

Joined Aug 1, 2013
11,036
Change to a PNP transistor. This will saturate at about 4.9V. Emitter to +5, collector to the 1K pot to GND, base to Rbase to input. If the input drive also is 5V logic, Rbase can be anything from 1K to 5K, or even 10K depending on the transistor.

ak
 

Thread Starter

Dritech

Joined Sep 21, 2011
901
Hi again,

Can I connect a MOSFET as shown in the attached photo?
The logic input is first inverted using a NOT gate IC. A transistor is then used to permit for higher current. When the logic input is low, the transistor switches and complete the ground path for the pot.
Will I get the 5V to 0V from the pot if I connect it this way? Also, do I need to connect a resistor to the gate of the MOSFET?
 

Attachments

Thread Starter

Dritech

Joined Sep 21, 2011
901
OK after looking at the circuit again I realized that it will not work. This is because when the transistor is off, the 5V will still flow through the pot and to the analog output.

Can someone help me to achieve the following:

So basically I have an i/o pin from a microcontroller which is used to turn on a motor when it goes to logic low. From the same pin I want to activate an analogue voltage which will be used as a set-point for the current sensor. Since the motor wil turn on when the mcrocontroller output is 0V, I have to use an inverter for turning on the reference set-point (which will be set using a pot). Note that the pot must not be more than 500ohms and the analogue voltage have to vary between 5V (or not less than 4.8v) to 0V.

Any help will be highly appreciated.
 
Last edited:

Thread Starter

Dritech

Joined Sep 21, 2011
901
Thanks for the replies. Can I connect the PNP transistor in a way to eliminate the NOT gate at the base of the transistor?
 

AnalogKid

Joined Aug 1, 2013
11,036
According to post #10, the uC output is low-true; that is, the motor is activated when it goes low, and you want your output voltage when it goes low. As such, it can drive the PNP base directly, through a resistor. When the uC pin goes low, the PNP collector and the source to the pot will go high.

ak
 

Thread Starter

Dritech

Joined Sep 21, 2011
901
Thanks AnalogKid.
I was doing same research on how to determine the Base resistor. One site states that the formula is RB = 0.2 × RL × hFE

Another site use of the following formula:

Rbase = (Supply voltage – voltage drop) / (Collector current / Hfe)


Lets assume that I use the 2N4403 transistor, 5V as the supply voltage, 250 hFE, Pot 500ohms. Plugging these values in both formulas give different results. Which formula should I use for a PNP transistor please?
 

AnalogKid

Joined Aug 1, 2013
11,036
The base current depends on what you want to do. You want a switch, not a linear amplifier, so you want to overdrive (safely) the base. For this a typical rule of thumb is to have 10 times more base current than you need for a particular collector current and hfe. Another is for the base current to be 10% of the collector current. This usually is a arger number. Some people call it "hard" saturation. Vcesat, the collector-emitter voltage when the switch is on, is about as low as it can get for a particular device. Your pot current is 10 mA and the transistor can easily handle 1 mA
of base current, so I'd go there.

Another reason to overdrive the base is that the typical hfe rarely is typical. 4401 and 4403 are my fav small signal parts, and I never go wrong if I assume their hfe is 100.

ak
 
Top