Hi everyone,
I'm designing a custom shield for my Arduino DUE and in order to avoid future problems and incompatibility I came here looking for your wise help XD
All the ICs are powered with 5V in order to have a 0 to 5V dynamics in both ADC and DAC.
But the Arduino DUE cannot support such a high voltage so I've tighten the pull ups of the I2C connection to 3.3V instead of 5V.
Could you please tell me if such a connection could work?
Should I protect the arduino's SCL and SDA pins with something?
Hi, thanks for you interest.
As you can see from the schematic, I have two 4.7k resistors pulling up the SCL and SDA lines to the 3.3V taken directly from the Arduino DUE.
Meanwhile i`ve understood that everything should be fine like this. The ICs only pull down the line, while when HIGH the voltage is fixed by the resistors puling up to 3.3V.
What I understand from you schematics is that you are connecting directly the I2C lines of the ADC (SCL/SDA) and DAC (SCL1/SDA1) with correspondent Due I2C lines. In other words, you are putting 0-to-VDD (+5V) pulses in the Due pins which may result in damage. The 4k7 pull-up resistors are not protecting Due. Remember that they are there because I2C lines are open-drain. I would recommend you to use an optoisolator (like NTE3044) instead to protect Due I2C lines. Regards!
Assuming all of your chips have true I2C interfaces (not some strange programmable I/O bit-banged pins), then you should be fine.
I2C is by definition an "Open-Collector" interface. Just because a peripheral chip is powered by 5V does not mean that the voltages on the I2C lines will be 5V.
HOWEVER, you will need to look at the specs very carefully of your peripheral chips to be sure that the 3.3V voltage levels (supplied by your pullups) will generate signals high enough to be properly detected by your 5V chips. Look at the DUE's Vol (Voltage-Out-Low), and Voh (Voltage-Out-High) specs, and compare them to your 5V chips Vil (Voltage-In-Low) and Vih (Voltage-In-High) ranges.
ALSO, be aware that the DUE already has pullups on SDA, SCL (pins 20,21). Adding your additional pullups on these pins will greatly shorten the lifetime of the DUE. Search my username to see some rants on this... DO NOT ADD ADDITIONAL PULLUPS TO SDA0 and SCL0 ON THE DUE...
SDA1 and SCL1 do not have built-in pull-up resistors, so you MUST add them. The 4.7k resistors you show should be fine.
In my mind, it is always a good idea to use a proper voltage-translator when the design calls for it. Your design calls for it. However, a prototype circuit as shown in your PDF may work.
The I2C library with the DUE is a bit crippled (last I knew). Again search my username on this forum. Nearly all my posts have involved I2C Issues.
Dear all, and in particular Chris,
why havent I get to read your response before!? My bad. Now ive got 10 nice pcbs with pull ups to 3.3V on SDA and SCL which is a good voltage for the DUE, but too low for the ICs which have all a VIH of about 0.7VDD or even 0.8VDD. Therefore, being they powered with a VDD of 5V, my connection is not working =( =( =(
Ive ordered yesterday some MOSFETs for performing the translation (as perfectly explained here http://ics.nxp.com/support/documents/interface/pdf/an97055.pdf) It will not be really nice to have a transistor glued on the bottom of the pcb but at least ill have it working.
But, just a question: cannot I leave the extra pull up on SDA0 and SCL0. If I understand well, in my case i`m finishing having the internal 1.5k pull up in parallel with the external 4.7k meaning that the equivalent resistance changes to 1.13k meaning a power of about 10mW. Is it really dangerous? Should I disable the internal pull ups or rip up the external ones?
Thank you,
this time i`ll activate the "reply notification"
The current value of the pull-up resistors should be fine. It is just that the pull-up resistors included on the Arduino DUE's pcb are unnecessarily small, and are probably a mistake.
Matter of fact, the schematic lists them as 1500 ohm, but in reality, the resistors are 1000 ohm (making matters even worse).
In your case you have 1000 ohms in parallel with 4700, giving 825 ohms effective resistance. This corresponds to 4mA of required current sinking. The DUE's I2C pins are specified to be able to sink 6mA maximum. There really is no reason to stress the SAM's dio pins so much, and will likely shorten the life of the chip.
You cannot disable the built-in pull-up resistors. They are part of an actual resistor-pack, soldered on the PCB (see attached image).
I would recommend that you remove "RN5" from the PCB, and use your own external pull-ups. Yes, this is much easier if you happen to have a set of soldering hot-tweezers for removal (many people don't have such a luxury, which makes removing this part a little more difficult). The other resistors in the RN5 resistor pack are not used, nor connected to anything.