Close
0%
0%

Mini-figurine Cataloger and Listing Tracker

Automatic platform and slider movements to capture 360° figurine images. Scheduled listing tracking and feature-rich web interface on UNO Q.

Similar projects worth following
0 followers
As an enduring hobby from my childhood, I have collected a plethora of mini-figurines from different brands, limited editions, categories, and themed production lines over the years, including but not limited to Happy Meal, Kinder Surprise, Funko, and Hasbro. Since I was not able to display all of them due to a lack of available space, I had been mulling over cataloging all of my mini-figurines with extensive detail in the form of a web-based application. Thus, I decided to develop this AI-powered mini-figurine cataloger.

Although I am not keen on selling all of my collection, I wanted to enable the application to track eBay and Amazon listings of the target figurines and the adjacent collectibles to get a grasp of the market price and availability of my collection. Also, I decided to make the application to generate pamphlets (simple HTML pages) for each figurine while conducting market analysis to track new listings.

As I decided to use the Hermes AI agent to track eBay and Amazon listings, my workflow was quite straightforward for market analysis and pamphlet generation, since the Hermes agent provides an intuitive structure for creating skills manually, adjusting them via chat, and scheduling cron jobs for periodic tasks such as processing web-scraped product listings. Even though the Hermes AI agent handles the market analysis, it is not required to execute the mini-figurine cataloging operations since I programmed the application from scratch. To enable the agent to run as deterministically as possible, I tasked it to only update existing listing variables and generate the pamphlet in HTML as a separate file. In this regard, the application can operate without showing any web-scraped listings and is capable of cataloging mini-figurines, even if the Hermes agent is excluded.

I decided to program the web-based mini-figurine cataloger application on Arduino UNO Q by employing the Arduino App Lab development environment, providing foundational building blocks (Bricks). Since UNO Q is a compact but extremely powerful development board, I was able to run the Hermes AI agent locally. Thus, enabling the Hermes agent to update listing information, stored as individual JSON database files for each figurine, was quite straightforward.

Of course, it would not be a worthy mini-figurine cataloger without the feature of automated yet comprehensive figurine photographing. Thus, I decided to build a rig enabling the App Lab application to capture 360° pictures at varying camera distances automatically. To achieve this automation, I designed a rotary platform swiveling the target mini-figurine and a linear camera slider moving the attached USB camera — Logitech Brio 4K webcam.

Since I wanted to design the rig as compact as possible, I decided to take a different approach for detecting the platform angles and the camera distances, and utilized two TCRT5000 infrared (IR) sensor modules. It is a well-known optical reflective sensor for line tracking robots due to its ability to easily differentiate white from black; the former bounces back IR radiation from the emitter to the phototransistor, while the latter absorbs the IR radiation to the point of avoiding phototransistor trigger. Instead of using stepper motors, I employed two Pololu high-power micro metal gearmotors due to their small footprint.

For swiveling the target mini-figurines, I decided to design a rotary platform based on the worm gear-wheel mechanism, which reduces the cataloger rig's footprint considerably and locks the platform base from moving when the cataloger rig is idle, since the worm gear-wheel mechanism is inherently non-back-drivable. For moving the camera slider, I simply designed a GT2 belt-driven mechanism. Since there were no suitable GT2 pulleys for the gearmotors, I modified an existing GT2 20T pulley model to produce a custom 3D-printable one.

While I was working on the cataloger rig design, I decided to lighten the platform base to emphasize the target figurine details, especially for vintage figurines, and create unique background icons related to the figurine category and aesthetic. For the lighting source, I decided to utilize a WS2813 RGB LED strip and enable the user to adjust the lighting manually via buttons or remotely via an RGB color picker wheel presented by the mini-figurine web interface. For the background icons, I decided to design custom magnetic ornaments and added an electromagnet to the rig in order to attach and change the ornaments in accordance...

Read more »

  • 1 × Arduino UNO Q 4GB
  • 1 × UGREEN 5-in-1 100W USB-C Hub with 4K@60Hz HDMI and 3 * USB-A 3.0
  • 1 × Logitech Brio 4K Ultra HD Webcam
  • 1 × Raspberry Pi 15W 5.1V / 3.0A USB-C Power Supply
  • 1 × 20W 5V / 4.0A Switching Power Supply (DC Jack)

