Author Topic: Need to create a 3.3V pull-up from 5V - zener or LDO?  (Read 2256 times)

0 Members and 1 Guest are viewing this topic.

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1561
  • Country: gb
Need to create a 3.3V pull-up from 5V - zener or LDO?
« on: December 14, 2023, 08:17:48 pm »
I face a need to create a 3.3V pull-up voltage from a 5V supply, but I'm not sure which is the best method to use. The reason I need specifically 3.3V for a pull-up is because I'm "tapping in" to a momentary push-button on another device so I can detect when it has been pressed. The other device runs on 3.3V. But, the other device is not always powered (it is switched under my control), so I need to provide my own pull-up voltage for the button during that time. The only load on the 3.3V will be when the momentary button is pressed, so at most perhaps 10 mA.

Should I use a zener to regulate 3.3V, or a linear regulator?

If I use something like a BZX84 or BZT52, I see that I'll need to provide approx. 5 mA current through it to properly regulate to 3.3V, so I figure a 330 ohm current-limiting resistor should work. One thing I've noted about a zener though is that it will fall out of regulation while the button is pressed, because current will be being diverted through the button and its pull-up resistor (say, 1K) to ground. But then does that even matter? As far as I can see, when the zener current drops, the regulated voltage drops; but all I'm concerned about (and the whole reason for this) is that when the button is off the pull-up voltage doesn't exceed 3.3V, which I don't think it can.

The downside I can see to the linear regulator is it needs more supporting passives - i.e. a couple of caps on the input and output - versus the single current-limiting resistor for a zener diode.

Any advice on which I should use?
 

Online Alex Nikitin

  • Super Contributor
  • ***
  • Posts: 1309
  • Country: gb
  • Femtoampnut and Tapehead.
    • A.N.T. Audio
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #1 on: December 14, 2023, 08:29:54 pm »
A simple voltage divider (two resistors) is not good enough? Assuming the 5V supply is reasonably stable.

Cheers

Alex
 
The following users thanked this post: amyk, Ian.M

Offline SuzyC

  • Frequent Contributor
  • **
  • Posts: 812
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #2 on: December 14, 2023, 08:47:59 pm »
If you insert a red LED in series with a pull-up resistor to 5V, the LED will drop the voltage to 3.2V with 10mA or so.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6247
  • Country: es
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #3 on: December 14, 2023, 08:50:45 pm »
Be careful, this current will leak into device's VDD when unpowered, if the current is too high it might be able to power it up!

10K to 5V, 18K to gnd, will make 3.2V.
22k/39k,  47k/91k, 100k/180k...

Maybe device you're connecting the button to has configurable pullups? Is It a MCU?
« Last Edit: December 14, 2023, 08:57:21 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: alligatorblues

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3249
  • Country: us
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #4 on: December 14, 2023, 08:54:42 pm »
Another approach... connect a new button to your main MCU and drive the original button input with a GPIO line which will either be HI-Z or LOW. Then use the new button instead of the original one.

Update: or you could use the original button but cut traces and re-route it to the master MCU.
« Last Edit: December 14, 2023, 09:27:51 pm by ledtester »
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2141
  • Country: us
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #5 on: December 14, 2023, 08:57:37 pm »
If the "other device" is a microcontroller, it probably has protection diodes from its GPIO pins to its Vcc pin.  If the device is unpowered, Vcc will be at ground.  So you will have a diode to ground even when the momentary button is not being pressed.
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1561
  • Country: gb
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #6 on: December 14, 2023, 10:23:46 pm »
Be careful, this current will leak into device's VDD when unpowered, if the current is too high it might be able to power it up!

10K to 5V, 18K to gnd, will make 3.2V.
22k/39k,  47k/91k, 100k/180k...

Maybe device you're connecting the button to has configurable pullups? Is It a MCU?

Hmm, good point. I had forgotten about that possibility. The other device isn't an MCU (some kind of PMIC I think?), but I suppose it might have protection diodes on its button input. I don't know if it's using an external or internal pull-up, or what value the pull-up is. I will need to investigate.

I also hadn't thought of a resistor divider. Actually, that might be the better option, as the upper half of the divider can also serve as the pull-up for the button. To save introducing extra odd values of component into the design, I could use three 1k resistors - one upper, two in series lower - to get 3.33V, which is probably close enough not to cause trouble.

I'm wondering whether limited current through a 1k resistor (~1.6 mA?) will be enough to activate the other device...

