Author Topic: i2c voltage level conversion problem  (Read 3416 times)

0 Members and 1 Guest are viewing this topic.

Offline mribbleTopic starter

  • Regular Contributor
  • *
  • Posts: 202
i2c voltage level conversion problem
« on: April 09, 2012, 01:01:03 am »
I'm trying to interface this I2C LCD (http://www.newhavendisplay.com/specs/NHD-C0216CiZ-FSW-FBW-3V3.pdf) with the Arduino.

I'm using code that is basically from the data sheet, but it wasn't working.  I hooked up a logic analyzer and can see that I'm geting an ACK on the 3.3 side of the bus (slave/lcd side).  When I look at the 5V side of the bus (master/arduino) I don't get the ack and it fails.

Here is my level conversion circuit:


The only things that could possibly matter are the mosfets.  This is what I'm using there: http://www.mouser.com/ProductDetail/Fairchild-Semiconductor/FQN1N50CTA/?qs=sGAEpiMZZMsrr1kXJis%252bJwANxo1JtN8aMQxukBeGcxU%3d

Does anyone have an idea what's going wrong?
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: i2c voltage level conversion problem
« Reply #1 on: April 09, 2012, 01:12:12 am »
perhaps your mosfet is back to front? drain is to go on the higher voltage side,

alternativly here are the mosfet specs you must meet http://ics.nxp.com/support/documents/interface/pdf/an97055.pdf page 13

max gs voltage of 2V, your one reads 30V
 

Offline mribbleTopic starter

  • Regular Contributor
  • *
  • Posts: 202
Re: i2c voltage level conversion problem
« Reply #2 on: April 09, 2012, 01:45:52 am »
I've triple checked and if the datasheet is correct and mouser shipped me the part on the label (both of these seem highly likely) then I have the drain hooked up to the higher voltage.

That said I think your point about the gs voltage makes sense.  I'm not sure where you got 30V for mine.  The datasheet seems to say mine is 2-4 volts.  Based on the application note you sent me I think my max gs voltage needs be under 1.7 volts.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: i2c voltage level conversion problem
« Reply #3 on: April 09, 2012, 01:47:08 am »
Your MOSFET has a worst-case Vgs(th) of 4V so that may be the problem.  You might try a different one.  Sparkfun has a level converter...

http://www.sparkfun.com/products/8745

that uses the same circuit you are using but uses a BSS138 which has a worst-case Vgs(th) of 1.5V.  People say the circuit works for I2C.

You might also read this app note:

http://www.nxp.com/documents/application_note/AN10441.pdf
 

Offline mribbleTopic starter

  • Regular Contributor
  • *
  • Posts: 202
Re: i2c voltage level conversion problem
« Reply #4 on: April 09, 2012, 10:54:33 am »
Thanks!  I've just ordered some new mosfets to try.  I'm pretty sure this will fix my problem.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf