N6 Ribbon Cable?

Hello,

On earlier threads it’s been mentioned that a new ribbon cable design compatible with the PAG7936 camera is in the works. Is there any timeline for when we could expect this to be available?

Thanks.

I just got samples this week from SingTown. I need to check them and approve production.

This code is confirmed to fix the PAG7936 with the 80mm cable:

import csi
import time

csi0 = csi.CSI()
csi0.sleep(True)
time.sleep(0.01)
csi0.reset()  # Reset and initialize the sensor.
csi0.pixformat(csi.RGB565)  # Set pixel format to RGB565 (or GRAYSCALE)
csi0.framesize(csi.HD)  # Set frame size to QVGA (320x240)

#csi0.snapshot(time=2000)  # Wait for settings take effect.
clock = time.clock()  # Create a clock object to track the FPS.

while True:
    clock.tick()  # Update the FPS clock.
    img = csi0.snapshot()  # Take a picture and return the image.
    print(clock.fps())  # Note: OpenMV Cam runs about half as fast when connected
    # to the IDE. The FPS should increase once disconnected.

The issue is that the noise from the MIPI transceivers corrupts long streams of i2c writes over long cables unless it’s silenced before initing the sensor.

PR for this: drivers/sensors: Add PAG7936 halt for safe shutdown. by kwagyeman · Pull Request #3208 · openmv/openmv · GitHub

Hello,

I hope you’re all doing well.

I connected my N6 to the ribbon cable and tested it with the “confirmed fix,” but I’m getting this error:
Traceback (most recent call last):
File “”, line 16, in
RuntimeError: Frame capture has timed out.

or the switch to “SOFTCSI” with the checkerboard pattern.

Is there anything else I need to keep in mind?

Thank you

Hi, you need to install the latest dev release in the IDE. This should resolve the issue.

Hi,

thanks for the quick reply. Now it shows a different “test picture” but it is still switching to “SOFTCSI”

SoftCSI happens when sensor detection fails. The PAG7936 should be detected reliably on startup via I2C scan. What does your system look like?

I’m using the N6 with the camera module it shipped with, nothing else

connected. Firmware v5.0.0.

The cable is the official OpenMV 80 mm ribbon, the same one that works fine on my RT1062 board.

The code is the example you posted here as the long-cable fix.

Thank you very much.

Okay, the sensor has a timed-out error; it shouldn’t have been fixed by the PR. As for the softcsi on bootup. You may need to power cycle to get the system back to a known state.

The PR we merged should make the system work for the case of starting and stopping a simple script like hello world, just showing an image. What else is happening in the script? The issue occurring is that the level shifters used on the sensor header have trouble with the added capacitance of the flex cable connector and MIPI CSI at the same time… when a ton of I2C writes are done at the same time as MIPI CSI running, then the noise couples, causing false triggers.

The PR quiets the MIPI CSI bus before resetting the sensor, which was causing an error locking it up. However, if you are resetting the board and not quieting the bus first, then you’d still encounter the issue. You’d want to sleep the sensor first before a machine.reset() or other big mode change.

Solved … it’s the cable. Plugged directly onto the N6 board (same software,
confirmed PWRON_RESET), cid() returns PAG7936 and everything comes up
normally. With the 80 mm ribbon it was SOFTCSI every time, 0 of 10 retries.

The ribbon has since stopped working on my RT1062 as well, where it used to
be fine, so it looks like the cable itself failed rather than an N6
incompatibility. The timing was bad. It must have happened right in the middle of the switch.

Thank you for the quick help. And please excuse the inconvenience.

The power-cycle note and the point
about sleeping the sensor before any big mode change were both new to me.

Good to hear!

Also, we will have new longer cables in stock soon For the PAG7936 and PS5520.

That’s great!

I’ll order it as soon as possible, I need it right away. :smiley:

For anyone reading this thread later, I’d also like to add that the ribbon wasn’t defective because of poor quality. I just stored it improperly between replacements. The quality is really great.