Beaglebone cape seems to not function


#1

It appears that my cape is not working correctly. I've installed it on a new Beaglebone A6, and I've written the Ubuntu image to a SD card, and the bone boots just fine. I can ssh into it, the cockpit comes up fine, etc. (I've also tested things in Angstrom because there are more diagnostic tools in that distro). But the LEDs on the cape don't light up, and there's no mention of it in dmesg:

$ dmesg | grep "cape"

[ 0.104034] cape: pcm register
[ 0.310455] BeagleBone cape EEPROM: could not read eeprom at address 0x54
[ 0.370483] BeagleBone cape EEPROM: could not read eeprom at address 0x55
[ 0.430511] BeagleBone cape EEPROM: could not read eeprom at address 0x56
[ 0.490539] BeagleBone cape EEPROM: could not read eeprom at address 0x57
[ 0.490570] BeagleBone cape: initializing mmc
[ 0.490936] BeagleBone cape: exporting ADC pins to sysfs
[ 0.491424] BeagleBone cape: exporting SPI pins as spidev
[ 0.491790] BeagleBone cape: initializing w1-gpio

I don't think the cape is even powering up, because, like I said, no LEDs, and using Angstrom, I can't read the contents of the EEPROM:

root@beaglebone:/var/lib/cloud9# node bonescript/eeprom.js
Reading EEPROM at /sys/bus/i2c/drivers/at24/1-0050/eeprom
Reading EEPROM at /sys/bus/i2c/drivers/at24/1-0051/eeprom
Unable to open EEPROM at /sys/bus/i2c/drivers/at24/1-0051/eeprom: Error: ETIMEDOUT, connection timed out
Reading EEPROM at /sys/bus/i2c/drivers/at24/3-0054/eeprom
Unable to open EEPROM at /sys/bus/i2c/drivers/at24/3-0054/eeprom: Error: ETIMEDOUT, connection timed out
Reading EEPROM at /sys/bus/i2c/drivers/at24/3-0055/eeprom
Unable to open EEPROM at /sys/bus/i2c/drivers/at24/3-0055/eeprom: Error: ETIMEDOUT, connection timed out
Reading EEPROM at /sys/bus/i2c/drivers/at24/3-0056/eeprom
Unable to open EEPROM at /sys/bus/i2c/drivers/at24/3-0056/eeprom: Error: ETIMEDOUT, connection timed out
Reading EEPROM at /sys/bus/i2c/drivers/at24/3-0057/eeprom
Unable to open EEPROM at /sys/bus/i2c/drivers/at24/3-0057/eeprom: Error: ETIMEDOUT, connection timed out
Reading EEPROM at test-bone.eeprom
Unable to open EEPROM at test-bone.eeprom: Error: ENOENT, no such file or directory 'test-bone.eeprom'
Reading EEPROM at test-cape.eeprom
Unable to open EEPROM at test-cape.eeprom: Error: ENOENT, no such file or directory 'test-cape.eeprom'
{
"/sys/bus/i2c/drivers/at24/1-0050/eeprom": {
"header": "aa5533ee",
"boardName": "A335BONE",
"version": "00A6",
"serialNumber": "4312BB000306",
"configOption": "0000000000000000000000000000000000000000000000000000000000000000",
"type": "bone"
}
}

Any suggestions for further diagnostics, or do I just have a bad cape?

Best regards,

Blake


#2

How are you powering the BB and the cape?


#3

Didn't think of that. I was powering over usb. I switched to a 5v/1A wall supply, and now one of the cape LEDs lights up. The output of dmesg hasn't changed, and I can't seem to upload a sketch to the arduino. Do I need to power this thing through the cape for complete funtionality? I haven't begun to build my rov, but I figured the beaglebone could power the cape. I just want to play with the software for the time being.


#4

as far as i know its the cape that powers the beaglebone, so apply 12V to the V_IN connection on the left side of the cape when looking at the ethernet connector.


#5

Right, cape needs the 12V and the cape powers the BB.


#6

Where can I find more information about the power requirements for the cape? Is it strictly requiring 12v, or is it tolerant of a range of voltages, say, anything between 11v to 16v? I guess, while I'm asking, how much of a motor can the thing power? I suppose I could look at the schematic and pull the datasheets for the ICs involved, but I'm hoping someone knows off the top of their head.


#7

https://github.com/OpenROV/openrov-electronics/blob/master/BeagleBone%20OpenROV%20Cape%20Rev%20A1.PDF

7-40V input rating. and can give out 12V/up to 1amp on the AUX outputs.

absolute max consumption of the cape is probably in the area of 25W(5V@2A + 12V@1A + loss)

the board has switch regulators so its fairly efficient.

The cape has no limit to what motors it handles, because it only sends signals to the ESC that drives the motors. the ESC in the kit has a 18amp rating and maximum 12V. with bigger ESCs you can drive bigger motors.


#8

I've got the same symptoms as Blake (dmesg) , but I'm powering the cape with 12V (PC power supply).

Beaglebone boots fine, cockpit comes up, camera works, but when sending the Arduino Firmware to the cape, output.log constantly reports:

Setting up uploader
avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

Initiating arduino reset
upload failed, trying again.
avrdude: stk500_recv(): programmer is not responding avrdude done. Thank you.
Initiating arduino reset
upload failed, trying again.
avrdude: stk500_recv(): programmer is not responding avrdude done. Thank you.
Initiating arduino reset
upload failed, trying again.
avrdude: stk500_recv(): programmer is not responding avrdude done. Thank you.
Initiating arduino reset

Each time the arduino reset is carried out, a red LED blinks on the cape for a short time, but beyond that, nothing happens.

I'm stuck here - any ideas?

Kind regards,

Stefan


#9

Stefan's output from the arduino upload mimics my problem. Since my last post, I've soldered a terminal block to my cape, and I'm now powering the bone through the cape. I've tried various DC power supplies to no avail. I've also confirmed that the solder joints on the terminal block are sound.

In my testing, I've come closer to conviction that the eeprom on the cape isn't talking to the bone, or it hasn't been written with any firmware. I've perused through the git repositories and I can't find the code that needs to be flashed to the cape. FWIW, I have had bones and several capes for a while now, some of which I've had to flash code to (I'm looking at you DVI cape). Is the code for the eeprom available? Would probing the test points help at all in diagnosis, and what should I expect for readings?

Best regards,

Blake


#10

When I looked at the log after loading a new sketch, I also noticed it made many tries to reset/sync (I don't have the exact text handy) before it eventually worked. This may be an area to investigate.

If you have an arduino available, you can swap atmega chips and load the sketch that way (since the atmega is socketed on the cape).

Jim


#11

The ATMEGA on the cape comes with no firmware on it. It should only be loaded with the arduino bootloader.

I had the same problem on my cape as well, and at the end I just removed the chip from the socket, put on a normal arduino, loaded the arduino code from it and then put it back to on the cape.

Definitely it's something we should fix in the uploading code.


#12

Simone, thanks for your advice. Unfortunately, I’ve no Arduino board at hand (but I’m thinking of buying one now).

As far as I understand now, the Arduino bootloader is already on the ATMega328 that came with the cape, but the problem is in the uploading code? Well, maybe we can fix that…

Kind regards,

Stefan


#13

Stefan,

It's not entirely clear for me if you work with the official OpenROV image (Ubuntu).

If not, you need to make sure that you run the reset and setuart scripts in the Linux directory of the openrov-software repo on system startup as root.

In the official image, this is executed by /etc/rc.local.

This sets the needed GPIO port configurations for the serial port and the reset circuit.

Can you check this?

- Dominik


#14

Dominik,

I used the Image you provided in your blogpost at https://github.com/OpenROV/openrov-image/blob/master/README.md#windows-solution. First, when I used the SD card included in the kit I was not able to connect to the beaglebone via ethernet. My router was not able to give it an IP address via DHCP, nor did it work with a direct link and assuming a static IP adress (192.168.254.1) of the beaglebone.

Using the image from your blogpost, I could establish an ethernet connection to the beaglebone with no problems. I sucessfully ran the update.sh script and also ran the setuart.sh and the reset.sh scripts manually several times during testing.

Trying tho upload the code to the Arduino (from the Cockpit or using firmware-upload.sh) still fails with repeatedly reporting:

avrdude: stk500_recv(): programmer is not responding avrdude done

On the cape, LED1 (green) is on permanently, while LED3 (red) gives some short flashes every time the reset.sh script is run (directly or during running firmware-upload.sh).

BTW: I noticed that the reset script suggested in http://wiki.openrov.com/index.php/Troubleshooting differs from that coming with the image, but I guess the first information is outdated?

- Stefan


#15

I fixed it now. I just did what Simone suggested. I put the ATMega328 to an Arduino Uno board, uploaded the Sketch, and put the microcontroller back to the Cape. Thanks to all for your support!

Kind regards,

Stefan