Connect with us

npn question

Discussion in 'General Electronics Discussion' started by Aharon, Jan 31, 2022.

Scroll to continue with content
  1. Aharon

    Aharon

    6
    0
    Jan 31, 2022
    Hi,

    I am using CPU with 1.8V GPIO voltage.
    and i want to toggle the input when using NPN.
    if VIN=1 GPIO=1.8V
    if VIN=0 GPIO="0"
    the GPIO on the emitter in NPN channel is correct ? please advise Screenshot 2022-01-31 135158.png
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    12,508
    3,000
    Nov 17, 2011
    FIrst off: you should use the same names in your verbal description as in the schematic.
    One can assume that Vin = Power_in, but is that so?
    Second: Assuming Vin = Power_In, what does Vin = 1 signify? 3.3 V, 5 V, 12 V or what? (to list only a few common voltages).
    Third: What is the component labeled DNP in your diagram?

    The circuit may work or not, depending on what DNP is supposed to be.
    A more practical and simple solution would be a voltage divider from Power_in to GND that divides the input voltage down to 1.8 V.
     
  3. Martaine2005

    Martaine2005

    4,203
    1,146
    May 12, 2015
    DNP for me is = Do not populate.
    Whether for header pins or a module etc to be placed later.

    Martin
     
  4. Nanren888

    Nanren888

    621
    193
    Nov 8, 2015
    GPIO pins, as gates, usually have a specified high and low voltage threshold, sometimes expressed as a proportion of the supply.
    Example; for I2C pins 0.3 & 0.7 of the supply. That is anything less than 0.3 of the suipply will be seen as a low, 0. anything greater than 0.7 of the supply will be seen as a one.
    These thresholds are distinct from the power supply voltage.
    It's common to power circuits from the power supply to allow the levels for 0 & 1 to be ensured to be beyond the threshold voltages.
    If your GPIO pin has a "1". high threshold of 1.8 volts, it would be normal to run the circuit that is supposed to pull it up form the supply above 1.8 volts, often the same supply as the GPIO internat circuit; the IO supply.
    .
    If your chip GPIO is powered from a supply of 1.8 volts, then specify the high and low threshold voltages, so you know what voltages you must achieve with the npn driver.
     
  5. Harald Kapp

    Harald Kapp Moderator Moderator

    12,508
    3,000
    Nov 17, 2011
    If that should be the meaning here, the circuit will not work as expected. No path to achieve a Low signal at the GPIO pin.
     
  6. Martaine2005

    Martaine2005

    4,203
    1,146
    May 12, 2015
    Agreed.
    I don’t think the OP’s use of DNP means that either.

    Martin
     
  7. Aharon

    Aharon

    6
    0
    Jan 31, 2022
    thank you for your comments,

    sorry but, DNP= do not place on the PCB assembly line.
    POWER_IN is the input voltage after volte divider, (0.7V to 3.3V).
    if POWER_IN=1 PWR_IN_IO=1.8V
    if POWER_IN=0 PWR_IN_IO="0"
    to be on the safe side i want to use the following:

    Screenshot 2022-02-01 084739.png
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    12,508
    3,000
    Nov 17, 2011
    Then the circuit from post #1 will definitely not work as there is no path to GND.

    And now you present a different circuit, but this one will also not work:
    The BSS138W has a VGSth of max. 1.5 V.
    R305 and R194 divide the 1.8 V from POWER_1V8 down to VGS = 0.6 V.
    Q72 will never be "on" as VGS << VGSth

    Still makes no sense. I guess you mean
    if POWER_IN=3.3 V PWR_IN_IO=1.8V
    if POWER_IN=0 V PWR_IN_IO= 0 V

    As mentioned before: use a simple voltage divider to scale the 3.3 V down to 1.8 V. Using e.g. 8.45 kΩ in the top leg and 10 kΩ in the bottom leg will be perfect. Plus the 8.45 kΩ acting as a series resistance to the GPIO pin will limit any current that might go into the GPIO pin in case of overvoltage on POWER_IN. The protection diodes at the GPIO will clamp the voltage to save levels. This is usually allowed as long as the input current limit is not exceeded. Look up the datasheet.
     
  9. Harald Kapp

    Harald Kapp Moderator Moderator

    12,508
    3,000
    Nov 17, 2011
    If you insist on using a transistor to separate POWER_IN from PWR_IN_GPIO, use this circuit:
    upload_2022-2-1_11-1-32.png


    You will now have:
    if POWER_IN=3.3 V PWR_IN_IO=0 V
    if POWER_IN=0 V PWR_IN_IO= 1.8 V

    It is easy to invert this signal in the software that checks the level of this IO-pin such that you have the same logic as before.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-