I2C SCL Voltage level too low?

177 views
Skip to first unread message

yassyass

unread,
Apr 5, 2018, 12:50:59 AM4/5/18
to BeagleBoard
Wrote a python script using SMBus to write to a slave I2C device. The slave is detectable with i2cdetect which results in the following output

debian@beaglebone:~$ i2cdetect -y -r 2

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

30: 30 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

70: -- -- -- -- -- -- -- --    


The slave device would not respond to commands and upon inspecting it with a scope the voltage signal is appearing lower than the high threshold and has a very high time constant it seems. 


The slave device has its own internal pull-up resistors of two 4.7k resistors one on each of the buses to the 3V supply on the BBB.


The frequency of the bus is set to 400kHz on i2c-2. The BBB is being powered by USB only. 


The following images are of the SCL bus


Could the issue be that the pull up resistors are too high? Does the BBB require more power via an external source?



evilwulfie

unread,
Apr 5, 2018, 12:53:42 AM4/5/18
to beagl...@googlegroups.com
I use 5.6k resistors. I think what your seeing is a slow scope.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/5f323c46-4809-4f8f-aeb8-cb390d3288c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yassyass

unread,
Apr 5, 2018, 1:06:53 AM4/5/18
to BeagleBoard
Thanks Wulf, I will attempt to increase the resistor values and get back with results.

John Syne

unread,
Apr 5, 2018, 1:22:35 AM4/5/18
to beagl...@googlegroups.com
You mean decrease the resistor values. Don’t rely on the internal pull up resistors. 4K7 should be OK, but try 3K3 to see if the signals look better. 

Regards,
John





On Apr 4, 2018, at 10:06 PM, yassyass <yasir...@gmail.com> wrote:

Thanks Wulf, I will attempt to increase the resistor values and get back with results.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

yassyass

unread,
Apr 5, 2018, 1:32:09 AM4/5/18
to BeagleBoard
I only managed to get hold of a couple 1k resistors and wired them up to the 3v3 rail and got improvements. I am going to assume the internal pullups on the I2C device were not enabled. 

yassyass

unread,
Apr 5, 2018, 1:58:15 AM4/5/18
to BeagleBoard
With the 1k resistors improvement is evident in terms of voltage level for the high signal.


However the rise time still seems to be slow and I2C device is still not responding to commands. 




I will try and increase the resistance to 3k3 as advised by John and will report back with results.


Graham

unread,
Apr 5, 2018, 11:02:04 AM4/5/18
to BeagleBoard

 It looks like you have some extra capacitance on the bus.  There should not be any capacitors bridging the I2C data and clock lines. Some of the third-party universal interface cards have extra capacitance, so take those off.

I have never heard of an I2C part with built in pull-up resistors.

Do to the multi-drop nature of the I2C bus, pull up resistors are almost always external. There are some "weak pull up" resistors you could turn on in the BBB, but are too high in value for most applications.

I suggest you read up on how to select pull up resistors for an I2C bus.  Phillips (now NXP) initially developed the bus and has good documentation.
Google: NXP I2C bus documentation

But the short answer is that for a 3.3V bus, resistors in the range of 1.2K to 3.3K should work fine. The value is not critical. You want to pull 1 to 3 mA through the resistor when the bus is low.

--- Graham

==






John Syne

unread,
Apr 5, 2018, 5:49:48 PM4/5/18
to beagl...@googlegroups.com
Yeah, I agree there is something else going on here. with a 1K resistor, the signals should not have a slow rising time. The rise time doesn’t look like a capacitor, but I agree, that is about the only explanation that would cause the rise time to slow like this. Maybe the I2C part is faulty. Try plugging in another I2C part to see if the problem persists. 

Regards,
John





--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

yassyass

unread,
Apr 9, 2018, 10:15:58 PM4/9/18
to BeagleBoard
Thank you John,

It seems like my scope was loading it quite a bit and is now giving much better readings using x10 probes. The signals bellow are set to 400 kHz using 1kOhm pull-ups

John Syne

unread,
Apr 10, 2018, 12:13:18 AM4/10/18
to 'Roberts Maria' via BeagleBoard
Yeah, that is much better. Not sure you have to use a 1K pullup. See if a 3K3 or a 4K7 does gives you clean signals. BTW, your earth pin on your scope is too long and that is why you are seeing noisy signals. Search google for "scope probe short ground” and look at the images on how to do this. 

Regards,
John





Reply all
Reply to author
Forward
0 new messages