Author Topic: How to Prevent 1.8V Signal from Reaching GPIO Input When MPU is Powered Down?  (Read 773 times)

0 Members and 1 Guest are viewing this topic.

Offline davegravyTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: ca
I have a GPIO input on my MPU that may see a 1.8V logic high level while the MPU itself is powered down. This is causing unexpected behavior on the MPU, and I need a way to isolate or block the 1.8V from reaching the GPIO input unless the MPU is actively powered.

The MPU outputs a 1.8V IO reference on VCC_IO, so I considered using an nMOSFET as a switch. My idea was to connect VCC_IO to the gate of the nMOSFET, with the drain connected to the GPIO input and the source to the 1.8V signal. However, I’ve noticed a non-zero voltage on VCC_IO when the MPU is off and the GPIO input has 1.8V, so it seems this might still turn on the MOSFET.

Is there a recommended practice or circuit design approach to ensure the GPIO input only sees 1.8V when the MPU is powered up?

 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3959
  • Country: us
How about a pull-down resistor on that pin (4.7K to ?K)?  If that doesn't work an analog SPDT switch might be used.  I use the latter method to toggly a 1.5V supply
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Is there a recommended practice or circuit design approach to ensure the GPIO input only sees 1.8V when the MPU is powered up?

An LTspice simulation..
Readers discretion is advised..
 

Offline davegravyTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: ca
How about a pull-down resistor on that pin (4.7K to ?K)?  If that doesn't work an analog SPDT switch might be used.  I use the latter method to toggly a 1.5V supply

How about a pull-down resistor on that pin (4.7K to ?K)?  If that doesn't work an analog SPDT switch might be used.  I use the latter method to toggly a 1.5V supply

I should have mentioned it's designed to operate unattended so a manual switch isn't an option.

Pull down I don't think would work because the source of the 1.8V signal that I'm trying to read into the MPU is the IO reference output (low impedance) of another device.
 

Offline davegravyTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: ca
Is there a recommended practice or circuit design approach to ensure the GPIO input only sees 1.8V when the MPU is powered up?

An LTspice simulation..

I know what this is but I'm unclear what you're suggesting. Are you saying I should model the nMOSFET solution I mentioned in LTspice to see if my concern about it not working is valid? Or are you being cheeky and saying there would be no real 1.8V in that scenario because it's a simulation  :P

or?

I'm not confident in my ability to model the internals of the MPU correctly.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4825
  • Country: dk
I have a GPIO input on my MPU that may see a 1.8V logic high level while the MPU itself is powered down. This is causing unexpected behavior on the MPU, and I need a way to isolate or block the 1.8V from reaching the GPIO input unless the MPU is actively powered.

The MPU outputs a 1.8V IO reference on VCC_IO, so I considered using an nMOSFET as a switch. My idea was to connect VCC_IO to the gate of the nMOSFET, with the drain connected to the GPIO input and the source to the 1.8V signal. However, I’ve noticed a non-zero voltage on VCC_IO when the MPU is off and the GPIO input has 1.8V, so it seems this might still turn on the MOSFET.

Is there a recommended practice or circuit design approach to ensure the GPIO input only sees 1.8V when the MPU is powered up?


VCC_IO pull up on the GPIO and the mosfet the other way around (source to GPIO, drain to input signal)
 
The following users thanked this post: davegravy

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3959
  • Country: us
@davegravey

The analog switch would be held on by the MCU when it was awake and released when it was asleep.  I am using a TS5A3157  to toggle a 1.5V source.  It is not manual and the version I got is a small SMD package.
 
The following users thanked this post: davegravy

Online wraper

  • Supporter
  • ****
  • Posts: 17893
  • Country: lv
If high signal speed is not needed, you could just add a series resistor (with built-in pull-up disabled when MCU is running) to limit the current to low enough level where it no longer causes any problem. Current will flow through MCU input protection to VDD, and if VDD impedance is low enough, it won't significantly lift the voltage.
« Last Edit: October 27, 2024, 08:09:22 pm by wraper »
 
The following users thanked this post: inse, davegravy

Offline davegravyTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: ca
I have a GPIO input on my MPU that may see a 1.8V logic high level while the MPU itself is powered down. This is causing unexpected behavior on the MPU, and I need a way to isolate or block the 1.8V from reaching the GPIO input unless the MPU is actively powered.

The MPU outputs a 1.8V IO reference on VCC_IO, so I considered using an nMOSFET as a switch. My idea was to connect VCC_IO to the gate of the nMOSFET, with the drain connected to the GPIO input and the source to the 1.8V signal. However, I’ve noticed a non-zero voltage on VCC_IO when the MPU is off and the GPIO input has 1.8V, so it seems this might still turn on the MOSFET.

Is there a recommended practice or circuit design approach to ensure the GPIO input only sees 1.8V when the MPU is powered up?


VCC_IO pull up on the GPIO and the mosfet the other way around (source to GPIO, drain to input signal)

