Shop OBEX P1 Docs P2 Docs Learn Events
Deriving a 3.3V Reference When you don't have 3.3V For I2C Conversion to 5V. — Parallax Forums

Deriving a 3.3V Reference When you don't have 3.3V For I2C Conversion to 5V.

DavidMDavidM Posts: 630
edited 2011-06-26 19:50 in Propeller 1
Hi,

I have a propeller based board and connected to that I have an I/O Board I am currently designing.
These two boards are connected via a small micromatch 6-way header.
The Propeller board is already designed, working and cannot be changed.

I am still working on the I.O Board.

The device I need to control from the propeller board is a 40Bit I./O Expander chip PCA9505, which communicates via I2C and runs at 5V VDD, I have two of these "baby's" on the I/O Board and both will have separate I2C Chip Addresses but connected on the same I2C bus. This I2C Bus is completely separate from the standard Prop I2C Bus, ( Its just 2 other I/O Pins from the prop that goes to the following header.

My CABLE Connection/Header is as follows ( I cannot change any of these functions)

Pin 1 - Ground
Pin 2 - 5V+
Pin 3 - SDA
Pin 4 - SCL
Pin 5 - Test1
Pin 6 - Test2

I have used in the past the PCA9306D Chip Before for this kind of voltage translation/conversion and it works perfectly, But in this case, I dont have a 3.3V Reference available, only the 5V line. I have VERY VERY LITTLE PCB Board space left but just enough for an SO8 Device ( i.e the PCA9306D)

So my question is..

Q1) How to I derive a 3.3V Reference for the PCA9306D Device from my 5V+ Line?

I was thinking of a 3.3V Zener Diode or a Voltage Reference IC like the ZETEX ZRC330. Or could some SOT23 style ultra small LDO do the job?

What do you think?

Thanks

Dave M
Thanks