If the "other device" is a microcontroller, it probably has protection diodes from its GPIO pins to its Vcc pin.  If the device is unpowered, Vcc will be at ground.  So you will have a diode to ground even when the momentary button is not being pressed.

Huh? Surely the other device's VCC will be floating when un-powered? How can it be at ground?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22416
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #7 on: December 14, 2023, 11:18:43 pm »
Draw the equivalent circuit: if it has ESD clamp diodes, then the pull-up flows through the VCC diode, into VCC, into whatever load is on VCC (the IC and whatever is connected?).  Maybe the VCC load is tiny and VCC pulls up far enough to enable the circuit you thought was supposed to be disabled; maybe it's heavy enough that the pin never pulls up to a sensible logic level and you don't read anything from it.

If you have a schematic for what you're trying to do, and the thing you're trying to do it to, and datasheets of relevant components, that will help greatly.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7215
  • Country: pl
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #8 on: December 15, 2023, 07:35:40 am »
Use your divider to pull up the button and then 10k or 100k between the button and the other chip.
Should be good enough for the other chip to read the state of the button (unless it has internal pullup, then you are screwed use a diode instead of resistor).
Will vastly reduce current leaking to the other chip from your pullup.

Or simply this:
Another approach... connect a new button to your main MCU and drive the original button input with a GPIO line which will either be HI-Z or LOW.
Or a PNP emitter follower between the modified button and the other chip's button input.
« Last Edit: December 15, 2023, 07:38:36 am by magic »
 
The following users thanked this post: ledtester

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14780
  • Country: de
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #9 on: December 15, 2023, 08:24:39 am »
Modern circuit can run on rather low current. So 1 mA may well be enough to power a µC.
Modern electronic does not need much current for the input / switch. So one may get away with much lower current and resistors in the 1 M range. With the other device powerd off the signal level would be low (e.g. 0.5 V range) and it may need a comparator input at the µC to detect.
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2141
  • Country: us
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #10 on: December 15, 2023, 03:24:56 pm »
Well what about inserting a diode in each line.  Then when pressed the button would ground the 3.3V pulled-up line and the 5V pulled-up line, and neither would interfere with the other.  No divider needed.  The 1N4148 would probably work so long as 0.7V is read as LOW by both devices.  If not, then use schottky diodes.
 
The following users thanked this post: Ian.M

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2513
  • Country: gb
  • Recovering Electrical Engineer
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #11 on: December 15, 2023, 05:10:48 pm »
Put resistor in series with the pin and pull the other end up to 5V . The pin will have internal diode clamps (not seen an exception yet) to its Vdd and Vss check the the max current into the pin is not exceded, typically 20-40mA!
Obviously you don't want to waste power and generate heat, so 20kish. eg (5-3.3)/16k= 100uA, well within limits. No worries with 3.3 powered down and 5V active.

 There is a speed penalty of course. You wouldn't want to do this with a clock input.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17589
  • Country: lv
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #12 on: December 15, 2023, 05:17:08 pm »
so I need to provide my own pull-up voltage for the button during that time. The only load on the 3.3V will be when the momentary button is pressed, so at most perhaps 10 mA.
And it comes with a problem. If that button is connected to IC input, most likely it will be powering that circuit through ESD protection diodes in IC. So what you most likely need is not a 3.3V pull-up but a diode between push button and pull-up and IC in that circuit. Then you also can safely pull-up to higher voltage.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6247
  • Country: es
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #13 on: December 15, 2023, 07:33:58 pm »
The pin will have internal diode clamps (not seen an exception yet)
This will cause issues with analog peripherals (Mainly ADC) in a lot of MCUs, so avoid when possible or test thoroughly to ensure there're no side effects.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2141
  • Country: us
Re: Need to create a 3.3V pull-up from 5V - zener or LDO?
« Reply #14 on: December 16, 2023, 02:57:21 am »
I face a need to create a 3.3V pull-up voltage from a 5V supply, but I'm not sure which is the best method to use. The reason I need specifically 3.3V for a pull-up is because I'm "tapping in" to a momentary push-button on another device so I can detect when it has been pressed. The other device runs on 3.3V. But, the other device is not always powered (it is switched under my control), so I need to provide my own pull-up voltage for the button during that time. The only load on the 3.3V will be when the momentary button is pressed, so at most perhaps 10 mA.

I believe the attached circuit will satisfy this requirement.  If not, then I don't understand what's needed.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf