I cannot get the video feed through from the Low light USB camera. I have tested the camera through the laptop and it works fine. When connecting to the companion it does not show in QGC.
I am working on a new build and in short, this is the current status:
Fathom X cards in ROV and topside is powered
Pixhawk is powered and usb between pixhawk and companion is installed
All ESC is connected but motors still disconnected.
USB camera plugged into one of the USB slots on the companion
Companion just flashed (Did not format it before flashing)
I have uploaded a video hopefully to show the set-up more detailed.
I’m a bit concerned that lengthening the USB cable for the camera may have caused issues. When you say it works when plugged into your laptop, is that through the full length of USB cable that you have installed now?
This section below will have you access the camera start-up script and make sure it is running properly or hopefully see an error message if something went wrong.
If you have checked all of the above and still don’t have a video stream, you can check the video streaming process for errors. Access http://192.168.2.2:8088 or log into the Raspberry Pi via SSH with PuTTY (on windows), or the terminal in Linux or MacOS. The default ip address of the Raspberry Pi is 192.168.2.2, the username is ‘pi’ and the password ‘companion’. After you have logged and enter the following command into the Raspberry Pi command line:
screen -r video
If the camera is working and the video stream is running, the output should end in something like this:
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
To return to the command line and keep the streaming process running, hit control+a then type ‘d’ (to detach).
If the video stream isn’t running the output of the screen command will be:
There is no screen to be resumed matching video.
You can relaunch the video streaming process by entering:
If the output of this command contains something like this:
mmal: Failed to create camera component
Then the camera isn’t working. Double check the camera ribbon cable, and try running sudo rpi-update .
I have just spoken with Johan from JM Robotics and he advised me to try to install a quad hub usb connector in the companion and then the USB camera in the hub. I did like he told me and, Voila, the video is working. !! Very strange that the companion fails to detect the camera without the hub connected.
Poor quality power is probably what is happen, since you are using a long usb cable.
The raspberry supplies around 100mA for each USB port, with a long cable and long impedance, this can result in poor results.
Try to use an external powered USB hub.
Try to remove others USB devices in the raspberry.
Thank you. The companion dont respond when inserting the usb. Can a possible reason for this be that the power/signal is so low that it dosent register the camera? The more powerful USB terminals on the laptop does because its able to send sufficient power and signal trough to the camera ?
EDIT: I have no tested with power from an UBEC directly onto the the USB power wires. The picture were much better but it also remained better when I turned the ubec power off. The companion still don`t recognize the camera unless connected through the hub.
In your video it looks like you have some black-wrapped cables inside the electronics enclosure and a yellow sub-sea cable outside? It also looks to me like the yellow sub-sea cable doesn’t just carry USB signals?
Are any of those true purpose-built USB cables?
In a properly designed, high-quality cable suitable for streaming high-rate data over a long distance, the green/white D+/D- pair isn’t just a twisted pair, it’s a 90 ohm controlled impedance twisted pair arranged with respect to the ground, power cables, and shield so that the D+/D- each have a specific impedance to the shield. The insulation on the twisted pairs is a particular thickness and material to achieve the right impedance, and this is hard to achieve in a hand-built cable or a shielded cable that wasn’t designed specifically for high-speed USB. Higher data rates and longer cable lengths require more precise cable design.
If the D+/D- lines run next to other data lines, the signals could potentially be corrupted. They should only share the inside of a shield with power and ground lines, if anything, and those power and ground lines should have extremely clean power signals running on them.
What works over 10cm (short twisted pair cable supplied by Blue Robotics) won’t necessarily work over a meter or more, even with shielding and careful twisting. And keep in mind that even the highest-quality USB 2.0 cables with precision design are only specified to work up to 5m length.
Lots of commercial USB cables don’t follow all of the cable specification rules either, and sometimes it works but sometimes it doesn’t.
What you are writing seems to be absolutely correct. Last night I removed the fathom tether from the camera and soldered a 2m long USB2 cable to the camera. Camera works fine now. My new setup will be usb cable for the camera and a fathom will remain for signal and power for the servo.
Great! I wish I had a recommendation for a manufacturer-waterblocked USB 2.0 cable that’s designed to be tough enough for real subsea applications, but I haven’t found it. Would love recommendations if you come across something.
In my application, I’ve tried to waterblock the inside of the L-com USB cable jacket with marine epoxy at each enclosure in case of jacket damage. I remove a short section of the cable jacket where it runs through the penetrator, push the shield braid to the side, remove a short section of shielding foil, and try to get marine epoxy in between all of the internal USB wires and the remaining shield braid wires. That way the shield conductor isn’t broken, just a small disturbance of the shield and wires for 6-8mm length, which is fine.
I think if I weren’t so tight on space (so I need a very slim, very flexible cable) I might try to add an outer polyurethane tube as a redundant, tough outer jacket to an unbroken USB cable.
My application is a shallow-water research ROV, and in the final assembly, the cable is inside a cowling. So I’m not operating in a super harsh or high-pressure environment. My main concern to date has been the possibility of getting a leak by damaging the cable jacket during assembly and disassembly.
Guys, my experience for what it’s worth: the RPi is much more sensitive to the cable type being a source of data corruption than (eg) a laptop. Cable length didn’t seem to matter, but the cable type is very important. I’ve had USB cameras that work fine on a laptop but not on the RPi; when I replace the cable with a better shielded high speed cable, they work fine. Keep the unshielded length at the camera end as short as possible.