Souvik Bagchi
Posts: 17
Joined: Tue May 13, 2014 10:04 am

i2c troubleshooting

Sun Jun 22, 2014 10:50 pm

When i check the list of modules it shows that i2c-tools is available, but when i type 'sudo i2cdetect -y 1' i dont see anything happening. I have configured the blacklist file and added i2c-dev where necessary. Also when i connect the MPU 6050 i can see the light blink but again when i type the above statement nothing happens. Please help with this issue. Thanks

User avatar
joan
Posts: 14074
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2c troubleshooting

Sun Jun 22, 2014 10:54 pm

What connections have you made between the Pi and the MPU6050? A photo might be useful.

rickseiden
Posts: 411
Joined: Thu Aug 02, 2012 12:21 pm
Location: Buffalo, NY, USA

Re: i2c troubleshooting

Sun Jun 22, 2014 10:59 pm

Souvik Bagchi wrote:When i check the list of modules it shows that i2c-tools is available, but when i type 'sudo i2cdetect -y 1' i dont see anything happening. I have configured the blacklist file and added i2c-dev where necessary. Also when i connect the MPU 6050 i can see the light blink but again when i type the above statement nothing happens. Please help with this issue. Thanks
Depending on you RPi, I think you might have to do sudo i2cdetect -y 0 instead.
There are 10 types of people in this world. Those that understand binary, and those that don't.

Souvik Bagchi
Posts: 17
Joined: Tue May 13, 2014 10:04 am

Re: i2c troubleshooting

Mon Jun 23, 2014 9:09 am

rickseiden wrote:
Souvik Bagchi wrote:When i check the list of modules it shows that i2c-tools is available, but when i type 'sudo i2cdetect -y 1' i dont see anything happening. I have configured the blacklist file and added i2c-dev where necessary. Also when i connect the MPU 6050 i can see the light blink but again when i type the above statement nothing happens. Please help with this issue. Thanks
Depending on you RPi, I think you might have to do sudo i2cdetect -y 0 instead.

My board revision is 000e.
I have tried both -y 0 as well as -y 1
Both didn't work

Souvik Bagchi
Posts: 17
Joined: Tue May 13, 2014 10:04 am

Re: i2c troubleshooting

Mon Jun 23, 2014 11:18 am

joan wrote:What connections have you made between the Pi and the MPU6050? A photo might be useful.
I have connected the
GND --> Pin 6 (GND)
VCC--> pin 1 (3.3V)
SDA --> pin 3 (SDA0)
SCL --> pin 5 (SCL0)

[img][IMG]http://i60.tinypic.com/30c6fxz.jpg[/img][/img]

this is what happens when i input the commands.. no output, terminal keeps on running

[img][IMG]http://i62.tinypic.com/2cfejj9.jpg[/img][/img]

As you can see the lights are on but i still got no output.

User avatar
joan
Posts: 14074
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2c troubleshooting

Mon Jun 23, 2014 11:39 am

Does that breakout board have a pin labelled VIO (or similar)? If it does connect that pin to 3V3 as well.

rickseiden
Posts: 411
Joined: Thu Aug 02, 2012 12:21 pm
Location: Buffalo, NY, USA

Re: i2c troubleshooting

Mon Jun 23, 2014 11:42 am

Souvik Bagchi wrote:
joan wrote:What connections have you made between the Pi and the MPU6050? A photo might be useful.
I have connected the
GND --> Pin 6 (GND)
VCC--> pin 1 (3.3V)
SDA --> pin 3 (SDA0)
SCL --> pin 5 (SCL0)

[img][IMG]http://i60.tinypic.com/30c6fxz.jpg[/img][/img]

this is what happens when i input the commands.. no output, terminal keeps on running

[img][IMG]http://i62.tinypic.com/2cfejj9.jpg[/img][/img]

As you can see the lights are on but i still got no output.
Can you post a picture of the connections to the Pi?
There are 10 types of people in this world. Those that understand binary, and those that don't.

User avatar
joan
Posts: 14074
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2c troubleshooting

Mon Jun 23, 2014 12:42 pm

I wonder what your i2cdetect is doing? Mine always display the grid.

Code: Select all

soft /ram $ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
soft /ram $ i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
soft /ram $ 

Souvik Bagchi
Posts: 17
Joined: Tue May 13, 2014 10:04 am

Re: i2c troubleshooting

Mon Jun 23, 2014 6:34 pm

joan wrote:Does that breakout board have a pin labelled VIO (or similar)? If it does connect that pin to 3V3 as well.
No it doesn't have that
it has VCC
GND
SDA
SCL
XDA
XCL
AD0
INT

now im worried cause i don't think i2cdetect is working at all
it doesn't show me any output if when i type i2cdetect -y 1

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: i2c troubleshooting

Mon Jun 23, 2014 6:51 pm

Whose breakout board would help?

Also beware there are differences between MPU6000 and MPU6050 on the pinouts for SDA and SCL.

Also beware of the cirucuit of the breakout board and be sure that they have labelled SDA/SCL pait and XDA/XCL pair correctly. You need to be sure you are on SDA/SCL where MPU6050 is SLAVE, as compared to XCL/XDA whwre the MPU6050 is MASTER.

The Pi only supports itself as master, the fact that i2cdetect produces no output means I would want to check outputs of lsmod etc first before blaiming anything else. Make sure the i2c module is correctly loaded and responding before trying to fault find a device.

What is output of lsmod command and i2cdetect with NO connections to GPIO pins?
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
joan
Posts: 14074
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2c troubleshooting

Mon Jun 23, 2014 6:58 pm