View all 26 components

  • 1
    Development process, linking the Hermes AI agent with an Arduino App Lab application, and final results

    As mentioned in my previous UNO Q-based project, the development process differs quite a bit from my usual AIoT project development routine since the Arduino App Lab provides all of the required modules, packages, and the built-in Arduino Router background Linux service, constructed to capitalize on the dual-brain (MPU-MCU) nature of UNO Q. Within the confines of the Arduino App Lab development environment, although I still utilized specific programming languages to develop the different aspects of the mini-figurine cataloger App Lab application, Arduino for programming the STM32 microcontroller (MCU), Python for the application backend (Qualcomm MPU), and HTML, CSS, JavaScript for the web interface, as a whole, I built a single application that the App Lab runs and manages.

    Considering the usage of the built-in Bricks (Docker containers) and web socket, I highly recommend inspecting the official Arduino UNO Q specifications and tutorials.

    I specifically constructed the data structure of the web interface to enable the Hermes AI agent to update the web-scraped listing information for each cataloged mini-figurine. Instead of utilizing the built-in SQL database, I enabled the web interface to generate two JSON files consisting of mini-figurine status and listing information, respectively. In this regard, the Hermes agent can read and construe the given figurine information from the associated JSON database file, and then append the processed web-scraped listing information into the associated JSON database file.

    I documented the overall development process for the finalized mini-figurine cataloger features in the following written tutorial. For a brief overview, you can inspect the project demonstration video with timestamps.

  • 2
    Step 1: Creating the Arduino App Lab application and setting up the electrical components

    First, I collected the electrical components I needed to achieve the mini-figurine cataloger rig features I envisioned and defined the UNO Q-component pin connections. Since UNO Q has the exact same pinout as the usual Arduino Uno, declaring pin connections was quite straightforward.

    I specifically selected the Pololu DRV8835 dual motor driver shield to control two micro metal gearmotors (also from Pololu) since this shield is tailored to the Arduino Uno.

    // Connections
    // Arduino UNO Q :  
    //                                Pololu DRV8835 Dual Motor Driver Shield
    // D9      ------------------------ Motor_1 [Speed]
    // D7      ------------------------ Motor_1 [Direction]
    // D10     ------------------------ Motor_2 [Speed]
    // D8      ------------------------ Motor_2 [Direction]
    //                                TCRT5000 Infrared Sensor Module [First] 
    // GND     ------------------------ GND
    // 5V      ------------------------ VCC
    // A2      ------------------------ OUT
    //                                TCRT5000 Infrared Sensor Module [Second] 
    // GND     ------------------------ GND
    // 5V      ------------------------ VCC
    // A3      ------------------------ OUT
    //                                Grove - Electromagnet (5V)
    // GND     ------------------------ GND
    // 5V      ------------------------ VCC
    // D12     ------------------------ SIG
    //                                Grove - WS2813 RGB LED Strip (Waterproof - 60 LED)
    // D11     ------------------------ Data
    //                                Analog Joystick
    // GND     ------------------------ GND
    // 5V      ------------------------ +5V
    // A4      ------------------------ VRX
    // A5      ------------------------ VRY
    // D2      ------------------------ SW
    //                                Control Button (A)
    // D3      ------------------------ +
    //                                Control Button (B)
    // D4      ------------------------ +
    //                                Control Button (C)
    // D5      ------------------------ +
    //                                Micro Switch with Pulley (KW10-Z5P)
    // D13     ------------------------ +

    #️⃣ Since the Pololu DRV8835 motor driver shield comes disassembled, I soldered its components to complete the PCB via my TS100 soldering iron. Also, I soldered male jumper wires to the Pololu micro gearmotors to be able to connect them easily to the dedicated screw terminal blocks on the shield.

    #️⃣ To connect the IC-177 push buttons to the UNO Q, I also soldered male jumper wires. To insulate all wire connections, I utilized heat-shrink tubing.

    #️⃣ To provide stable 5V to gearmotors through the driver shield, the Grove electromagnet, and the Grove WS2813 RGB LED strip, I employed an external 5V / 4.0A switching power supply with a DC jack. To make this external power supply breadboard-friendly, I utilized a female DC-barrel-to-wire jack, splitting positive (5V) and ground (GND) wire lines.

    #️⃣ After declaring the pin layout and connecting the electrical components to the UNO Q for initial testing, I created the mini-figurine cataloger App Lab application.

    #️⃣ While testing the LED strip, I noticed that the first LED always turns green permanently due to signal noise (fluctuations). Thus, I added a 330 Ohm resistor to the signal (data) line of the LED strip, connected to the UNO Q, to avoid current fluctuations.

    #️⃣ Then, I installed the required sketch libraries. Thankfully, all libraries were available in the provided App Lab library collection, so I did not need to modify any libraries due to incompatibilities.

    #️⃣ If you encounter errors regarding the Arduino_RouterBridge library, download it manually since it was removed from the later versions of the bundled Zephyr platform (Arduino UNO Q Board).

    📚 DRV8835MotorShield | Inspect

    📚 Adafruit NeoPixel | Inspect

    📚 Arduino_RouterBridge | Inspect

    #️⃣ To develop mini-figurine cataloger features, I added these Bricks.

    Basically, Bricks are pre-configured services and Docker containers to add various features to a custom App Lab application. Each Brick provides a specific set of capabilities that are executed by the Qualcomm MPU (Linux) and can be accessed by the Python script (backend) of the application via the built-in high-level APIs.

  • 3
    Step 2: Collecting audio samples directly from UNO Q via the Edge Impulse CLI

    Since some of my mini-figurines do not have a stable base, they are prone to falling while the rotary platform swivels. Thus, I decided to build an audio classification model to detect figurine falls in order to suspend the cataloging process to let the user reposition the figurine and resume the process without producing unsolicited figurine photographs.

    Fortunately, the Logitech Brio 4K USB webcam comes with a built-in microphone. Thus, I was able to collect audio samples directly from the UNO Q and run the trained audio classification model on the Arduino App Lab without needing a secondary microphone.

    #️⃣ First, I signed in to my Arduino account on the Arduino App Lab, which is required to deploy and run EI models on the App Lab through the provided Bricks, in this case, the Audio Classification Brick.

    #️⃣ Then, I created a new project on my Edge Impulse Enterprise account and selected the target development board as Arduino UNO Q.

    #️⃣ Although there is a built-in pipeline to obtain trained Edge Impulse models, the App Lab does not let the user collect samples directly from Arduino UNO Q yet. Thus, I set up the Edge Impulse CLI on the UNO Q via the built-in App Lab terminal to be able to access video and audio streams produced by the Brio webcam on the Edge Impulse Studio.

    sudo apt updatecurl -sL https://deb.nodesource.com/setup_20.x | sudo bash -sudo apt install -y gcc g++ make build-essential nodejs sox gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-base-appssudo npm install edge-impulse-linux -g --unsafe-per
    

    #️⃣ After setting up the Edge Impulse CLI, I connected to my Edge Impulse account, selected the associated project, assigned the Logitech Brio webcam's built-in microphone as the primary audio source, and name the device.

    edge-impulse-linux

    #️⃣ Nonetheless, as I was trying to collect audio samples on the built-in App Lab terminal, I encountered some connection issues. Thus, I resumed collecting audio samples on the native terminal in the SBC mode.

    #️⃣ After moving to the SBC mode, I was able to see the UNO Q on the Edge Impulse Studio without any connection errors and start collecting audio samples while providing labels and sample durations.

    #️⃣ Since the gearmotors driving the worm gear and the custom GT2 pulley work continuously while cataloging the target mini-figurines, I collected audio of gearmotors turning as the background noise (normal) samples. I chose the background noise sample duration as 5 seconds, as this state should be the norm for the neural network model.

    #️⃣ Then, I collected audio of figurines falling at different angles and heights to construct an extensive dataset. I selected the sample duration as 2 seconds since the falling happens abruptly without many repetitions.

    After collecting training and testing audio samples for both labels, I completed my dataset for detecting figurine falls.

    • background_noise
    • model_fall

    To utilize the advanced AI tools provided by Edge Impulse, you can register here.

    For further information, you can inspect this audio classification model on Edge Impulse as a public project.

View all 6 instructions

Enjoy this project?

Share

Discussions

Kutluhan Aktar wrote an hour ago point

The project's GitHub repository provides:

✅ Code files
✅ The mini-figurine cataloger App Lab application's ZIP folder
✅ 3D component design files (STL)
✅ Edge Impulse audio classification model (EIM binary for UNO Q)
✅ Hermes AI agent skill files (markdown)

  Are you sure? yes | no

Does this project spark your interest?

Become a member to follow this project and never miss any updates