i2c Problems - Solved Using Dinasour Arduino Uno?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Shull327
 
Posts: 2
Joined: Tue May 03, 2022 11:11 am

i2c Problems - Solved Using Dinasour Arduino Uno?

Post by Shull327 »

I have a project using i2c communication with a matrix orbital GTT50 touchscreen.

I spent quite a bit of time chasing this issue. The wires are separated, I have pull up resistors - I have adjusted and tried different resistor values.

I can trigger the fault by turning a fan on and off nearby, the board / code hangs and there is no recovery with a hard reset.

I can swap the board out to an Arduino UNO (my screen i2c can handle both 3.3v and 5v logic) and what do you know, all the i2c issues appear to be resolved.

I can turn the fan on and off many times and there doesn't seem to be a glitch.

I'm no expert here, but why take a great product and fall short on the next generation. I bought a Metro M4 Express mainly because it is faster, but I understand the UNO had some filtering capabilities built in for i2c and it appears your boards fall short of this.

Anyone have some insight? Is there a simple way to ensure this board can function without the need for i2c timers (which I also can't get to work with the SAMD51 boards), ie some sort of simple filtering that can be achieved.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: i2c Problems - Solved Using Dinasour Arduino Uno?

Post by adafruit_support_bill »

There is no special i2c circuitry on either board. On both the UNO and the Metro M4, the i2c pins are connected directly to the processors. The M4 is a 3.3v processor (vs 5v for the Atmega328) so naturally it would be more sensitive to an induced glitch on the line.

Shielded and/or twisted pair cabling can help minimize the effects of EMI.

User avatar
Shull327
 
Posts: 2
Joined: Tue May 03, 2022 11:11 am

Re: i2c Problems - Solved Using Dinasour Arduino Uno?

Post by Shull327 »

Ahh I see, I was misinformed. I though the Arduino Uno had internal 100ohm resistors. I tried adding some inline on the SDA and SCL with no change.

The arduino UNO can still trip up, but it is much harder for me to get this to occur, very random. The SAMD51 Metro M4 however can be easily triggered with a simple switch of a nearby fan.

I will try the shielding cables, as that is just about the last thing to try... but I am curious it seems the SetWireTimeout function from the AVR series wire library didn't make it's way to the SAMD51 type boards?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: i2c Problems - Solved Using Dinasour Arduino Uno?

Post by adafruit_support_bill »

The setWireTimeout was a relatively recent (though long overdue) addition to the AVR version of the Wire library. The Arduino platform is supporting a much wider variety of processor architectures these days. So it may take some time before processor-specific functions such as that get propagated to all the newer processor types.

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”