Problem with Motor Bridge Cape

Moderators: lily.li, violet, salmanfarisvp, seth.welday

cpendleton
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Tue Apr 05, 2016 8:27 am

Problem with Motor Bridge Cape

Post by cpendleton » Tue Apr 05, 2016 8:36 am

Hello. I hope you had a pleasant Qingming Holiday.

I recently purchased several Motor Bridge Capes and BBGs as the core of a motor control solution. It seems that my setup is not working correctly. The BBG cannot seem to detect the ST coprocessor over the I2C interface. I followed your setup guide at http://www.seeedstudio.com/wiki/Motor_Bridge_Cape_v1.0. I have experience with I2C on BBB/Linux, but I am not sure how to proceed here. Help would be appreciated. Descriptions and images below. Thanks in advance.

Configuration:
-Motor Bridge Cape connected to BBG.
-Ethernet connected to BBG.
-DC power supply running @ 12V connected to Battery +/ screw blocks (see image).
-BBG running preloaded eMMC Debian Image 2015-10-20.
-MotorBridgeCapeforBBG_BBB python software installed (https://github.com/Seeed-Studio/MotorBr ... forBBG_BBB).

Observations:
-BBG runs ok.
-PWR LED on Motor Bridge Cape is lit.
-MotorBridgeCapeforBBG_BBB python software shows error “Error accessing 0x4B: Check your I2C address” (see image).
-Linux command “i2cdetect -y -r 1” shows no device at 0x4B, or any other address (see image).
20160403_201457.jpg
20160403_201506.jpg
python.png
i2cdetect.png

cpendleton
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Tue Apr 05, 2016 8:27 am

Re: Problem with Motor Bridge Cape

Post by cpendleton » Wed Apr 06, 2016 9:08 am

It is also worth noting that I tried this with a second Motor Bridge Cape unit paired with a BBB (not a BBG) and saw the same result. It seems unlikely that I would have 2 faulty Motor Bridge Cape units? I must be missing something here?

I have one more unopened Motor Bridge Cape unit that I can test with. Thanks!

xiangnan.qu
Staff
Staff
Posts: 2
Joined: Thu Oct 16, 2014 9:24 am

Re: Problem with Motor Bridge Cape

Post by xiangnan.qu » Mon Apr 11, 2016 6:24 pm

Hi,

Please try the following steps:

1, Connect cape to your BBG/BBB, download http://www.seeedstudio.com/wiki/images/ ... e_v1.0.zip to your BBG/BBB
2, unzip the file
3, Goto the directory Motor Bridge Cape V1.0 (cd Motor Bridge Cape V1.0)
4, upload firmware (make flash_firmware)

cpendleton
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Tue Apr 05, 2016 8:27 am

Re: Problem with Motor Bridge Cape

Post by cpendleton » Mon Apr 11, 2016 10:55 pm

Thanks, Xiangnan. Everything works after following your instructions to flash the co-processor firmware.

A few questions:

1) Did the units ship without firmware, or with the wrong firmware? I ordered 3 of these from Digikey, and 2 of these have this problem. I will try the 3rd unit. I might suggest that you post these instructions in your product page for your customers.
2) Do you make the source code for the co-processor firmware available?
3) Is it possible to stack these capes to add more motor control channels. I realize that there would need to be a way to set the I2C address of each co-processor, and there is the issue of power.

Thanks,
Chris

fuhua.chen
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Mon Apr 18, 2016 10:09 am

Re: Problem with Motor Bridge Cape

Post by fuhua.chen » Mon Apr 18, 2016 1:46 pm

Hi Chris,

Sorry for this problem and thanks for your feedback!

for your question:

1. We made a mistake in uploading the firmware and it leads to the problem you found.We will update the wiki to let you and other customers know how to solve this problem.

2.We will upload the source code soon.If you want it now, please share me your email address. If you find any other problem, please notify us. Thanks! :D

3.There is a register(addr: 0X08) which is used for setting the I2C address. But it will be reset as 0X4B if the cape restarted( after you wrote one byte address into 0X08, you should change your I2C address and do not reset the cape). I have reviewed the source code and find that it will come into conflict with some commands.This has been solved in latest version.

