1.8V to 5V level shifter (single direction, using a mosfet) - Page 1
Forum section: electronics / beginners

author: robca
author_rank: Frequent Contributor
timestamp: November 10, 2021, 02:23:13 am
content: I'm working on a project where the designer had a simple pull up to try and level-shift a 1.8V output to a 5V input. The signal is monodirectional: from a MEMS IMU device to a PMIC that has a wake-up pin using 5V logic levels. Speed is not important, the signal is just a wake up pin going low and triggering the PMIC wake up. Low power is critical, so being able to use bigger pull up resistors (470k?) would be nice. The MEMS output can drive 3mA max, btwThe current circuit is not working properly and actually pulls up the MEMS output to ~2.4V, which is higher than the max rating for the chip. I need to manually fix a couple of boards by dead-bug soldering the mosfet and a couple of resistors.I have a BSS138 based module at home, but it seems to be marginal at 1.8V.What n-mosfet in SOT23 form factor (hand solderable) would you suggest? And what resistor values can I get away with?I'm ok with logic circuits and firmware development, but I get hopelessly lost with analog circuits, so appreciate any suggestion

author: Psi
author_rank: Super Contributor
timestamp: November 10, 2021, 02:31:29 am
content: Maybe SSM3K329R,LF1.8V drive ok (0.289 ohm)SOT-23https://www.digikey.co.nz/en/products/detail/toshiba-semiconductor-and-storage/SSM3K329R-LF/3522374If you don't need speed 470k pullup should work, assuming the PMIC input is high impedance like a MCU input.Just be aware that with a resistor that high if the PCB gets wet the water can overpower the pullup.This one might have slightly larger legs for hand solderinghttps://www.digikey.co.nz/en/products/detail/taiwan-semiconductor-corporation/TSM2314CX-RFG/7360258

author: Zero999
author_rank: Super Contributor
timestamp: November 10, 2021, 09:47:02 am
content: How about a BJT, if component availability/cost are issues?Although the schematic shown below is for 3.3V to 5V, it will work with 1.8V. If speed isn't important, C1 isn't needed.Level shift bi-direc BJT.asc

author: Renate
author_rank: Super Contributor
timestamp: November 10, 2021, 12:57:37 pm
content: How about just making that transistor common emitter? Add a base resistor and you're done?

author: Zero999
author_rank: Super Contributor
timestamp: November 10, 2021, 02:41:04 pm
content: Quote from: Renate on November 10, 2021, 12:57:37 pmYes, that's much simpler.The circuit shown below will work fine from 1.8V and 5V.

author: robca
author_rank: Frequent Contributor
timestamp: November 10, 2021, 06:19:54 pm
content: First of all, thanks!I simulated both circuits in Falstad, and here's what they look liken-Mosfethttps://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKADMQ84QAWHvTtwQoB2FOGjiYkFCwDOyPAOEDmhZSKjgQbAIYAbOXXm9+FTQj7mBVCHsPGA5qY0C+Awih5bILZ2tdwMHUQT28qXwAlUIRCEBQvGLiwDDiI3ltoGx9oBBZosjiE70LwVJ8M6nSYPIAnJOsG7BCqHgx4X3rSlRBS5uyEjpYAdwbippaR3vL+6aLE31GuVrNlkFnFwSpZwlj1ydnLbx6j3mCfFlmwfEDrpV4xC9HTnt24ns23xow8Y81NvDnHrdf5TEGqG6NXxAANPN BJThttps://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKAGcRCUAWCjQkDgEJ+UcCABmAQwA2bOiwDmnHnwFdehBAKqQWAFxB4ww7r2PDRVCA2zQwpYlrCQMmYnmzckt+4TfEKGB4CNwoCCJ45C5UACZ00gCuMvosAE5GJhRmmQLc2Chi3BjwegDuRgVqIIF41XoZtdVN+YXWpfAsAEq5IK292AhtRdbQdbpQ0AjdNSh1-U2Dw1TctGK6UywVQtV4cPVbs3UiAi6rB9iEdWe0ojd9TussQAIf you wonder why I'm using weird resistor values, it's because the PMIC input (5V side) has an internal pull up that can be 220K or 10M (a programmable setting), so I'd rather use that pull up than hand soldering one more resistor.The mosfet one is bidirectional, but in my case that's not important. Assuming that the Falstad simulation is roughly on point, when the input and output is floating, the current is in the order of the hundreds of uA.The NPN one is only mono directional, which once again is not important, but seems to have a much lower current at rest, in the order of tens of pA. The current when the input is low is roughly the same as the other one, but in my case the input is always floating high, unless activated, in which case it goes low for a short amount of time. So low current at rest is more important to me than when pulling lowThere seem to be a lot of SOT23 BC547 or BC847 available, so that makes it easy to sourceAm I right in thinking that using a BC547 I would get lower power usage overall? Especially when the device is in sleep mode, longer battery life is everything

author: Zero999
author_rank: Super Contributor
timestamp: November 10, 2021, 06:46:51 pm
content: The BJT isn't critical. Most small signal BJTs will work.I think BJTs generally have a lower leakage current, than MOSFETs, especially those with a low threshold voltage.I get a little anxious about seeing such high resistor values, because current leakage can be more of an issue. I strongly recommend building a prototype first. I suppose you have the advantage of the pull-up being programmable and 220k is a more sensible value, if 10M is too high. At the very least, you could add a space for an external pull-up, even if it's not used.

author: Renate
author_rank: Super Contributor
timestamp: November 10, 2021, 06:55:49 pm
content: 10 M is not a resistor.It's a cough on a PCB.

author: robca
author_rank: Frequent Contributor
timestamp: November 10, 2021, 06:57:10 pm
content: Quote from: Zero999 on November 10, 2021, 06:46:51 pmThanks again. Yes, I can choose resistors. I can even put a parallel pull up on the PMIC input, if needed, as you say (e.g., with another 220k pullup, the actual pullup would be 100k), and I will definitely check what happens with an oscilloscope to ensure it works without problems. And, since it's a dead bug soldering, I can easily change component values if needed.And thanks for confirming that BJTs should be overall lower power.

author: Peabody
author_rank: Super Contributor
timestamp: November 10, 2021, 07:21:21 pm
content: Quote from: Zero999 on November 10, 2021, 02:41:04 pmBut R2 could be much higher, right? 100K? 220K?

author: Zero999
author_rank: Super Contributor
timestamp: November 10, 2021, 08:10:49 pm
content: Quote from: Peabody on November 10, 2021, 07:21:21 pmCorrect.Quote from: robca on November 10, 2021, 06:57:10 pmIt's not a matter of lower power. The problem is, when the transistor is supposed to be off, a small leakage current will still flow, causing a voltage drop across the load resistor. As you've got a pull-up of 10M, a leakage current of just 300nA, would cause it to drop 3V, giving an output of 2V, when it should be 5V.Looking at the datasheets, at 25oC, the BC846 will leak a maximum of 15nA, whist the SSM3K329R can leak up to 1µA. Of course this is specified, when the voltage is 30V, rather than only 3.2V, as per this application, but the leakage current from the MOSFET might be a problem, especially at higher temperatures, whist the BJT is likely to be fine.https://www.mouser.co.uk/datasheet/2/408/SSM3K329R_datasheet_en_20140301-1150400.pdfhttp://www.farnell.com/datasheets/79215.pdf