Go Down

Topic: I2C problem, to short acknowledge signal (Read 181 times) previous topic - next topic

Potatocheese

Oct 12, 2017, 12:49 am Last Edit: Oct 12, 2017, 12:56 am by Potatocheese
I'm currently testing out a TLV493D magnetic sensor with I2C. I'm quite sure I have located the problem but I do not know how to solve it. In the picture attached it's possible to see the oscilloscope readout. The I2C starts by sending the address 1011110 then it's set to write with 0. The sensor pulls down for acknowledge, but it dosent keep it down for the whole clock cycle. The board then stops the transmission.

I tested a MPU6050 on the same bus just to check everything worked as it should an it ha no problems at all. Everything is running at 3.3V.

Anyone with the knowlede to solve this?

chucktodd

I'm currently testing out a TLV493D magnetic sensor with I2C. I'm quite sure I have located the problem but I do not know how to solve it. In the picture attached it's possible to see the oscilloscope readout. The I2C starts by sending the address 1011110 then it's set to write with 0. The sensor pulls down for acknowledge, but it dosent keep it down for the whole clock cycle. The board then stops the transmission.

I tested a MPU6050 on the same bus just to check everything worked as it should an it ha no problems at all. Everything is running at 3.3V.

Anyone with the knowlede to solve this?
I agree something is funky with your sensor.  What resistor value are you using for your pullups, and which Arduino are you using?

To me it looks like your Sensor is not able to pull SDA completely Low .  That ACK pulse is at 1V.  It should be alot closer to Zero volts.

Post a schematic.  If you are breadboarding the circuit.  Add some 100nf (.1uf) caps across your VDD/GND you could be seeing a power glitch issue.

Chuck.
Currently building mega http server 90% done, the Last 10% is killing me.

Potatocheese

#2
Oct 12, 2017, 02:27 pm Last Edit: Oct 12, 2017, 02:33 pm by Potatocheese
Currently I have tried 1.2K, 2K and 10K as pullup. Where 1.2K were the recommended for the sensor. Looking at the signal I see that the signal is a bit more square with the 1.2K and 2K. So far I have tested with a 3.3V Uno and a 5v leonardo. For the Leonardo I used a logic level converter.

I currently use a breadboard. I have added the schematic for two different setups I have tried. I tried adding and removing a 100nf cap between Vcc and GND but could se no difference in the signal output.

Now I use a setup where I have added the MPU6050 to the bus, since it have built in pullups and caps. With this setup I get the cleanest signal. This setup is also the one for the picture in the first post. The MPU6050 works exactly as intended but the TLV493D gives the funky acknowledge signal. However the problem looks quite equal in all the different setups I have tried.

I'm going to test if the speed of the I2C has anything to say.

pylon

Quote
So far I have tested with a 3.3V Uno
To my knowledge there's no UNO working at 3V3. Please post a link to that product.

Try making a read first before you write to the chip. The datasheet says you should read bytes 7,8 and 9 first. It doesn't tell anything what happens if you don't follow that order. It would be very strange if this order is enforced but there is a small chance.

Potatocheese

To my knowledge there's no UNO working at 3V3. Please post a link to that product.
3.3v supply is because I have changed the regulator. But the 328P does support it and so far it have worked without problems. I don't think that's the issue either since I get the same problem on the Leonardo.

Try making a read first before you write to the chip. The datasheet says you should read bytes 7,8 and 9 first. It doesn't tell anything what happens if you don't follow that order. It would be very strange if this order is enforced but there is a small chance.
I have also tied this. Both with my own code and code other people have written. In this case it should not pull the akw bit down at all.

Potatocheese

Tested 400kHz 100KHz and 10Khz clock speed and still does not work. I'm gonna hook it up to a oscilloscope later today so I can see if it does anything to the signal other than changing the speed.

pylon

Quote
But the 328P does support it
It's outside the specs. On 3V3 the ATmega328p support up to about 12MHz, anything above that is outside the specs and may fail.

Quote
I have also tied this. Both with my own code and code other people have written. In this case it should not pull the akw bit down at all.
It should do exactly the same, at least for the first byte to acknowledge the received address. But I don't think that this is your problem. Did you try with a second chip? Maybe the chip is simply broken.

Potatocheese

Maybe the chip is simply broken.
I'm starting to wonder if this is the actual problem. However every time one come to the conclusion that the IC is bad, it's always something else. I'll test another chip and see what happens.

Potatocheese

Just tested another chip, still the same problem. So it's probably not the chip

Potatocheese

Solved it! It turned out that that not all the GND pins on the IC were internally connected  >:(  . Some people just want to watch the world burn.

Go Up