Search

Color Follow Robot With Pixy2 Cam

About the project

This robot follows the color with Pixy2 Camera.

Project info

Difficulty: Moderate

Platforms: NXP

Estimated time: 5 days

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Pixy2Cam Pixy2Cam x 1
NXP Rapid IoT Prototyping Kit NXP Rapid IoT Prototyping Kit x 1
Motor Driver/Controller, H-Bridge Motor Driver/Controller, H-Bridge x 1

Software apps and online services

Soldering Station Power Supply, For Weller WX Soldering System Soldering Station Power Supply, For Weller WX Soldering System

Hand tools and fabrication machines

MCUXpressoIDE MCUXpressoIDE x 1
Pixmon Pixmon x 1

Story

Hello Everyone,

The story starts from here, I received the PixyCam2 board and decided to do something with that. Initially I checked the functionality of the board, the attracted one feature is color connected mode. In this mode you can detect the object color and its XY positions and window sizes. for more details you an refer here.

The 1st stage would be installing pixymon and setting up your signature for al colors.

example: signature 1 name = "Red Ball" & crop the RED object region on the screen. likewise set few signature with different object colors. The signature will be stored internally on Cam.

Next setup is establishing i2c communication with pixyCam, It has its own format of frame. Its good to start from here .

In my case I used Nxp's Rapid IoT kit for i2c interface, once you able to read data from PixyCam, we are ready to setup the demo.

In the application side I have wrote driver to run DC motors base on the detected object size. If size reduces means object is far and move the robot. If object size is big we stop the movement. In the main color screen we choose the color for robo to follow it. the robot will not respond to other colors.

Unfortunately I had scarab robot with broken legs so managed to make it work.

The working demo is here. for instant response

Schematics and circuit diagrams

Schematic

Code

Main

Credits

Photo of ashokr

ashokr

Hello! I’m Ashok. I’m currently working as software engineer. passionate about doing Hobbies Projects and Animations works.

   

Leave your feedback...