Author Topic: Need a latching buffer, need help configuring  (Read 1853 times)

0 Members and 1 Guest are viewing this topic.

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Need a latching buffer, need help configuring
« on: December 29, 2018, 12:03:26 am »
5V micro. Another device that has an enable line internally pulled up. I need to selectively latch and hold this line low while my micro is off.

I currently have a trace going from my micro to a device and ground when needed, but I can't force the pin to be held low while the micro resets otherwise not running for some time. I can't just permanently hold the line low. Can't use a pull down, as it's internally pulled up, I'm trying to keep quiescent current low.

My thought was to find way to make a latching output I trigger from my micro. I don't really see a great way to do this considering I need HIGH, LOW, and while reset or unpowered my micro's pin will be an input.

Opamp? Transistor pair? Some buffer IC?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Need a latching buffer, need help configuring
« Reply #1 on: December 29, 2018, 12:25:56 am »
It sounds like an application for a set/reset latch which many flip-flops like the ubiquitous 74HC74 can operate as.  It has active low asynchronous set and reset inputs, the clock like can be used as an additional rising edge input to set either output state, and it includes complementary outputs.  Or you can use a pair of NAND or NOR gates configured as a set/reset latch.


 

Offline mvs

  • Frequent Contributor
  • **
  • Posts: 370
  • Country: de
Re: Need a latching buffer, need help configuring
« Reply #2 on: December 29, 2018, 01:09:15 pm »
Opamp? Transistor pair? Some buffer IC?
If inversion and switching speed are not a concern i would go for small MOSFET (2N7002 or BSS138) and weak pullup.
« Last Edit: December 29, 2018, 01:11:16 pm by mvs »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Need a latching buffer, need help configuring
« Reply #3 on: December 29, 2018, 02:52:34 pm »
Sorry I don't understand what you're looking for.

Do you want to hold the pin low for a short length of time after the MCU has been turned on? If so, a simple capacitor to 0V will do that.
 

Offline fsr

  • Regular Contributor
  • *
  • Posts: 169
  • Country: ar
Re: Need a latching buffer, need help configuring
« Reply #4 on: December 29, 2018, 03:40:22 pm »
It seems to me like you need a circuit that pulls the line low, unless the micro pulls it up. The response from mvs looks like a good, cheap way to do that.
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Re: Need a latching buffer, need help configuring
« Reply #5 on: December 31, 2018, 07:13:19 pm »
Yes. I had considered just a mosfet to keep the line low by default, then only the micro being there could raise it up by shutting the mosfet down. That works fine, although I was hoping for an elegant latching solution it really doesn't matter at all and this gets me done quickly.

Please see attached sim mockup. I'm not sure but I think it might be good practice to have a resistor between the switch (micro output) and the mosfet gate. But I'm not sure what value or what it does exactly because the gate can't see much more than 5V from the micro.

The 2N7002 or BSS138 would be fine, but I need something in a smaller package. Looking at SOT-323 or SOT-416 because its going to be TIGHT on space. Something like this or this

https://www.mouser.com/datasheet/2/348/ru1j002yn-e-1018335.pdf
https://www.mouser.com/datasheet/2/348/re1c002untcl-e-1018231.pdf

Comments about diagram or parts?

EDIT: Also an issue here is that when I want the device 'disabled' I'm throwing away 55uA via the 100k pulldown, 55uA for this application is fine, but say I wanted to do better.... I kinda wonder if 200k would work here because of how rarely it's going to switch and how long I can wait to ensure it's transitioned?
« Last Edit: December 31, 2018, 11:06:50 pm by jnz »
 

Offline fsr

  • Regular Contributor
  • *
  • Posts: 169
  • Country: ar
Re: Need a latching buffer, need help configuring
« Reply #6 on: January 01, 2019, 05:22:39 pm »
Yes, a resistor there to limit the current looks like a good idea.
As the pullup is 100k, it seems like switching speed is not an issue, so you could begin with a 10k resistor, and see how it works. If that's enough, then fine, if not use a lower value.
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Re: Need a latching buffer, need help configuring
« Reply #7 on: January 01, 2019, 08:42:46 pm »
Yes, a resistor there to limit the current looks like a good idea.
As the pullup is 100k, it seems like switching speed is not an issue, so you could begin with a 10k resistor, and see how it works. If that's enough, then fine, if not use a lower value.

So the switching speed isn't a factor. But the leakage from the 100k when the micro is grounding the gate is. At 100k that's 50uA... I'll just have to figure out if a 200k would work for a weak pullup. Separate question I'll make a post on.
 

Offline fsr

  • Regular Contributor
  • *
  • Posts: 169
  • Country: ar
Re: Need a latching buffer, need help configuring
« Reply #8 on: January 01, 2019, 10:23:31 pm »
uhm... you are pulling down the internal pullup resistor, which says to be 1k. That's 5 mA, which totally dwarf the 50 uA current. Are you sure it's 1k?
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Re: Need a latching buffer, need help configuring
« Reply #9 on: January 01, 2019, 10:48:56 pm »
uhm... you are pulling down the internal pullup resistor, which says to be 1k. That's 5 mA, which totally dwarf the 50 uA current. Are you sure it's 1k?

I just tossed something in on that 1k, I have no idea what it actually is.

But, more importantly, it's backwards. That 1k keeps it asleep. It's low power mode is for that not to be grounded. So normally, you do nothing to that line and it's in low power state. But, if I have a mosfet to "reverse" the logic so it's normally in run mode, then I'm pulling that 100k down just to get the device back to sleep.

Make sense?


EDIT: To clarify, pulling down on that device is the case I don't care about for low power. Leaving it alone is, so it doesn't matter even if it was 1k (which it probably isn't). But just to "leave it alone" I need to pull a 100K which is 50uA or so.
« Last Edit: January 02, 2019, 06:02:31 pm by jnz »
 

Offline fsr

  • Regular Contributor
  • *
  • Posts: 169
  • Country: ar
Re: Need a latching buffer, need help configuring
« Reply #10 on: January 02, 2019, 08:56:15 pm »
Well, if that's the case, then raise the resistor value, but keep connections short and low impedance, because at some point, noise could be an issue. Also it will turn slower with higher resistance values, so check to see if that becomes an issue.
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Re: Need a latching buffer, need help configuring
« Reply #11 on: January 02, 2019, 10:25:47 pm »
Tested it just now... Turns out it's 4V and approx 250k. So not 'just' an internal pullup, but effectively.
 
The following users thanked this post: cpposteve


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf