Author Topic: Difficulty with i2c level conversion from 3.3V to 1.8V  (Read 1052 times)

0 Members and 1 Guest are viewing this topic.

Offline desertgregTopic starter

  • Contributor
  • Posts: 35
  • Country: us
Difficulty with i2c level conversion from 3.3V to 1.8V
« on: October 06, 2023, 04:19:05 pm »
I implemented a circuit to convert i2c signals from 3.3V to 1.8V (using examples).  I'm testing the circuit by sending 3.3V i2c data in and then measuring the 1.8V i2c signals (with nothing else connected to the 1.8V output side currently if that matters).  The wierd thing I can't figure out is when the 3.3V side is pulled low, the 1.8V side only goes down to 0.6V.  Can someone explain why the 1.8V side doesn't get all the way to zero volts?

This is my second try to get this fully working.  On my first try I had a mosfet with a slightly higher Vgs so I thought this mosfet with Vgs of 1V would fix the problem but it didn't.  Thanks!
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7771
  • Country: de
  • A qualified hobbyist ;)
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #1 on: October 06, 2023, 05:07:55 pm »
It's V_f of the MOSFET's body diode.
 

Offline desertgregTopic starter

  • Contributor
  • Posts: 35
  • Country: us
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #2 on: October 06, 2023, 05:53:55 pm »
What I thought would happen (based on explanations I've read elsewhere) is that once the low side gets down to 0.6v (body diode voltage) the mosfet should turn on and then it would go down to 0V.  Since its not doing that, does that mean the mosfet is not conducting? 

Here's the datasheet for the mosfet, I might not be interpreting it correctly:
https://assets.nexperia.com/documents/data-sheet/PMF63UNE.pdf

It says the highest value for Vgsth is 1V so if source is 0.6V and G is 1.8V shouldn't the mosfet be allowing current to flow?
 

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3367
  • Country: nl
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #3 on: October 06, 2023, 06:39:46 pm »
When the 3V3 side of the Fet is pulled low, it first pulls the 1V8 side low through the body diode of the FET. which explains why it goes to only 600mV.

According to the datasheet, the threshold voltage of your Fet is between 450mV and 1V, so there should be enough gate voltage to open the fet and let Rdson "short" the body diode so the source goes lower again, but apparently that does not happen. So start with measuring what the actual gate to source voltage is when the 3V3 side is pulled low.

I recommend to also put a fet on a breadboard or something and measure the actual threshold voltage when it turns on.

Also, you should study the circuit further so yo fully understand how it (should) work. It's a quite clever trick from some Philips application note from 20 or so years ago.

But also (again). margins and tolerances become more difficult to manage with such low voltages. It may be better to use a dedicate level translation IC for this low voltage bus. Or open the trick bag. Raise the gate a bit above the 1V8 level to shift the threshold when the Fet switches a little bit.
 

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3367
  • Country: nl
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #4 on: October 06, 2023, 06:42:48 pm »
It says the highest value for Vgsth is 1V so if source is 0.6V and G is 1.8V shouldn't the mosfet be allowing current to flow?

Yes, but what if your nominal 1V8 is only 1.65V in reality and you loose a bit of voltage over track resistance (can be both power or signal)
 

Offline desertgregTopic starter

  • Contributor
  • Posts: 35
  • Country: us
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #5 on: October 06, 2023, 08:01:18 pm »
Yeah, it must be right on the edge of working.  The 1v8 can be seen in the high parts of the graph so its pretty close or over 1.8V.  So there is a 1.2V difference between gate and source and it looks like every once in a while the mosfet actually starts conducting at least on the SDA signal.  So the mosfet doesn't conduct at VGs=1.2V even though the datasheet has:

VGSth gate-source threshold voltage   min: 0.45 typ: 0.7 max: 1 V  (Table 7, page 6). 

Am I reading that part of the datasheet wrong?  I agree, after seeing how tempermental this is, I will probably use a dedicated IC for this part of the circuit.  But it would be nice to finish understanding this too.  Thanks for helping!
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2008
  • Country: us
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #6 on: October 06, 2023, 08:30:38 pm »
I guess the other possibility is that the mosfet has turned on but the SCL line is drawing so much current through the two pullup resistors, plus any other pullup resistors that may be on that line on either side, that its output-low voltage is now above ground by 0.6V.  It might be worth testing 10K resistors just to see if it makes any difference.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19536
  • Country: gb
  • 0999
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #7 on: October 06, 2023, 09:10:34 pm »
Why are you using a MOSFET, rather than a BJT?

A BJT would be better, because it has no body diode to worry about and will switch at 0.6V, without having to get special low threshold parts.
« Last Edit: October 07, 2023, 12:53:42 pm by Zero999 »
 

Offline desertgregTopic starter

  • Contributor
  • Posts: 35
  • Country: us
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #8 on: October 06, 2023, 11:44:31 pm »
The BJT circuit certainly looks promising.  But when I recreated it Circuit Lab, when both sides are floating, they both get pulled to around 2.6V so that would be a problem for the 1.8V i2c side.  (do you see that in your simulator?)  I didn't come up with the mosfet circuit either, I'm just having some difficulty applying it to a 1.8V signal.
 

 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19536
  • Country: gb
  • 0999
Re: Difficulty with i2c level conversion from 3.3V to 1.8V
« Reply #9 on: October 07, 2023, 01:00:12 pm »
The BJT circuit certainly looks promising.  But when I recreated it Circuit Lab, when both sides are floating, they both get pulled to around 2.6V so that would be a problem for the 1.8V i2c side.  (do you see that in your simulator?)  I didn't come up with the mosfet circuit either, I'm just having some difficulty applying it to a 1.8V signal.
That's because I mistakenly connected R2 to 3.3V, rather than 1.8V. I've corrected the schematic attached to my previous post.

Here's a plot of the output using LTSpice.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf