Go Down

Topic: Due I2C Voltage (Read 4220 times) previous topic - next topic

crazyben

Hello all,

as mentioned here http://arduino.cc/en/Main/ArduinoBoardDue
Arduino Due's I/O Voltage was changed from 5V to 3.3V.

Does this also mean that we have to change the voltage of the I2C Devices like DS1307, DS1820?

Thanks
Ben

graynomad

#1
Dec 21, 2012, 12:20 pm Last Edit: Dec 21, 2012, 12:28 pm by Graynomad Reason: 1
Normally that would be the case. Sometimes 3v3 chips allow higher voltages and currents on I2C pins because they know it's often required.

If nobody answers for sure soon I'll have a look at the data sheet, for that matter so can you.

EDIT: No mention of 5v tolerance in the data sheet so it looks like if you need that you'll have to use voltage translators like the PCA9306.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Markus_L811


Hello all,

as mentioned here http://arduino.cc/en/Main/ArduinoBoardDue
Arduino Due's I/O Voltage was changed from 5V to 3.3V.

Does this also mean that we have to change the voltage of the I2C Devices like DS1307, DS1820?

Thanks
Ben

Think so I'm sure (I don't have the I2C Spec to read it) but if the Chip (DS1307 or DS1820) works with 5V the I2C would talk with it to, so if the IC can understand I2C with 3.3V he can listen but the answer would at 5V level so it will damage the Due

stimmer

I thought that I2C was open-collector / open-drain - so it shouldn't matter what the voltage level is.
Due VGA library - http://arduino.cc/forum/index.php/topic,150517.0.html

graynomad

It is. but if you pull it to 5v to satisfy a peripheral chip you are applying that 5v to the Due pin.

It will be through a resistor of a few k so may not do any harm, but also the ESD diodes on the Due pins will clamp the voltage level to ~3v9 (depending on their forward voltage) which may or may not work for the 1W chip.

I've seen chips that can handle this, I assume they don't have the ESD diodes on those two pins, but I can see no mention of this in the SAM data sheet.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

retrolefty


I thought that I2C was open-collector / open-drain - so it shouldn't matter what the voltage level is.


True, but only true when the Due's I2C pins are in output mode driving the signals, however when it's in receive mode reading the I2C signals it would be subject to whatever the external pull-up voltage is.

SomeRandomGuy

If you use your own pull-up resistors attached to the i2c pins and the due's 3.3V supply, then all the high pulses on the line will be 3.3V, even if the peripheral is running on 5V. That is one of the beauties of I2C. I successfully did this to a DS1307 the other day. Run 5V to the DS1307's supply pins, but be sure that the pull-up resistors for the i2c are tied to 3.3V on the Due.

Also, I got lucky that the DS1307 has TTL logic levels, which means that it interprets 3.3V to still be logic high. You will have to check your datasheet for each peripheral to see if it will recognise 3.3V as a logic high input.

dougcl

#7
Apr 10, 2017, 07:49 pm Last Edit: Apr 10, 2017, 07:56 pm by dougcl
Hi folks, I am using a PCA9306 to step down a 5V based I2C bus to 3.3V for the Due. I am using 10k pullups on the Due side. The Due is not reliably communicating in this configuration unless I happen to have a scope probe on the SCL line. Adding 270pf bypass caps on SCL and SDA on the Due side solved everything. However, the capacitance is visible through the PCA9306 to the bus, and that's not good. A few such circuits added to the bus degrades the rise times and the bus stops working. The next answer is to raise the value of the pullups and remove the caps. However, it seems that if you raise the pullups above 10k or so, the PCA9306 cannot maintain a 3.3V level on the Due side, and it starts to creep up. I mention this here only because the PCA9306 is often recommended, but it seems that you cannot really tune the Due side pullups without affecting the level. The only mystery here is why the Due is not working with 10k pullups. The levels look good. The only thing I am noticing is a fairly strong ring at the bottom of the I2C falling edges. Seems to me that's pretty typical of I2C though.

Doug

MorganS

Why would the voltage go above 3.3V? Your pullups are coming from 5V?

It would be within tolerance to go about 0.5V above the 3.3V nominal level. If you're seeing 3.4V then I would not worry at all.
"The problem is in the code you didn't post."

dougcl

#9
Apr 11, 2017, 08:11 pm Last Edit: Apr 12, 2017, 06:36 pm by dougcl
Indeed, why would SDA1 and SCL1 start to climb as I increase the value of their pullups? They should stay at VREF1 = 3.3V, but they don't. Note as well in this situation that VREF2, measured at the EN pin remains at very nearly 4V (where it should be, given that the supply is 5V) even as the pullups are changed, so it doesn't seem that fiddling with the 200k resistor is the answer either (although I admit to exhaustion rather than exhausting all possibilities).

Perhaps 3.4 should not be a worry, but in any case, the communications do not work when the 270pF caps are removed.

My main point here is that the PCA9306 does not maintain VREF1 if the pullup values are increased, so it may not be possible to tune the pullups on the Due side to the desired value. On top of this, the PCA9306 also makes the Due side bus capacitance visible to the other side, so adding caps to the Due side is not a good option either. So you are pretty limited in what you can do on the Due side if things aren't working.

Doug

dougcl

#10
Apr 15, 2017, 09:12 pm Last Edit: Jun 05, 2017, 07:04 pm by dougcl
Followup: the PCA9517A (or TCA9517A) seems to be a much better choice for I2C level translation. It completely isolates the two sides and permits level shifting without issue. You can add caps if necessary to the Due side without impacting the bus capacitance.

The TCA9517A has a gentle pulldown with a minimum slope specification so that overshoot is reduced on falling edges. It also seems to reject glitches under 50ns. These characteristics work well with longer bus wires used with remote sensors. In my case it eliminated the need for caps and allowed me to use stronger (lower resistance) pullups. Further, because of round trip propagation delays, it adds around 150ns to the time between the master's 8th falling clock and the fall of SDA in the ACK stage (Due running as slave) giving about 250ns overall, which is perfect.

Doug

Go Up