You probably need ADO connected to ground or 3.3V. The one you choose will determine its I2C address.

Your i2cdetect is odd. It probably ought to be similar to my hard machine.

Code: Select all

hard /ram $ ls -l /usr/sbin/i2c*
-rwxr-xr-x 1 root root 14912 Jul 26  2012 /usr/sbin/i2cdetect
-rwxr-xr-x 1 root root 19328 Jul 26  2012 /usr/sbin/i2cdump
-rwxr-xr-x 1 root root 14444 Jul 26  2012 /usr/sbin/i2cget
-rwxr-xr-x 1 root root 18268 Jul 26  2012 /usr/sbin/i2cset
hard /ram $

soft /ram $ ls -l /usr/sbin/i2c*
-rwxr-xr-x 1 root root 13840 Mar  2 23:31 /usr/sbin/i2cdetect
-rwxr-xr-x 1 root root 17940 Mar  2 23:31 /usr/sbin/i2cdump
-rwxr-xr-x 1 root root 13836 Mar  2 23:31 /usr/sbin/i2cget
-rwxr-xr-x 1 root root 17936 Mar  2 23:31 /usr/sbin/i2cset
-rwxr-xr-x 1 root root  5580 Mar  2 23:31 /usr/sbin/i2c-stub-from-dump
soft /ram $ 

Souvik Bagchi
Posts: 17
Joined: Tue May 13, 2014 10:04 am

Re: i2c troubleshooting

Mon Jun 23, 2014 6:59 pm

And yes when i type the command
ls/dev/i2c*

it says that no such file or directory exists.

Does that mean the module i2c-tools hasnt been installed properly ?

User avatar
joan
Posts: 14074
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2c troubleshooting

Mon Jun 23, 2014 7:12 pm

Souvik Bagchi wrote:And yes when i type the command
ls/dev/i2c*

it says that no such file or directory exists.

Does that mean the module i2c-tools hasnt been installed properly ?
Was that a typo? Did you type ls space /dev/i2c* ?

My version of i2cdetect complains if it can't find /dev/i2c-0 or /dev/i2c-1.

Which distribution are you using? Raspbian, Arch?

Try

sudo apt-get update
sudo apt-get purge i2c-tools
sudo apt-get update
sudo apt-get install i2c-tools

What does

lsmod | grep i2c

report?

Souvik Bagchi
Posts: 17
Joined: Tue May 13, 2014 10:04 am

Re: i2c troubleshooting

Mon Jun 23, 2014 8:09 pm

techpaul wrote:Whose breakout board would help?

Also beware there are differences between MPU6000 and MPU6050 on the pinouts for SDA and SCL.

Also beware of the cirucuit of the breakout board and be sure that they have labelled SDA/SCL pait and XDA/XCL pair correctly. You need to be sure you are on SDA/SCL where MPU6050 is SLAVE, as compared to XCL/XDA whwre the MPU6050 is MASTER.

The Pi only supports itself as master, the fact that i2cdetect produces no output means I would want to check outputs of lsmod etc first before blaiming anything else. Make sure the i2c module is correctly loaded and responding before trying to fault find a device.

What is output of lsmod command and i2cdetect with NO connections to GPIO pins?


output of lsmod

[img][IMG]http://i61.tinypic.com/nwizr5.jpg[/img][/img]

while i2cdetect doesn't give any output

Souvik Bagchi
Posts: 17
Joined: Tue May 13, 2014 10:04 am

Re: i2c troubleshooting

Mon Jun 23, 2014 8:15 pm

joan wrote:
Souvik Bagchi wrote:And yes when i type the command
ls/dev/i2c*

it says that no such file or directory exists.

Does that mean the module i2c-tools hasnt been installed properly ?
Was that a typo? Did you type ls space /dev/i2c* ?

My version of i2cdetect complains if it can't find /dev/i2c-0 or /dev/i2c-1.

Which distribution are you using? Raspbian, Arch?

Try

sudo apt-get update
sudo apt-get purge i2c-tools
sudo apt-get update
sudo apt-get install i2c-tools

What does

lsmod | grep i2c

report?
yes that was a typo :/
it shows i2c-0 and i2c-1
I will try to do that.

Souvik Bagchi
Posts: 17
Joined: Tue May 13, 2014 10:04 am

Re: i2c troubleshooting

Wed Jun 25, 2014 3:01 am

Re installing i2c-tools worked.
Thank all of you for your insight and help :)
Good day .

Shresta
Posts: 31
Joined: Sun Jun 30, 2013 3:13 pm

Re: i2c troubleshooting

Wed Sep 03, 2014 3:25 pm

Souvik Bagchi wrote:Re installing i2c-tools worked.
Thank all of you for your insight and help :)
Good day .
May I know how you reinstalled i2c-tools. Im facing a similar problem. When I check using i2cdetect, nothing happens, it just moves to the next line. And Im new to Linux as well. So, if you can share how the re-installing i2c-tools can be done, it will be helpful.

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: i2c troubleshooting

Wed Sep 03, 2014 5:49 pm

Shresta wrote:
Souvik Bagchi wrote:Re installing i2c-tools worked.
Thank all of you for your insight and help :)
Good day .
May I know how you reinstalled i2c-tools. Im facing a similar problem. When I check using i2cdetect, nothing happens, it just moves to the next line. And Im new to Linux as well. So, if you can share how the re-installing i2c-tools can be done, it will be helpful.
Maybe the earlier post that showed

Code: Select all

sudo apt-get update
sudo apt-get purge i2c-tools
sudo apt-get update
sudo apt-get install i2c-tools
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

Return to “Troubleshooting”