Problem BeagleBoneBlack + MotorBridgeCape

Hi,

We are 4 students working in biomedical and mechanical engineering.

We are trying to control 6 servos to control a robotic arm. We are using the BeagleBoneBlack and the motor bridge cape. But we have a big problem. When we supply external voltage to the cape, the BeagleBoneBlack stop instantaneously and we can’t communicate with the BB anymore.

Do you know what can be the problem ? :?:

Thanks,

Cheers! :smiley:

Léa

Dear costumer:



I have got your problem. The MoterBridgeCape v1.0 's working voltage is between 6 and 15V. Please check if your supply is in this voltage range. And when your system is working ,please don’t adjust the supply voltage randomly because it will affect the system stability.

Hello,



Which image are you and your people using?







uname -a <<<< use this command to find out







The BBB and other variations run on another battery supply. Do not try to run both the Motor Bridge Cape and BBB off the same power supply.







The BBB runs off of 5v or 3.3v only. You can run your Motor Bridge Cape off a 12v 1.3 Ah lead acid battery.



Seth



P.S. If this is not the issue, please contact me. You may have to set up config-pin on specific pins so the Cape can communicate w/ the BBB. Once you have set up the config-pin utility, you may need to also figure out how to make the config-pin set up on boot or you will have to apply it each time in user space.

Hi,

When I connect the motorbridgecape to BBB, I could measure a Voltage of 19.18V(DC) in the battery pins(between 4 and 5) even without connecting any battery. Is that normal? if so, when I run the test code, I could not run my stepper motor. Any help is much appreciated.

Hi,

Thanks for your help.

I am having problem in the cape. When I connect the motorbridgecape to BBB, I could measure a Voltage of 19.18V(DC) in the battery pins(between 4 and 5) even without connecting any battery. Is that normal? if so, when I run the test code, I could not run my stepper motor. Any help is much appreciated.

Hello,



I am not completely sure about the voltage you have specified here. If you have a battery bank, use that for the BBB w/ USB and then use a normal 12v lead acid battery for your Motor Bridge Cape. Please remember that the two devices each need a separate battery supply.



Oh and in the MotorBridge.py software library, try this: they just changed it two days ago.

</s>import Adafruit_GPIO.I2C as I2C import Adafruit_BBIO.GPIO as GPIO import time Reset = "P9_23" MotorBridge = I2C.Device(0x4b, 2) GPIO.setup(Reset, GPIO.OUT)<e>





See the line MotorBridge = I2C.Device(0x4b, 2): this is supposed to be this way now. Oh and what does the cmd uname -r or uname -a provide?



For the newer images, config-pin is used. You can find more on config-pin here: <LINK_TEXT text=“https://github.com/adafruit/adafruit-be … config-pin”>https://github.com/adafruit/adafruit-beaglebone-io-python#config-pin</LINK_TEXT>.



So, if you know that the Cape is connected at P9_19 and P9_20, use config-pin to set up your Cape for communicating w/ the BBB w/ these ideas:

