Logic Error w/Sensecraft and Grove - Vision AI Module V2

I’ve been fiddling with a Grove - Vision AI Module V2 connected to a Arducam 5MP OV5647 Camera. Everything was working fine until the Sensecraft AI page started showing “Logic Error” error pop up. I thought I’d root caused it down to the camera so I just replaced it with a used model from eBay that looks fine but when connected I’m getting the same “Logic Error” popup.

Is there a diagnostic tool I can flash to the Grove module to see if the problem is there instead of the camera? Any other suggestions? This is real bummer.

Hi There,

@Michael_Hoyt,

That “Logic Error” pop-up in SenseCraft AI almost always means the web app sent the start-stream command, but the Himax HX6538 processor failed the camera initialization handshake over the MIPI CSI bus.

Before assuming both OV5647 cameras are bad, check these:

  1. Check the Chrome DevTools Console:

    • On the SenseCraft page, press F12 and open the Console tab.

    • Click Connect and trigger the error. The console will dump the actual serial/JSON reply from the board (it will usually state whether it’s an I2C sensor read ID error or a protocol timeout).

  2. CSI Cable Orientation & Seating:

    • The 15-pin / 24-pin CSI ribbon cable must have the metal contact pads facing the PCB contacts, fully squared inside the connector before the black slider is clicked shut. If it’s tilted even half a millimeter, the camera I2C ID register fails to read and the firmware throws a logic trip.
  3. Re-flash the Base Firmware:

    • Unplug the board, hold down the BOOT button, plug in the USB-C cable, and release.

    • Use SenseCraft to flash a fresh pre-compiled OV5647 model (like Swift-YOLO or MobileNet Person Detection). If the previous flash had a model compiled for the Himax camera sensor rather than the OV5647, it will throw a Logic Error every time it tries to initialize the sensor registers. :backhand_index_pointing_left: :wink: this is probably, Yours…

  4. Hardware Diagnostic via Host MCU (XIAO):

    • If you have a XIAO, snap it into the Grove Vision AI V2 and load the Seeed_Arduino_GroveAI library. Running a simple I2C probe to address 0x62 and calling ai.begin() will print whether the Himax core is responding and report the camera/firmware state directly in the Serial Monitor.

HTH
GL :slight_smile: PJ :v:

FYI,
If you have a XIAO (ESP32-S3, C3, C6, or RP2040) plugged into the module’s header socket or connected over I2C, you can use the official Seeed_Arduino_GroveAI library to query the Vision AI V2 directly and read its diagnostic state without using the web browser:

  1. In Arduino IDE, install: Seeed_Arduino_GroveAI (by Seeed Studio).

  2. Wire or seat the XIAO onto the Vision AI V2 carrier.

  3. Upload this standalone I2C diagnostic sketch to the XIAO to ping the Vision AI processor:

#include <Arduino.h>
#include <Wire.h>
#include <Seeed_Arduino_GroveAI.h>

GroveAI ai(Wire);

void setup() {
  Serial.begin(115200);
  while (!Serial && millis() < 3000);

  Serial.println("\n=== Grove - Vision AI V2 Hardware Diagnostic ===");
  Wire.begin();

  // 1. First probe standard I2C address (default 0x62)
  Wire.beginTransmission(0x62);
  byte error = Wire.endTransmission();

  if (error == 0) {
    Serial.println("[OK] Vision AI Module responded on I2C address 0x62!");
  } else {
    Serial.printf("[FAIL] No response at 0x62 (Error: %d). Checking bus...\n", error);
    for (byte addr = 1; addr < 127; addr++) {
      Wire.beginTransmission(addr);
      if (Wire.endTransmission() == 0) {
        Serial.printf(" -> Found device at 0x%02X\n", addr);
      }
    }
  }

  // 2. Initialize communication protocol
  if (ai.begin(ALGO_OBJECT_DETECTION, MODEL_EXT_INDEX_1)) {
    Serial.println("[OK] Grove AI V2 Protocol initialized successfully.");
    Serial.printf(" -> Firmware Version: %s\n", ai.version().c_str());
    Serial.printf(" -> Algorithm: %u\n", ai.state());
  } else {
    Serial.println("[FAIL] ai.begin() failed! The camera sensor or model may not be loaded.");
  }
}

void loop() {
  // If initialized, poll for detection frames
  if (ai.invoke() == 0) {
    uint8_t count = ai.get_result_len();
    Serial.printf("[ALIVE] Vision AI processing frames. Detections: %d\n", count);
  } else {
    Serial.println("[ERROR] Invoke failed — Camera or pipeline stalled.");
  }
  delay(1000);
}

this will tell you something more. :crossed_fingers: