When we think of machine learning and artificial intelligence, we immediately think of large data centers with enormous computing power. But the Raspberry Pi Pico is capable of machine learning via TinyML, developed for microcontrollers. The $40 Uctronics TinyML Learning Kit makes it easy to add computer vision to our projects.
Compatible with many different microcontrollers such as those from Arduino, the Uctronics TinyML Learning Kit includes an Arducam Mini 2MP Plus camera which has been used with other microcontrollers for some time, but with the power of the Raspberry Pi Pico we see much better performance for machine learning , an increase of almost 10x over an Arduino.
We put the Uctronics TinyML Learning Kit on the couch and learned more about what this kit has to offer.
Design and use of the Uctronics TinyML Learning Kit
Measuring only 0.78 x 1.34 inches (20 x 34.1 mm), the focus of the kit is on the Arducam 2MP Plus, a camera based on the OV2640, a 2MP camera that can be used with microcontrollers and computers via an SPI (data stream and commands) and I2C protocols (sensor configuration).
This camera is not limited to use only on the included Raspberry Pi Pico; it can also be used with Arduino and ESP32 based boards. A resolution of 2 MP may not sound like much, but for computer vision and machine learning it is enough if we consider that our image will be only 320 x 320 pixels. The camera lens is in an M12 mount and the lens is interchangeable with other M12 lenses, sold separately.
Connecting the camera to the Raspberry Pi Pico, or other RP2040 is a piece of cake thanks to the included jumper wires. The online resources clearly show the GPIO pins we need to use to connect the camera to the Pico and show the GPIO pins for the included CP2102 USB to TTL adapter used to send video data from the Pico to an application , which in our review is a person-detection script with Processing, a programming interface similar to the Arduino IDE, but focused on the fine arts.
After flashing a ready-made UF2 project written in C/C++ to our Raspberry Pi Pico, we then installed the Processing IDE and associated code to receive the image data and display it on our desktop. If you are a MicroPython fan, there are currently no MicroPython libraries for TensorFlow Lite for the Raspberry Pi Pico, but Arducam is working to support it. The Arducam Mini 2MP Plus camera can also be used to take simple photos and has a community supported MicroPython library to simplify the process.
A camera hooked up to a Raspberry Pi Pico is cool, but machine learning is way cooler. Tiny Machine Learning (TinyML), is a version of TensorFlow developed for use on microcontrollers that almost always have less computing power than a full computer. Microcontrollers such as those from Arduino, Espressif (ESP32) and now Raspberry Pi can be trained to identify objects, patterns or respond to external input from microphones, sensors etc.
Arducam claims that the OV2640 camera with the Raspberry Pi allows us to process Pico at 1 FPS, which may not sound like much, but the equivalent project run on an Arduino is 1 frame every 18 seconds. So the Pico is clearly the better board for TinyML on a budget. Arducam provides a Github repository with a set of TinyML demos available as raw C code for customization and compilation on your computer. If you want to use the demos right away, there are precompiled versions saved as UF2 files, ready to use on the Pico.
For which projects can we use the Uctronics TinyML Learning Kit?
The Uctronics TinyML Learning Kit is designed for TinyML and thus is aimed at projects that need just enough computing power to add computer vision and artificial intelligence to a project. With the camera as input we can give a robot ‘sight’ and with the help of different models we can train the robot to search for objects or people.
Want to monitor intruders in a room and send alerts to your devices over the internet? Well, the Arducam camera and our guide to getting your Raspberry Pi Pico online will only enable this.
Bottom Line
The Uctronics TinyML Learning Kit is a lot of fun, but to get the most out of it, you really need to know your C/C++ until the MicroPython library is ready to be released. If you’re already familiar with machine learning, chances are this isn’t a stumbling block for you.
The Arducam Mini 2MP Plus camera is incredibly easy to assemble, with clear instructions and a well-documented GitHub repository, and with a little time, even a novice programmer can achieve great results.