[list]

  • sudo config-pin P9.19 uart
  • [/list]

    and…

    [list]

  • sudo config-pin P9.20 uart
  • [/list]

    This should allow for communication b/t the BBB and the Motor Bridge Cape.







    Please provide which software example you are using, I can probably help you. Oh and if you need to revert back to a previous version of Adafruit_BBIO to make this work, I can help you w/ this idea too. If you do not want my help w/ reverting back to the older Adafruit_BBIO library, you can find their info. at GitHub at this address: <LINK_TEXT text=“https://github.com/adafruit/adafruit-be … -io-python”>https://github.com/adafruit/adafruit-beaglebone-io-python</LINK_TEXT>.



    And…I know this is getting lengthy:







    Adafruit.com has Forums at this address: <LINK_TEXT text=“https://forums.adafruit.com/viewforum.p … 9b94b3af2d”>https://forums.adafruit.com/viewforum.php?f=49&sid=f62f9a64ba732a1ea7c3de9b94b3af2d</LINK_TEXT>. If you look at a couple of my posts, you will find some background info. on reverting the Adafruit_BBIO back to previous versions. Oh and my name on that forum is silver2row.



    Seth



    P.S. If you get bored of this info, please contact me w/ specifics.

    Hi Seth,

    Thank you for your reply. I changed the code accordingly and it works.



    For some reason, the BBB died after executing the code. With that BBB, it read an output voltage of 19.2V between pins 4 and 5. It sent an output voltage of 19.2V when an external power supply unit is connected. After replacing the BBB with a new one, the voltage between 4 and 5 is 5V . The motor that I use for my work requires voltage more than 5V and when it is connected to an external power supply (>5V) it worked.



    Thanks for your help.

    Hello krish,



    Seth here. I am glad things worked out. Did you have to revert back to 1.0.3 for the Adafruit_BBIO library?



    Or…



    Did you use the new software which is on Github.com, i.e. for both Adafruit_BBIO and the MotorBridge.py file at github.com?



    Seth



    P.S. If you get bored and if you are likely to share, I would like to know more about your project. Reply if you feel comfortable.

    Sorry and Hello,



    krish…Seth here, again. Here is some starter software that makes the board idle in a straight, u-turn one way, straight, u-turn another way, mode.



    Seth



    P.S. Here it is. Oh and if you can provide some feedback, I would like that. You can find it here: <LINK_TEXT text=“https://github.com/silver2row/MotorBrid … /mbcUse.py”>https://github.com/silver2row/MotorBridgeCapeforBBG_BBB/blob/silver2row-patches/BBG_MotorBridgeCape/mbcUse.py</LINK_TEXT>.

    [code]import MotorBridge
    import time

    MotorName = 1
    MotorName = 2
    ClockWise = 1
    CounterClockWise = 2
    PwmDuty = 90
    Frequency = 1000

    if name==“main”:
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 51):
    motor.DCMotorMove(1, 1, 90)
    motor.DCMotorMove(2, 1, 90)
    #print “I got your biscuit, now!”

    #Making a U-Shape in the lawn
    #Left motor on chassis goes while the right motor ccw
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 3):
    motor.DCMotorMove(1, 1, 90)
    motor.DCMotorMove(2, 2, 90)
    #print “I love Jim’s TURN!”

    #All Flanks…Straight Ahead!
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 51):
    motor.DCMotorMove(1, 1, 90)
    motor.DCMotorMove(2, 1, 90)
    #print “Give in to temptation!”

    #Make another U-Turn but this time, motors go in the opposite direction!
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 3):
    motor.DCMotorMove(1, 2, 90)
    motor.DCMotorMove(2, 1, 90)

    #Straight Ahead
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 51):
    motor.DCMotorMove(1, 1, 90)
    motor.DCMotorMove(2, 1, 90)
    #print “Tacos are not all around here!”

    #etc
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 3):
    motor.DCMotorMove(1, 1, 90)
    motor.DCMotorMove(2, 2, 90)

    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 51):
        motor.DCMotorMove(1, 1, 90)
        motor.DCMotorMove(2, 1, 90)    
    
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 3):
        motor.DCMotorMove(1, 2, 90)
        motor.DCMotorMove(2, 1, 90)
    
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 51):
        motor.DCMotorMove(1, 1, 90)
        motor.DCMotorMove(3, 1, 90)
    
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(3, 1000)
    for i in range(1, 3):
        motor.DCMotorMove(1, 1, 90)
        motor.DCMotorMove(2, 2, 90)
    
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 51):
        motor.DCMotorMove(1, 1, 90)
        motor.DCMotorMove(2, 1, 90)        
    
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 3):
        motor.DCMotorMove(1, 2, 90)
        motor.DCMotorMove(2, 1, 90)
        
    motor = MotorBridge.MotorBridgeCape()
    motor.DCMotorInit(1, 1000)
    motor.DCMotorInit(2, 1000)
    for i in range(1, 51):
        motor.DCMotorMove(1, 1, 90)
        motor.DCMotorMove(2, 1, 90)
        time.sleep(1500)<e>[/code]</e></CODE></r>

    Hi Seth,

    I did not do any changes to the code “motorbridge.py” except changing i2c as GPIO.I2C and I2C.Device(0x4b,2). However, I reinstalled GPIO.I2C library from github.

    Thanks for your help.