Maker Pro
Maker Pro

npn question

Aharon

Jan 31, 2022
9
Joined
Jan 31, 2022
Messages
9
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
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,699
Joined
Nov 17, 2011
Messages
13,699
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.
 

Martaine2005

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

Martin
 

Nanren888

Nov 8, 2015
622
Joined
Nov 8, 2015
Messages
622
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.
 

Aharon

Jan 31, 2022
9
Joined
Jan 31, 2022
Messages
9
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
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,699
Joined
Nov 17, 2011
Messages
13,699
sorry but, DNP= do not place on the PCB assembly line.
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

if POWER_IN=1 PWR_IN_IO=1.8V
if POWER_IN=0 PWR_IN_IO="0"
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.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,699
Joined
Nov 17, 2011
Messages
13,699
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.
 
Top