Thanks. I should clarify: the input signal I’m monitoring is the output of a voltage regulator on an IC. The goal is to detect whether the regulator is in an ON or OFF state, but I believe it doesn’t get driven to 0V when turned off—it just floats. I should probably test that though.

If it's floating and I use the MOSFET with a pull-up as recommended, wouldn’t this prevent detecting the OFF state?
« Last Edit: October 28, 2024, 11:19:16 am by davegravy »
 

Offline davegravyTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: ca
@davegravey

The analog switch would be held on by the MCU when it was awake and released when it was asleep.  I am using a TS5A3157  to toggle a 1.5V source.  It is not manual and the version I got is a small SMD package.

Thanks, I knew about solid state relays but not these class of devices.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 9219
  • Country: fi
If high signal speed is not needed, you could just add a series resistor (with built-in pull-up disabled when MCU is running) to limit the current to low enough level where it no longer causes any problem. Current will flow through MCU input protection to VDD, and if VDD impedance is low enough, it won't significantly lift the voltage.

Clarification to this: if VDD impedance at 0Hz (so DC resistance) is low enough. Also known as: having enough load on the supply rail. And even more specifically, "dumb" load which consumes even below certain minimum voltage threshold.

Often these requirements are not satisfied, so even a tiny leakage current from IO pin through protection diodes slowly charges the capacitance on the supply rail, and after reaching some UVLO/BOD/whatever threshold, an IC (such as the microcontroller) decides to turn on; increasing power consumption and quickly consuming stored charge and dying again. The cycle repeats, making a slow oscillator.

This might not be a problem, but something worth understanding might happen. Simplest solution, if this happens, is to add "stupid" load such as parallel resistor between VDD and GND. It will then form a voltage divider with the series resistor on the input. If input series resistor is large (say 10k), then some added 1k on the VDD bus is probably not too much extra consumption - unless the thing is battery powered.

Or you can make sure the microcontroller does nothing dumb e.g. by adding a short delay in the boot where you do something power-consuming like turn a status LED on. It will brown-out and reset there instead of starting to do something.
« Last Edit: October 28, 2024, 11:49:03 am by Siwastaja »
 
The following users thanked this post: davegravy

Offline davegravyTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: ca
If high signal speed is not needed, you could just add a series resistor (with built-in pull-up disabled when MCU is running) to limit the current to low enough level where it no longer causes any problem. Current will flow through MCU input protection to VDD, and if VDD impedance is low enough, it won't significantly lift the voltage.

Clarification to this: if VDD impedance at 0Hz (so DC resistance) is low enough. Also known as: having enough load on the supply rail. And even more specifically, "dumb" load which consumes even below certain minimum voltage threshold.

Often these requirements are not satisfied, so even a tiny leakage current from IO pin through protection diodes slowly charges the capacitance on the supply rail, and after reaching some UVLO/BOD/whatever threshold, an IC (such as the microcontroller) decides to turn on; increasing power consumption and quickly consuming stored charge and dying again. The cycle repeats, making a slow oscillator.

This might not be a problem, but something worth understanding might happen. Simplest solution, if this happens, is to add "stupid" load such as parallel resistor between VDD and GND. It will then form a voltage divider with the series resistor on the input. If input series resistor is large (say 10k), then some added 1k on the VDD bus is probably not too much extra consumption - unless the thing is battery powered.

Or you can make sure the microcontroller does nothing dumb e.g. by adding a short delay in the boot where you do something power-consuming like turn a status LED on. It will brown-out and reset there instead of starting to do something.

This is battery powered so I don't think the parallel resistance is an option. I'll keep an eye out for this slow oscillation, I don't think a brief boot should harm anything, except maybe SD-card corruption if it gets as far as initializing it.

I'm mainly worried about protecting the GPIO since I read warnings about protection diodes failing over time from pins having voltages on them when the MCU/MPU isn't powered. I think I already experienced this with my UART RTS/CTS.
« Last Edit: October 28, 2024, 12:44:23 pm by davegravy »
 

Online wraper

  • Supporter
  • ****
  • Posts: 17893
  • Country: lv
This is battery powered so I don't think the parallel resistance is an option. I'll keep an eye out for this slow oscillation, I don't think a brief boot should harm anything. I'm mainly worried about protecting the GPIO since I read warnings about protection diodes failing over time from pins having voltages on them when the MCU/MPU isn't powered. I think I already experienced this with my UART RTS/CTS.
The danger isn't voltage but current that exceeds safe level.
 
The following users thanked this post: davegravy

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 384
  • Country: pl
The MPU outputs a 1.8V IO reference on VCC_IO, so I considered using an nMOSFET as a switch. My idea was to connect VCC_IO to the gate of the nMOSFET, with the drain connected to the GPIO input and the source to the 1.8V signal. However, I’ve noticed a non-zero voltage on VCC_IO when the MPU is off and the GPIO input has 1.8V, so it seems this might still turn on the MOSFET.

You are trying to change this 1.8V signal into being OC but without reversing its logic. Is it important to not reverse it?
If not than just go with this 1.8V through one transistor with OC output and pull-up to MPU supply.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf