Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use HUSKYLENS 2: Examples, Pinouts, and Specs

Image of HUSKYLENS 2
Cirkit Designer LogoDesign with HUSKYLENS 2 in Cirkit Designer

Introduction

HUSKYLENS 2, manufactured by DFRobot (Part ID: SEN0638), is an advanced AI-enabled vision sensor designed for object, color, and face recognition. It features a user-friendly interface and supports multiple communication protocols, making it an ideal choice for robotics, automation, and AI-based projects. With its built-in machine learning algorithms, HUSKYLENS 2 simplifies complex vision tasks, enabling developers to focus on innovation rather than implementation.

Explore Projects Built with HUSKYLENS 2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Uno R3 Controlled Pan-Tilt Security Camera with Night Vision
Image of MOTION CAMERA: A project utilizing HUSKYLENS 2 in a practical application
This circuit features an Arduino Uno R3 microcontroller connected to a Huskylens (an AI camera module), an IR LED Night Vision Ring, and a Tilt Pan module. The Huskylens is interfaced with the Arduino via I2C communication using the SDA and SCL lines, while the Tilt Pan module is controlled by the Arduino through digital pins 10 and 11 for signal and output control. The IR LED ring and Tilt Pan are powered directly from the Arduino's 5V output, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Controlled RGB LED and Servo System with Capacitive Sensing and HuskyLens Vision
Image of orca: A project utilizing HUSKYLENS 2 in a practical application
This circuit features an Arduino UNO microcontroller connected to a Huskylens for image processing, a capacitive sensor for touch input, and a multi-channel PWM servo shield controlling several servos. The Arduino is powered by 5V and shares a common ground with the Huskylens and capacitive sensor, which also interface with the Arduino's analog and I2C pins, respectively. The servos are powered by a battery through a DC-DC step-down converter, and their control signals are managed by the PWM servo shield, which is also connected to the Arduino for I2C communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 5 Motion-Activated Dual DC Motor System with PIR Sensors
Image of Bhuvan: A project utilizing HUSKYLENS 2 in a practical application
This circuit uses a Raspberry Pi 5 to control two DC motors via an L298N motor driver, based on input from two PIR motion sensors. The Raspberry Pi also interfaces with a Huskylens for additional sensor input and a 7-inch WaveShare display for output. Power is supplied by a 12V battery for the motor driver and a 5V battery for the display.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled Motor System with Bluetooth Connectivity
Image of mine_1: A project utilizing HUSKYLENS 2 in a practical application
This is a motor control system with wireless communication capabilities, designed to operate multiple motors via Cytron motor drivers, controlled by Arduino UNOs. It includes relays for activating a light and buzzer, and uses Bluetooth for remote operation. The system's software is in the initial stages of development.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with HUSKYLENS 2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of MOTION CAMERA: A project utilizing HUSKYLENS 2 in a practical application
Arduino Uno R3 Controlled Pan-Tilt Security Camera with Night Vision
This circuit features an Arduino Uno R3 microcontroller connected to a Huskylens (an AI camera module), an IR LED Night Vision Ring, and a Tilt Pan module. The Huskylens is interfaced with the Arduino via I2C communication using the SDA and SCL lines, while the Tilt Pan module is controlled by the Arduino through digital pins 10 and 11 for signal and output control. The IR LED ring and Tilt Pan are powered directly from the Arduino's 5V output, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of orca: A project utilizing HUSKYLENS 2 in a practical application
Arduino UNO Controlled RGB LED and Servo System with Capacitive Sensing and HuskyLens Vision
This circuit features an Arduino UNO microcontroller connected to a Huskylens for image processing, a capacitive sensor for touch input, and a multi-channel PWM servo shield controlling several servos. The Arduino is powered by 5V and shares a common ground with the Huskylens and capacitive sensor, which also interface with the Arduino's analog and I2C pins, respectively. The servos are powered by a battery through a DC-DC step-down converter, and their control signals are managed by the PWM servo shield, which is also connected to the Arduino for I2C communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Bhuvan: A project utilizing HUSKYLENS 2 in a practical application
Raspberry Pi 5 Motion-Activated Dual DC Motor System with PIR Sensors
This circuit uses a Raspberry Pi 5 to control two DC motors via an L298N motor driver, based on input from two PIR motion sensors. The Raspberry Pi also interfaces with a Huskylens for additional sensor input and a 7-inch WaveShare display for output. Power is supplied by a 12V battery for the motor driver and a 5V battery for the display.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of mine_1: A project utilizing HUSKYLENS 2 in a practical application
Arduino-Controlled Motor System with Bluetooth Connectivity
This is a motor control system with wireless communication capabilities, designed to operate multiple motors via Cytron motor drivers, controlled by Arduino UNOs. It includes relays for activating a light and buzzer, and uses Bluetooth for remote operation. The system's software is in the initial stages of development.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Robotics: Object tracking, obstacle detection, and navigation.
  • Automation: Color-based sorting systems and facial recognition for access control.
  • Education: AI and computer vision learning projects.
  • DIY Projects: Smart home systems, gesture recognition, and interactive devices.

