GPIO Input Signal Help (Jetson Nano)

Hi all,

I’m having trouble reading a simple digital signal on pin GPIO12 / P41_15 (P41 header) / sysfs gpio194. According to the datasheets and various sources here and elsewhere, this pin’s default state is set as an input w/ an internal 100k pull-down resistor. This pin has a sink/source capacity of +/-20.0uA. The datasheet also recommends that any pulldowns/pullups on the pins should be > 50k (weak). Also, in between the Jetson CPU and the outside world, there is a 1.8V/3.3V TI level shifter.

I have a logic-level 0/3.3V signal is coming from a PIR sensor, active high. The sensor cannot output more than 100uA. Normally, I had chosen a simple 50k pulldown for this, but through troubleshooting, have tried many values higher and lower.

The Jetson does not read this simple high/low PIR signal. Depending on varying resistor values, the Jetson input will get “stuck” high @3.3V if using a weak pulldown > 50k. A low PIR signal won’t register. If using a very strong pull down (say 1k), the signal then comes down to about 1.5V when inactive… low = 1.5V and high = 3.3V. The Jetson of course does not read this as low.
If I manually touch +3.3V or GND as the input, everything is fine. It pulls up to 3.3V and pulls down to 0V.
I’ve tried a MOSFET switch circuit, and will be trying various other things: buffer, op amp, optoisolator, digital isolator…

Any ideas?

Hi, the level shift is TI, TXB0108RGYR, the key point is your device has enough strength on pin output to control pin input of level shift. Did you compare the characters in datasheet to that of PIR sensor?

Ok, thank you Trumany. Now we’re on to something. I figured the TI level translator was the root of all evil…

I need to confirm that my sensor output pin / circuit can drive AT LEAST 2 mA. Also, verbatim from datasheet (below):
“…the TXB0108 should not be used in applications such as I2C or 1-Wire where an open-drain driver is
connected on the bidirectional data I/O. For these applications, use a device from the TI TXS01xx series of level translators.”

So, if my sensor only outputs a max of 100uA (need to amplify for the TXB), and I can’t use a MOSFET switch… what is a recommended input signal buffer circuit? A BJT switch (Current gain)? A non-inverting buffer IC? An opto-isolator or digital-isolator IC?

According to the TI TXB* level translator datasheet:

8.3.1 Architecture (Page 13):
The typical output impedance during output transition is 70
Ω at VCCO = 1.2 V to 1.8 V, 50 Ω at VCCO = 1.8 V to 3.3 V and 40 Ω at VCCO = 3.3 V to 5 V.
{important to know}

8.3.2 Input Driver Requirements (Page 13):
Typical IIN vs VIN characteristics of the TXB0108 are shown in Figure 6. For proper operation, the device driving the data I/Os of the TXB0108 must have drive strength of at least ±2 mA.

8.3.5 Pullup or Pulldown Resistors on I/O Lines (Page 14:)
The TXB0108 is designed to drive capacitive loads of up to 70 pF. The output drivers of the TXB0108 have low
dc drive strength. If pullup or pulldown resistors are connected externally to the data I/Os, their values must be kept higher than 50 kΩ to ensure that they do not contend with the output drivers of the TXB0108. For the same reason, the TXB0108 should not be used in applications such as I2C or 1-Wire where an open-drain driver is connected on the bidirectional data I/O. For these applications, use a device from the TI TXS01xx series of level translators.

9.1 Application Information (Page 15):
The TXB0108 can be used in level-translation applications for interfacing devices or systems operating at
different interface voltages with one another. It can only translate push-pull CMOS logic outputs. If for open-drain signal translation, please refer to TI TXS010X products. Any external pulldown or pullup resistors are recommended to be larger than 50kΩ.

9.2.2 Detailed Design Procedure (Page 16):
*
*

  • Do not recommend having the external pullup or pulldown resistors. If mandatory, it is recommended
    the value should be larger than 50 kΩ.
    • An external pulldown or pullup resistor decreases the output VOH and VOL. Use the below equations to draft
    estimate the VOH and VOL as a result of an external pulldown and pullup resistor.
    VOH = VCCx × RPD / (RPD + 4.5 kΩ)
    VOL = VCCx × 4.5kΩ / (RPU + 4.5 kΩ)
    Where:
    • VCCx is the output port supply voltage on either VCCA or VCCB
    • RPD is the value of the external pull down resistor
    • RPU is the value of the external pull up resistor
    • 4.5 kΩ is the counting the variation of the serial resistor 4 kΩ in the I/O line. Refer to the Effects
    of external pullup and pulldown resistors on TXB application note

FIXED.

8.3.2 Input Driver Requirements (Page 13):
Typical IIN vs VIN characteristics of the TXB0108 are shown in Figure 6. For proper operation, the device driving the data I/Os of the TXB0108 must have drive strength of at least ±2 mA.

I decided to use a standard line driver / non-inverting buffer between the PIR sensor and the Jetson Nano (TXB level shifter, technically). Standard recommended connections: 51k pulldown on the PIR output into the line driver, and a 0.1uF ceramic decoupling cap on the buffer.

SN74HC125N