The Robotcat has a machine vision component, which hopefully allows it to “chase” a laser pointer. Machine vision requires considerably more compute power than the Arduino Uno can deliver. To supplement the Arduino Uno, I decided to create a “sensor fusion module” that will offload the machine vision and sensor data computation. I chose a small, efficient, and (relatively) inexpensive module called OpenMV M7. This module is built around an STM32 Cortex M7, which is an ARM microcontroller with several nice features. It has enough compute power to implement machine vision applications, plus it has a real time clock, supports I2C and SPI interfaces, and has a small number of GPIO that can be used for future expansion.
The OpenMV module is programmed using MicroPython from within the OpenMV IDE. In order to quickly detect a laser pointer, I used a pre-canned blob detection algorithm with some slight tweaks of the color levels to filter the red laser pointer spot and discriminate reflections and other light sources. Here is a quick video clip of the blob detection of a laser pointer.
One unique feature of this robot is that we decided to also add a “classic” alarm clock interface seven segment display. At first, adding a clock to our robot may seem like an odd choice, but during this implementation, I discovered that it has a couple useful roles. Besides being cool, it’s actually a useful way to display any error codes or other information that I may add in the future. The OpenMV M7 has a builtin real time clock, so other than the seven segment display module, there was no additional hardware required. Plus, it’s actually a great way to give this robot a second life as a clock and a conversation piece.
The seven segment display module I chose was a four digit clock-type LED display available from Adafruit. I soldered this display into a “backpack” based on the HT17K33 LED driver with an I2C interface. This display is connected to the OpenM7 using the following items from the TE Connectivity Kit: M4473 SL005 Shielded 2 Pair cable and Dynamic D-1000 Series contacts:
- 4x 2367817-2 Female contact pins
- 4x 2367819-2 Male contact pins
- 1x 2-2366515-4 receptacle
- 1x 1-2366600-4 receptacle