Stufin
Home Quick Cart Profile

Grove - Vision AI Module V2

Buy Now on Stufin

Pin Configuration

  • Grove - Vision AI Module V2 Pinout Explanation
  • The Grove - Vision AI Module V2 is a powerful computer vision module designed for IoT applications. It features a built-in camera, AI-powered image processing, and Wi-Fi connectivity. Here's a detailed explanation of the module's pins, along with connection guidelines:
  • Pinout Structure:
  • The Grove - Vision AI Module V2 has a 12-pin female header with the following connections:
  • 1. GND (Ground)
  • Function: Provides a common ground connection for the module.
  • Connection: Connect to the ground pin of your microcontroller or power supply.
  • 2. VIN (Power Input)
  • Function: Supplies power to the module.
  • Connection: Connect to a 5V power supply (recommended) or a 3.3V-5V power source.
  • 3. 3V3 (Power Output)
  • Function: Provides a regulated 3.3V power output for external peripherals.
  • Connection: Optional; can be used to power external components or sensors.
  • 4. SDA (I2C Data)
  • Function: Enables I2C communication between the module and external devices.
  • Connection: Connect to the SDA pin of your microcontroller or I2C device.
  • 5. SCL (I2C Clock)
  • Function: Enables I2C communication between the module and external devices.
  • Connection: Connect to the SCL pin of your microcontroller or I2C device.
  • 6. TX (UART Transmitter)
  • Function: Enables serial communication between the module and external devices.
  • Connection: Connect to the RX pin of your microcontroller or UART device.
  • 7. RX (UART Receiver)
  • Function: Enables serial communication between the module and external devices.
  • Connection: Connect to the TX pin of your microcontroller or UART device.
  • 8. DIO (Digital Input/Output)
  • Function: Provides a digital I/O pin for custom applications.
  • Connection: Optional; can be used for custom digital signaling or control.
  • 9. INT (Interrupt)
  • Function: Generates an interrupt signal when the module detects a specific event (e.g., object detection).
  • Connection: Optional; can be connected to an interrupt-enabled pin on your microcontroller.
  • 10. Wakeup (Wakeup Pin)
  • Function: Enables wake-up functionality for low-power mode.
  • Connection: Optional; can be connected to a wake-up pin on your microcontroller or power management IC.
  • 11. Boot (Boot Mode)
  • Function: Enables boot mode for firmware updates or recovery.
  • Connection: Optional; connect to a boot mode pin on your microcontroller or programming tool.
  • 12. Reset (Reset Pin)
  • Function: Resets the module to its default state.
  • Connection: Optional; connect to a reset pin on your microcontroller or programming tool.
  • Additional Connection Guidelines:
  • When using I2C communication, ensure that the SDA and SCL pins are connected to the corresponding pins on your microcontroller or I2C device.
  • For UART communication, connect TX to RX and RX to TX between the module and your microcontroller or UART device.
  • When using the module's camera, ensure that it is properly connected to the module's camera interface (not shown in the pinout diagram).
  • Follow proper power supply and grounding procedures to avoid damage to the module or connected components.
  • By following these guidelines, you can successfully integrate the Grove - Vision AI Module V2 into your IoT project and take advantage of its advanced computer vision capabilities.

Code Examples

Grove - Vision AI Module V2 Documentation
Overview
The Grove - Vision AI Module V2 is a powerful computer vision module designed for edge AI applications. It features a high-performance AI chip, a 2MP camera, and various interfaces for connecting to other devices. This module is capable of performing various computer vision tasks, including object detection, facial recognition, and image classification.
Hardware Specifications
AI Chip: Kneron KL720
 Camera: 2MP, 1600x1200 pixels, fixed focus
 Interfaces: USB, UART, I2C, SPI, GPIO
 Power Supply: 5V, 1A
 Operating Temperature: -20C to 70C
Software
The Grove - Vision AI Module V2 supports various programming languages, including Python, C++, and Java. The module comes with a range of pre-trained AI models and a software development kit (SDK) that provides APIs for developing custom applications.
Code Examples
### Example 1: Object Detection using Python
This example demonstrates how to use the Grove - Vision AI Module V2 for object detection using Python.
```python
import os
import cv2
from kvision import KVision
# Initialize the module
kv = KVision()
# Load the pre-trained object detection model
kv.load_model('object_detection')
# Capture an image from the camera
img = cv2.imread('image.jpg')
# Pre-process the image
img = cv2.resize(img, (300, 300))
img = img / 255.0
# Perform object detection
detections = kv.detect(img)
# Print the detection results
for detection in detections:
    print(f'Class: {detection.class_id}, Confidence: {detection.confidence:.2f}, BBox: {detection.bbox}')
# Release the module
kv.release()
```
### Example 2: Facial Recognition using C++
This example demonstrates how to use the Grove - Vision AI Module V2 for facial recognition using C++.
```cpp
#include "kvision.h"
int main() {
    // Initialize the module
    KVision kv;
// Load the pre-trained facial recognition model
    kv.load_model("facial_recognition");
// Capture an image from the camera
    cv::Mat img = cv::imread("image.jpg");
// Pre-process the image
    cv::resize(img, img, cv::Size(300, 300));
    img.convertTo(img, CV_32F, 1/255.0);
// Perform facial recognition
    std::vector<Face> faces;
    kv.recognize(img, faces);
// Print the recognition results
    for (const auto& face : faces) {
        std::cout << "Face ID: " << face.id << ", Confidence: " << face.confidence << std::endl;
    }
// Release the module
    kv.release();
return 0;
}
```
### Example 3: Image Classification using Java
This example demonstrates how to use the Grove - Vision AI Module V2 for image classification using Java.
```java
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.bytedeco.javacv.OpenCVFrameGrabber;
import org.bytedeco.javacv.FrameGrabber.Exception;
import com.kvision.KVision;
public class ImageClassifier {
    public static void main(String[] args) throws Exception {
        // Initialize the module
        KVision kv = new KVision();
// Load the pre-trained image classification model
        kv.load_model("image_classification");
// Capture an image from the camera
        OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0);
        grabber.start();
        Frame frame = grabber.getFrame();
        grabber.stop();
        grabber.release();
// Pre-process the image
        Mat img = new Mat(frame.height, frame.width, CV_8UC3);
        img.put(0, 0, frame.imageData);
// Perform image classification
        List<ClassificationResult> results = kv.classify(img);
// Print the classification results
        for (ClassificationResult result : results) {
            System.out.println("Class: " + result.className + ", Confidence: " + result.confidence);
        }
// Release the module
        kv.release();
    }
}
```
These examples demonstrate how to use the Grove - Vision AI Module V2 for various computer vision tasks, including object detection, facial recognition, and image classification. By following these examples, developers can easily integrate this module into their IoT projects and build innovative AI-powered applications.