Technical Specifications

Below are the key technical details of the HUSKYLENS 2:

Specification Details
Manufacturer DFRobot
Part ID SEN0638
Power Supply Voltage 3.3V to 5V
Communication Interfaces UART, I2C
Image Resolution 320 x 240 pixels
Frame Rate 30 FPS
Recognition Capabilities Object, face, color, tag, line, and QR code recognition
Display 2.0-inch IPS screen (320 x 240 resolution)
Processor Built-in AI processor for real-time recognition
Dimensions 52mm x 44mm x 20mm
Weight 30g

Pin Configuration and Descriptions

The HUSKYLENS 2 features a 4-pin interface for communication and power. Below is the pin configuration:

Pin Name Description
1 VCC Power input (3.3V to 5V)
2 GND Ground connection
3 TX UART Transmit pin (used for serial communication)
4 RX UART Receive pin (used for serial communication)

For I2C communication, the HUSKYLENS 2 uses the following default addresses:

  • I2C Address: 0x32 (modifiable via software)

Usage Instructions

How to Use the Component in a Circuit

  1. Powering the HUSKYLENS 2: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground.
  2. Communication Setup:
    • For UART: Connect the TX pin of HUSKYLENS 2 to the RX pin of the microcontroller and the RX pin of HUSKYLENS 2 to the TX pin of the microcontroller.
    • For I2C: Connect the SDA and SCL lines of the microcontroller to the corresponding I2C pins of HUSKYLENS 2.
  3. Mounting: Secure the HUSKYLENS 2 in a stable position to ensure consistent image capture.
  4. Programming: Use the provided DFRobot libraries to interface with the HUSKYLENS 2.

Important Considerations and Best Practices

  • Ensure the power supply voltage is within the specified range (3.3V to 5V) to avoid damage.
  • Avoid exposing the sensor to direct sunlight or reflective surfaces, as this may affect recognition accuracy.
  • Use the built-in touchscreen to configure recognition modes (e.g., object, face, or color recognition).
  • Regularly update the firmware to access the latest features and improvements.

Example: Connecting HUSKYLENS 2 to an Arduino UNO

Below is an example of how to connect and program the HUSKYLENS 2 with an Arduino UNO using UART communication:

Circuit Diagram

  • VCC → 5V on Arduino UNO
  • GND → GND on Arduino UNO
  • TX → Pin 2 on Arduino UNO
  • RX → Pin 3 on Arduino UNO

Arduino Code

#include <SoftwareSerial.h>
#include "HUSKYLENS.h"

// Define software serial pins for HUSKYLENS communication
SoftwareSerial huskySerial(2, 3); // RX, TX
HUSKYLENS huskyLens;

void setup() {
  Serial.begin(9600); // Initialize serial monitor
  huskySerial.begin(9600); // Initialize HUSKYLENS communication

  if (!huskyLens.begin(huskySerial)) {
    Serial.println("HUSKYLENS initialization failed!");
    while (1); // Halt if initialization fails
  }
  Serial.println("HUSKYLENS initialized successfully!");
}

void loop() {
  if (huskyLens.request()) { // Request data from HUSKYLENS
    if (huskyLens.isLearned()) { // Check if an object is learned
      Serial.println("Object detected!");
    } else {
      Serial.println("No object detected.");
    }
  } else {
    Serial.println("Failed to communicate with HUSKYLENS.");
  }
  delay(500); // Wait for 500ms before the next request
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. HUSKYLENS 2 is not powering on:

    • Ensure the VCC and GND connections are secure.
    • Verify that the power supply voltage is within the 3.3V to 5V range.
  2. No data received from the sensor:

    • Check the TX and RX connections for UART communication.
    • Ensure the baud rate in the code matches the HUSKYLENS 2 default (9600 bps).
  3. Recognition accuracy is low:

    • Ensure the sensor is positioned correctly and is not exposed to excessive light or reflections.
    • Re-learn the object or face under better lighting conditions.
  4. I2C communication not working:

    • Verify the I2C address (default: 0x32) and ensure it matches the code.
    • Check the pull-up resistors on the SDA and SCL lines.

FAQs

Q: Can HUSKYLENS 2 recognize multiple objects simultaneously?
A: Yes, HUSKYLENS 2 can recognize and track multiple objects, depending on the selected mode.

Q: How do I update the firmware?
A: Connect the HUSKYLENS 2 to a computer via the USB-C port and use the DFRobot firmware update tool.

Q: Is HUSKYLENS 2 compatible with Raspberry Pi?
A: Yes, HUSKYLENS 2 can be interfaced with Raspberry Pi using UART or I2C communication.

Q: Can I modify the recognition modes programmatically?
A: Yes, you can switch between recognition modes using the DFRobot HUSKYLENS library.

By following this documentation, users can effectively integrate and utilize the HUSKYLENS 2 in their projects.