Comments

  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-06-24 05:36
    I assume your Propeller is powered from 3.3V.
    Why not use the 3.3V from the Propellers VCC?
    Duane
  • DavidMDavidM Posts: 630
    edited 2011-06-24 05:49
    HI Duane,

    Thats not possible with the connector, or the design. Other wise I would have just used the translator chip as normal.

    I am stuck with only the pins as described.

    I DO have 5V to work with and very limited space.

    thanks

    Dave
  • Mike GMike G Posts: 2,702
    edited 2011-06-24 06:02
    Two diodes 5V - 0.7V - 0.7V = 3.6
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-06-24 07:02
    Ok, I see the problem.

    Here is the document, from Phillips, that describes the I2C bus Level Shifter, AN10441:
    http://www.redrok.com/Circuits_I2C-bus-Level-Shifter_AN10441.pdf
    Note, the conventional requirement is to use 3.3V on the gate of the MOSFETs.
    I have done this using the generic enhancement mode 2N7000 MOSFET.

    However, if you use an enhancement mode MOSFET with a gate threshold voltage a bit
    higher the gate could be at 5V instead of 3.3V

    Another solution would be to use a depletion mode MOSFET with the gate grounded.
    Ok, these parts are not common but are available. I use them in low dropout voltage regulators.
    I would suggest looking at:
    DN2530 300V 175mA 12O Vth-1.0 TO-92
    MOSFET_DN2625_250V_1100mA_3.5O_Vth-1.5_DFN-8_Dual
    DN3545 450V 200mA 20O Vth-1.5 TO-92

    I have not tested either of these circuits yet but I can't see why either solution wouldn't work.
    The basic problem is to make sure that the MOSFET is OFF when the source is at 3.3V and
    ON when the source is at 0V.

    Assuming the pull up resistors are already on both the 3.3V and 5V sides you would need
    only the 2 MOSFETs.

    Another solution would be to use a simple resistor divider from 5V to ground to develop
    the 3.3V on the MOSFET gates. Since there is virtually no current consumed by the
    MOSFET gates a zener would not be required, just the divider.
    The disadvantage of this is the 2 added resistors.

    Duane
  • AribaAriba Posts: 2,690
    edited 2011-06-24 08:14
    Are you sure that you need a voltage level translater?

    If you have a pullup resistor on SDA and SCL and drive the pins only low or switch it to input for a High (OpenDrain mode), then the voltage levels will be 0V for Low and ~3.9V for a High (3.3V + protection diode voltage ~0.6V). This is above the 0.7VDD from the Datasheet from the PCA9505 (0.7 * 5V = 3.5V)

    Andy
  • DavidMDavidM Posts: 630
    edited 2011-06-24 16:56
    HI Ariba,

    So I only need a minimum of 3.5V for the SDA SCL lines ( Assuming I am running the PCA9505 at 5V)

    If I have 3.3V signals FROM and TO the Prop I/O Pins for my SDA SCL Lines.

    Are you suggesting that If I pull these lines up to the 5V supply I will get enough Voltage for HIGH State for the PCA9505?

    And..

    then will pulling up the I2C Lines to 5V wont hurt the Prop I/O?


    Thanks

    Dave M
  • jmgjmg Posts: 15,185
    edited 2011-06-24 20:02
    DavidM wrote: »
    .. then will pulling up the I2C Lines to 5V wont hurt the Prop I/O?

    I can see this in the data sheet:
    Max. DC current into an input pin with internal protection diode forward biased ±500 μA
    ["I/O pin voltages with respect to Vss may be exceeded if internal protection diode forward bias current is not exceeded."]

    so anything higher than ~ 3K ohms, will be ok for direct connect.

    If you want to push the speed, that 3K may be too high, and then the simplest way to drop from 5V to around 3.3V, is a simple SMD series LED.

    Has the bonus of showing i2c activity, as the current will modulate it ;)
  • DavidMDavidM Posts: 630
    edited 2011-06-25 04:44
    Hi Everyone,

    Thanks for all your help and Ideas!

    I have decided to go with the following Schematic that I have drawn.

    I will use the PCA9306 for I2C level shifting
    I will use the IPS73133 for 3.3V Regulator 150ma requires NO Capacitors and is a SOT23 package.

    What do you think?

    Regards

    Dave M
  • Mark_TMark_T Posts: 1,981
    edited 2011-06-25 06:09
    A pull-up to 3V3 is Thevenin-equivalent to a resistor divider, although you get quiescent current draw as a price.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-06-25 06:59
    I thought you had real estate problems?

    I just tested the I2C translator using the Supertex depletion mode DN2530, I have this on hand,
    and it worked just fine. The gate was connected to gnd.

    However, the DN2625, in a dual package, would work the same.
    DN2625_250V_1100mA_3.5O_Vth-1.5_DFN-8_Dual.pdf
    The gates should be grounded and the pullup resisters can be connected to +5V. This is
    completely within the specifications of the Prop and the 5V side delivers full voltage
    for the I2C specification.

    The dual package size is equivalent to an SO-8. Clearly a smaller footprint. And you eliminate
    the need for the regulator.
  • DavidMDavidM Posts: 630
    edited 2011-06-25 19:00
    Hi Duane,

    Do you have a schematic of what you propose?
    Is your idea bi-directional?

    Thanks

    Dave M
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-06-25 19:50
    Like this:

    I2C_DMOS.png

    I really have to describe how this circuit works as opposed to that of the conventional
    circuit described by Phillips in their ap note AN10441.
    I2C-bus-Level-Shifter_AN10441

    The I2C interface is basicly an interface composed of pull up resisters and open drain
    pull down drivers. (Ok, we cheat a bit here by using a Prop pin set low and switching
    between output and input modes. Note, we are never allowed to drive the pin high, it's
    expected high levels will be developed through the pull up resisters.)

    In the conventional circuit the gate of the MOSFET is connected to +3.3V.
    When a low is asserted on the 3.3V side the MOSFET will be turned on and connects
    both sides together pulling the 5V side fully low. This happens because there will be
    +3.3V on the conventional enhancement mode MOSFET gate.
    Similarly, when a low is asserted on the 5V side current will pass through the MOSFET
    body diode pulling the 3.3V side low causing the MOSFET to be turned on and connects
    both sides together pulling the 3.3V side fully low.
    When both sides are off the pull ups go high turning the MOSFET off because there will
    be 0V between the gate and source.

    In my circuit, using depletion mode n channel MOSFETs, the gate is connected to ground.
    These devices conduct when there is 0V between the gate and source and are turned
    off when there is a negative voltage between the gate and source, in this case -3.3V.
    Other than the change of MOSFET type the operation is identical to the conventional
    circuit.

    The deviation from the conventional circuit is caused by the requirement of DavidM who
    doesn't have access to 3.3V for the pull up resisters on the 3.3V side. Connecting R84
    & R85 to +5V is legal because only about 100uA passes through the protection diode
    in the Prop pin which allows as much as 500uA. Current from the 2K resisters on the
    5V side can't get to the 3.3V input pins.

    As I see it, the major advantage is there is no requirement to bring 3.3V to the MOSFET
    gates, which he doesn't have. This brings the part count down to 1. The cost is about
    $2.50 which is about the same as the combination of a regulator and I2C bridge chip.
    And it takes less real estate.

    Duane
  • DavidMDavidM Posts: 630
    edited 2011-06-26 19:39
    HI Duane,

    Thanks for the explanation.

    That Dual Mosfet you propose, I gather its just a DUAL N-CHANNEL with logic level gates?

    If So there are others on the market that are easier to get and cheaper.

    Also,

    How is your circuit any different to using the LevelTranslator PCA9306 instead of the Dual Mosfet?
    You are still pulling up to 5V.

    Thanks

    Dave M
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-06-26 19:50
    No, I am proposing the use of "Depletion Mode" MOSFETs instead of conventional enhancement mode MOSFETs.
    If you compare my circuit with that in the Phillips ap note you will see the gates are grounded instead of being connected
    to 3.3V.

    Yes, the depletion mode MOSFETs are rare compared to conventional MOSFETs but in my circuit they are required.

    I described how using 10K pull ups to 5V is within specification.

    Duane
Sign In or Register to comment.