I2C Motor Driver, Grove Pi+


#1

I seem to be a high maintenance customer :slight_smile:
I have a RPi2, Grove Pi+, and the I2C Motor Driver. when I plug the driver into the grove pi+, I dont see it. I apply power with a precision power supply and I see LEDs on the board. I run sudo I2CDetect -y 1 and I don’t see the address of the board in the display. No matter what I set the dipswitch address to, I2CDetect does not see the board.
Can someone shed some light as to what I am doing wrong?

thanks!


#2

Hi roujesky,
Are you sure that you are connecting the I2C motor driver to the I2C port and not any other ports. Can you see grovePi on i2cdetect.

No problems with the questions. We are more than happy to help you solving the problems and make our products better for everyone.

-Karan


#3

Hi Karan,
Yes, I have tried it on all 3 ICD ports on the Grove Pi+. I do not think I see the Grove Pi+ on I2CDetect. When I plug the Gesture board into the Grove Pi+, I see it… What is the address of the Grove Pi+? When I run I2CDetect, the first 4 addresses are blank. Does that indicate anything?
BTW: I updated the firmware on the Grove Pi+.

Thanks!


#4

Hey,
Can you post the output of I2C detect command here. So you are able to see the gesture sensor on I2C but unable to see the motor driver. Are you powering the motor driver externally too. I think it needs external power.

-Karan


#5

Hi Karan:
Here it is. 2 Pictures. One is the i2cdetect screeen and the other is a picture of the board showing that the lights are all on. I have the board plugged into a precision power supply. It is supplying 12v.


#6

wouldnt let me add 2 pics… trying second one


#7

ok, here is the other pic. Had to decimate the jpg to fit.


#8

Here are 2 pics with the gesture board. Note that the 2nd run of i2cdetect is the run with only the gesture board attached. i2cdetect seems to detect it…


#9

dont know what happened, so here is the screenshot of the i2cdetect. only interested in the 2nd run… First run was for the motor driver…


#10

Hi roujesky,
So connecting the motor driver to the GrovePi just breaks I2C and no device shows up on I2Cdetect but the gesture sensor shows up on I2C rignt.

-Karan


#11

correct!
I suspect that there is a hardware problem with the grove pi+. and by problem, I mean a bug. as I stated in another thread, I bought a grove base shield, an arduino uno, and plugged the gesture board into that setup and it works. I think it is a hardware problem because I can see the LED is on in the gesture board when plugged into the shield. But, when plugged into the grove Pi+, the led never comes on. This confirms the fact that the gesture board is “blind” when plugged into the grove pi + because the LED is not on, dark. I read 0’s from the gesture register (0x43). The board is on because I can communicate with it and read other registers successfully.


#12

Hey roujesky,
There must be some problem with the firmware or something else on the GrovePi+. We’ll have to investigate a bit more on this at our end. We are still waiting for the sensor to arrive from Seeed so you might have to wait a bit for the solution.

-Karan


#13

Karan:
I am pleased you are continuing your investigation. We are serious about using this configuration. We are also continuing our development/investigation here also. I have discovered something here that is also important. As I stated earlier, I got the Gesture board working on the Arduino setup. I just plugged it in and it worked. Really did not inspect it. Last night, I got to looking at the grove shield. It has a switch to operate the board from 3.3v to 5V. The grove pi+ does not have a similar switch…


#14

Hey roujesky,
I just check the product page for the base shield: http://www.seeedstudio.com/depot/base-shield-v13-p-1378.html?cPath=132_134 and it does state that all that switch does is change the VCC on the grove connector from 5V to 3.3V. Very few sensors actually need the 3.3V configuration and the gesture sensor also works on 5V which is what we use on the GrovePI by default.

We’ll update you as soon as we get the gesture sensor and have a chance to try it out at our end. Please do let us know if you make any progress on this too.

-Karan


#15

Thanks, I look forward to hearing your progress.


#16

Moving discussion to this thread concerning the I2C Motor Driver…
Karan:
do you have a I2C motor driver board and some test code? Have you been able to get it to work?

thanks!


#17

Hey roujesky,
Just pushed the code for the motor driver to the Github repo. Do check the examples and driver here: https://github.com/DexterInd/GrovePi/tree/master/Software/Python/grove_i2c_motor_driver.

A quick note though, the motor driver is very sensitive to rogue I2C commands. Even an i2cdetect crashes it and you wont see any other I2C devices including the GrovePi. The only way to recover is the press the reset button on the motor driver.

Can you try it out and let me know how it goes for you.

-Karan


#18

Hi Karan:
I downloaded the PYTHON code for the motor driver. Still no love. I get “Unable to find the motor driver,…” I left the address in the python code as 0x0f and set all the switches on the board to ON. Attached are a couple pictures that show the switch settings and lights are on and the other pic shows it plugged into the I2C port on the Grove Pi board. I tried different ports also…
Tell me what I am doing wrong.

thanks!


#19

Hi roujesky,
Can you try running i2cdetect -y 1 on the Raspberry Pi and see what all addresses does it report. There should be one more address other than the 0x04 which is for the GrovePi. Can you try this and let us know what you see. Also, do remember to press the reset on the motor driver after running the i2cdetect command, because that command causes the motor driver to crash and takes down the I2C bus.

-Karan


#20

Karan:
I ran i2cdetect and I can see both the grove pi and motor driver. But when I run the example python code I get the error. I even modified the example print statement to display the address it was using. (that is the most I have ever done with python!) I am attaching some pictures of the screen. One shows the results of i2cdetect and then the results of the example program. Yes, I did reset the driver board every time. I also am including a pic of the code showing that the address is 0xf. Not sure what else to try. Any ideas?