cpendleton
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Tue Apr 05, 2016 8:27 am

Re: Problem with Motor Bridge Cape

Post by cpendleton » Mon Apr 18, 2016 10:54 pm

Hello Fuhua. Thanks for the response.

I would like to take a look at the source code if possible. My email is cpendleton@ptcusa.com.

Regarding the I2C address, I don't understand how that approach would work. If I stack the capes and they are both at address 0x4B on the same I2C bus, there will be an address conflict. How would I use the register setting to change only one of the cape boards?

Thanks,
Chris

fuhua.chen
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Mon Apr 18, 2016 10:09 am

Re: Problem with Motor Bridge Cape

Post by fuhua.chen » Tue Apr 19, 2016 11:16 am

cpendleton wrote:Hello Fuhua. Thanks for the response.

I would like to take a look at the source code if possible. My email is cpendleton@ptcusa.com.

Regarding the I2C address, I don't understand how that approach would work. If I stack the capes and they are both at address 0x4B on the same I2C bus, there will be an address conflict. How would I use the register setting to change only one of the cape boards?

Thanks,
Chris

In the development process, i have not considered this stuiation(stack capes).I2C address changed just for interim use. But now, I have modified the source code to realize the function.

once you change the I2C address, It will not be used immediately. You should send another command to save it into flash and restart the capes automatically. It will load the new address to initialize I2C. For the details, i will tell you via email. Please kindly check the email. And if you have other good advices, please share me. :D

alvinmarquez7
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Thu Apr 21, 2016 3:13 am

Re: Problem with Motor Bridge Cape

Post by alvinmarquez7 » Thu Apr 21, 2016 3:20 am

Getting the same error as OP, with very similar setup so far except using BBB and using Debian GNU/Linux 8 2016-01-24

When I try to flash the firmware using (make flash_firmware) I get an error though. I'm relatively new with BBB, so I'm not sure if there are other ways to 'flash the firmware.'


Thanks in advance.

EDIT: I have tried using chmod a+x to give me permission to execute, and then came across a problem with dev/tty02 in the flasher, which I changed to dev/tty2 (to match what was in my /dev list), but still no luck in successfully flashing the firmware.

qxn.c
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Wed Apr 20, 2016 6:30 pm

Re: Problem with Motor Bridge Cape

Post by qxn.c » Fri Apr 22, 2016 10:36 am

alvinmarquez7 wrote:Getting the same error as OP, with very similar setup so far except using BBB and using Debian GNU/Linux 8 2016-01-24

When I try to flash the firmware using (make flash_firmware) I get an error though. I'm relatively new with BBB, so I'm not sure if there are other ways to 'flash the firmware.'


Thanks in advance.

EDIT: I have tried using chmod a+x to give me permission to execute, and then came across a problem with dev/tty02 in the flasher, which I changed to dev/tty2 (to match what was in my /dev list), but still no luck in successfully flashing the firmware.

Hi,

Did your BBB boot with the latest system image from BeagleBone forum?
If so, you have to enable the Serial port 2. It was not enabled by default.

To enable serial port 2, add a line with "cape_enable=bone_capemgr.enable_partno=BB-UART2" to /boot/uEnv.txt and reboot your device. Change the port back to dev/ttyO2 in flasher file.

Hope this can solve your problem, Let me know if further detail/explanation would be helpful.

silver1row
Pre-kindergarten
Pre-kindergarten
Posts: 34
Joined: Mon Apr 25, 2016 7:39 am
Contact:

Re: MotorBridgeCape

Post by silver1row » Mon Apr 25, 2016 7:49 am

Hello,

I read what was available in this forum. I am getting an issue:

• Error accessing 0x4B: Check your I2C address

I have a MotorBridgeCape with a BBG. I attached two motors and a battery. I used the PuTTY to run my python program I got from the MotorBridge Wiki.

Do I need to update firmware for the MotorBridgeCape or allow the serial bus with python-smbus?

I am new to these issues and I need support.

Seth
silver2row on GitHub

P.S. If someone knows the answer, please try to contact me. Oh and here is a photograph/video. It is my PuTTY Terminal. I cannot access the .zip file once I unzipped it. Please provide support.

https://youtu.be/lqNmfVogOd8

Post Reply