Arduino Due Clock Stops Working

I am working on a project which includes reading from a 16 pin MLX90395 sensor. I have wired it according to the recommended wiring diagram given in their datasheet. I ran the I2C address scanner with my arduino due, but it doesn't seem to work. I noticed with my oscilloscope that as soon as I connected either the SCL or SDA line to the sensor, they would completely stop working even after I disconnected them, and would only work again when I reset the arduino. Anyone know whats going on?

Also using same arduino and I2C scanner program with other devices works and I have never encountered this issue

Welcome to the forum.

The Due has two I2C buses, the first one has too much pullup and the second one has no pullup.
The onboard pullup resistors are 1k5, but sometimes 1k resistors are used.
Do you have a MLX90395 module with pullup resistors ?
How do you power the sensor ?
Do you use long wires or perhaps a flat ribbon cable with SDA next to SCL ?

The Raspberry Pi Pico costs 4 euros. Why did you buy the Due ?

1 Like

I am using the buses on the bottom labled SCL and SDA, not SCL1 or SDA1.
I just have a bare MLX90395, but I have external 10k Ohm resistors as recommended in the datasheet.
I power the sensor using the 3.3V output in the Due which is the recommended voltage for the MLX90395.
I use prototyping jumper cables.
I use the Due because I am more familiar with it and it as worked with other I2C projects in the past

I'm thinking about a hardware problem :thinking: and maybe both the Due and the sensor are both a bit itchy with the I2C bus signals.

Can you tell which library you use ?

Jumper cables can be broken and breadboards have bad contacts. Do you use a breadboard or do you use the GND for the I2C bus for something else. Can you show a photo, so I can see that ?

If the library supports it, then you can try Wire1 with SDA1 and SCL1. If that makes a difference, then you could remove those 1k5 pullup resistors.

Sometimes 100Ω resistors at put in the signal path of SDA and SCL near the processor, to limit the slewrate.

Below are a few paragraphs with my thoughts, you might have the wrong combination of things.

The Arduino Uno can take a lot. It has a slewrate limiter for outgoing I2C signals and a filter for incoming I2C signals and it pulls SDA and SCL low with a high current and it works at low voltages (so it still works with a voltage dip).

The Arduino Due runs at a higher frequency, and the falling edge of SDA and SCL can create nasty spikes and the Due is more sensitive for nasty spikes as well. The software for the Due does not get good support anymore from the Arduino team. It has onboard pullup resistors which are 1k5 (it should be 10k).

The pullup resistors is the smd device:

If you heat it up with a big blob of solder, then it falls off. They are 1k5. I hope they are not 1k, because that is really too low.

Is the MLX90395 from 2020 ? Then it is a new sensor. Some I2C devices from Melexis had trouble in the past with the I2C bus.

The Raspberry Pi Pico is designed by the Raspberry Pi team. It runs Mbed. The Arduino layer is on top of Mbed. There is a known problem with a I2C Scanner, because Mbed does not support a I2C write command with zero data length. But the rest is reliable.

My advice is to not use the Due with the MLX90395 and forget whats going on. That may seem silly advice, but sometimes you have to accept that something does not work, so stay away from it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.