3

I'm having difficulties with communication between the EV3 and Arduino boards. Does anyone know if the EV3 is really I2C compatible, or is it just close enough?

Background: I can get the EV3 to send and receive I2C with an Arduino Uno, but not with MKR1000 or Adafruit Huzzah boards. This is both with and without pull-up resisters, and also trying different values of pull-up resistors. When I scope the SDA line, it look reasonable when communicating with the Uno. When communicating with the MKR1000, the low logic level only reaches 1.6 V (with the 4.7k resistors desoldered from MKR1000 board, but looks worse with the pull-ups). With the Huzzah board, the SDA line looks great for about 4-5 bits, but then also raises the logic low level to about 2 V. The clock line looks clean no matter what it is connected to.

1

1 Answer 1

4

LEGO doesn't really follow I2C standards, so "close enough" is a good description.

The EV3 hardware developer kit (available for download at http://mindstorms.lego.com) has this to say:

4.1 I2C communication

The EV3 platform supports the same level of I2C communication as MINDSTORMS NXT. This means that system support a maximum of 9600 bit/s and maximum 32 bytes communication buffers. All I2C communication is running within software drivers. External devices are required to include pull-up resistors on both pin 5 and 6 on 82K ohm. If multiple sensors are used on the same bus the total impedance needs to be adjusted accordingly.

Most off-the-shelf I2C devices use 10k pullup resistors (although it looks like it might be 4.7k in your case). These must be removed and replaced with 82k resistors to be compatible with MINDSTORMS.

4
  • David, thanks for the information. Yes, I did desolder the 4.7k pullups for the MKR1000 and tried 82k (as well as other values). It's still not pulling logic low down anywhere close to 0 V. My guess is that the non-Uno boards also are not true I2C either and are loading the EV3 SDA line too much.
    – A Brown
    Aug 14, 2017 at 18:24
  • What are you using for ground? On NXT, both pin 2 and pin 3 on the input ports are ground, but on EV3, only pin 3 is ground. Aug 14, 2017 at 22:17
  • I'm using Pin 3 as ground.
    – A Brown
    Aug 15, 2017 at 1:25
  • 1
    The MKR1000 has internal programmable pull-up/pull-down resistors. Are these disabled? Aug 15, 2017 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.