← Back to portfolio
STM32F446 · CAN · KiCad · DCDC Isolation · Damiao Motors · MuJoCo · Inverse Kinematics

Ratta “Geomcat” Automated Cat Litter Box

Ratta (Supernote) · Mechatronic Systems Engineer · Jul 2026 – Aug 2026

Mechatronic systems engineer responsible for the core capability of the product. Worked on a 12-person product team building an automated cat litter box. Designed all electrical, firmware, software, and control components for an inverted 4-DOF robotic arm that scoops waste and deposits it into a collection bin. Built 3 arms that passed a total of 5000+ continuous scooping trials over 100 hours with zero failures and exhibited the product at Asia Pet Expo 2026.

Designed a PCB with three galvanically isolated power domains, STM32F446 firmware, IK/FK with Dijkstra-based safe motion planning, MuJoCo simulation environment with a custom motion scripting language. Co-designed the overall architecture and communication protocol with the RK3576 main controller.

System architecture

Two-controller split. An infrared and an HD camera feed into the RK3576, which detects waste and computes a target in polar coordinates. The RK3576 also handles product logic and the mobile monitoring app.

Coordinates travel over isolated TTL to the STM32F446, which executes the scooping motion at 200 Hz through the CAN bus. Joint telemetry streams back to the RK3576 for real-time monitoring.

PCB & power architecture

4-layer PCB with three galvanically isolated power domains. The STM32F446 logic domain connects to the motor power domain through an ADM3053 isolated CAN transceiver, and to the RK3576 host through ADUM digital isolators on the TTL link. Calculated current budgets for capacitor sizing, DC-DC converter selection, and slip-ring specification.

Supported the mechanical engineer in arm component selection. The arm uses 3 Damiao CAN joint motors running MIT impedance mode and a closed-loop stepper, all on a shared 1 Mbps CAN bus.

Firmware

Wrote the entire firmware from scratch. Bare-metal main-loop architecture with interrupt-driven peripherals.

Handles two motor protocols over CAN. Damiao joint motors run in impedance mode with bit-packed command frames. The closed-loop stepper uses a separate multi-packet protocol on CAN extended frames. Motor stiffness and damping gains adjust dynamically by action phase.

The trajectory playback engine runs at 200 Hz on a hardware timer, reading pre-computed lookup tables from flash and sending motor commands with velocity feedforward.

Co-designed the TTL communication protocol between STM32 and RK3576, iterated through 7 versions. 12 commands covering reset, movement, motor control, the full scooping workflow, emergency stop, and health reporting. An asynchronous state machine manages multi-step action lifecycles.

Four telemetry streams report joint position, velocity, torque, and temperature back to the RK3576 for monitoring through the mobile app.

Control & trajectory pipeline

Trajectories are learned from hand-guided teaching. The telemetry stream records joint positions during demonstration and exports them as .h lookup tables that feed into an imitation learning model.

A MuJoCo simulation environment handles sim-to-real transfer, fine-tuning the IL model and the recorded trajectories.

Given a scooping radius, the model outputs trajectory points. Adaptive planning interpolates between them with collision avoidance.

Highlights

  • Rescued a stalled project by designing all electrical, firmware, and control systems for a demo-ready inverted 4-DOF robotic arm within 6 weeks
  • Product verified at Asia Pet Expo, ran nonstop for 10 hours every day during the 5-day expo.
  • Built STM32 firmware, arm controller PCB schematic and layout, sim-to-real MuJoCo pipeline and control algorithm.