NOT gate logic IC output

Discussion in 'General Electronics Chat' started by Dritech, Apr 11, 2014.

  1. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    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?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,361
    Read the datasheet.

    VOH = 3.4V typical

    IOH = -0.4mA

    TTL gates do not source a lot of current.
     
    Dritech likes this.
  3. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    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?
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,737
    4,789
    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.
     
    Dritech likes this.
  5. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,534
    1,251
    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
     
    Dritech likes this.
  7. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,361
    Use a logic MOSFET.
     
  8. crutschow

    Expert

    Mar 14, 2008
    13,003
    3,232
    That should be a logic-level type P-MOSFET.
     
  9. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    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?
     
  10. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    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: Apr 19, 2014
  11. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,534
    1,251
    See post #6.

    ak
     
    Dritech likes this.
  12. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,794
    1,103
    As per AK's post #6, using a 500 Ohm pot instead of 1k.
     
  13. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Use a logic level reed relay in the wiper circuit.
     
  14. Dritech

    Thread Starter Well-Known Member

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

    Distinguished Member

    Aug 1, 2013
    4,534
    1,251
    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
     
  16. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    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?
     
  17. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,534
    1,251
    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
     
    Dritech likes this.
Loading...