October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
ThatPainter
ATOM Matrix

LEGO Atomic Mouse: Build the M5Stack Technic Micromouse

LEGO Atomic Mouse is a DIY Technic micromouse built around the M5Stack ATOM Matrix. Here are the parts, wiring modification, UIFlow pins and calibration steps.

By ThatPainter Team 4 min read
Worth Installing

Windows Errors? Fix Them Before They Spread

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Outbyte PC Repair · freeRepair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallFix My PC Now →

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ThatPainter is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Learn More

LEGO Atomic Mouse is a DIY LEGO Technic micromouse, not a numbered LEGO retail set. The 2022 project combines an M5Stack ATOM Matrix ESP32 controller, two 360-degree servos, a battery, Grove wiring and a LEGO Technic chassis. The original build guide is DigiKey Maker.io’s “Lego Atomic Mouse,” published July 31, 2022; M5Stack also lists it in its project hub.

What “LEGO Atomic Mouse” refers to

The name identifies a small, build-it-yourself robot described by the project guide as a “simple Lego Mouse Robot powered by the M5Stack Atom Matrix.” It is assembled from LEGO Technic parts and M5Stack electronics. Neither source identifies an official LEGO set number, boxed kit or complete retail bundle, so you will need to source the components individually.

The project hub describes it as a LEGO micromouse powered by an M5Stack Atom and 360 servos. The published material does not provide an independent speed, maze-solving or battery-life benchmark; the pulse values below are the guide’s setup observations, not universal performance specifications.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Parts and compatibility

Part Role Details stated by the guide
M5Stack ATOM Matrix ESP32 development kit Controller DigiKey identifies the board as C008-B.
M5Stack ATOM TailBat Battery/power module Listed by DigiKey as T001.
M5Stack Servo Kit 360 Drive motors Use two 360-degree servos; DigiKey identifies the kit as A076-C.
M5Stack Grove-T connector Splits the control connection The parts list names one; DigiKey identifies U039-B.
Short Grove cables Servo connections Two are called for, or equivalent cables.
LEGO Technic chassis pieces and caster Frame and front support The guide says assorted Technic pieces, not one specific LEGO set.

DigiKey’s identifiers describe the source page’s listed parts, not a guarantee of current stock, connector compatibility or compatibility with every later hardware revision. Check the pinout and connector type of the exact products you buy before applying power.

How the mechanical build goes together

  1. Build the Technic chassis. Make a rigid, symmetrical frame with mounting points for the two drive servos and a front LEGO caster. The guide does not prescribe one numbered Technic set, so available beams, axles and connectors can be substituted if the frame remains aligned.
  2. Mount the servos. Place one 360-degree servo on each side so the wheels drive the robot in opposite directions. Secure the servo bodies firmly; loose mounts can make calibration impossible.
  3. Attach the ATOM adapter. The guide places an adapter on the back of the ATOM Matrix. Fasten the controller where its display and buttons remain accessible.
  4. Fit the battery and connector. Attach the ATOM TailBat and leave enough cable slack for the chassis to turn without pulling the connectors.
  5. Check the caster and wheel contact. The caster should support the front without lifting either drive wheel. Spin both wheels by hand before powering the robot.

Wiring: follow the project-specific modification

The guide’s connection order is:

  1. Connect the TailBat to the ATOM Matrix.
  2. Connect both servos to the Grove-T connector using the two short Grove cables.
  3. Plug the Grove-T into the TailBat.

One small cable’s socket must have its white and yellow wires switched, according to the guide. This is a project-specific instruction; do not assume that the same modification applies to another Grove cable, servo or product revision. Disconnect the battery while changing wires, verify the connector orientation against the original guide, and inspect for shorts before powering the assembly.

UIFlow configuration and motion values

The guide uses M5Stack UIFlow and says to configure both servo blocks as Custom. Its pin assignments are:

Rank #2
M5Stack Atom Voice Smart Speaker Dev Kit
  • Compact and Portable: The ATOM VOICE is designed with a small form factor, measuring only 24 * 24 * 17 mm. Its compact size makes it highly portable and convenient for on-the-go use.
  • Voice Interaction and AI Capabilities: The built-in microphone and speaker allow for voice interaction, enabling voice control, story-telling, and other AI-based functions. The device can be programmed to access cloud platforms like AWS and Baidu, expanding its capabilities.
  • Wireless Music Playback: Utilizing the BT capabilities of the ESP32, you can wirelessly play music from your mobile phone or tablet, providing a seamless and convenient audio experience.
  • Versatile Connectivity: The ATOM VOICE supports 2.4G Wi-Fi IEEE 802.11b/g/n, allowing for easy and reliable wireless connectivity to the internet and other devices.
  • RGB LED Status Display: The embedded RGB LED (SK6812) visually displays the connection status, providing a clear indication of the device's operational mode and status.
Servo SDA/TX SCL/RX
One servo 26 32
Other servo 32 26

For the servo-write block, the guide gives a 500–2400 microsecond range:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • 500 µs: described as anticlockwise.
  • 2400 µs: described as clockwise.
  • About 1300 µs: described as stop.
  • 600 µs on both servos: described as spinning in place.
  • Values around 600 and 2300 µs: described as possible forward or backward motion, depending on the servo and which side of the chassis it occupies.

These are starting values from the 2022 guide, not guaranteed settings for every servo. With the robot lifted safely, test one motor at a time. If “stop” creeps, adjust the neutral value in small increments; if forward makes one wheel reverse, swap that side’s direction in software rather than rewiring randomly.

Rank #3
Sale
M5Stack Official ATOMS3 Lite ESP32S3 Dev Kit
  • ESP32-S3 WITH WI-FI & 8MB FLASH: Powered by ESP32-S3FN8 with 8 MB SPI Flash and built-in 3D antenna – delivers reliable wireless connectivity for diverse IoT node and embedded smart device applications.
  • ULTRA-COMPACT 24×24mm BODY: Measures just 24.0×24.0×9.5 mm with M2 screw hole mounting – fits into the tightest spaces for seamless integration into smart devices and custom enclosures.
  • IR TRANSMITTER & RGB INDICATOR: Built-in IR transmitter LED and WS2812C-2020 RGB LED provide wireless control output and visual status feedback – ideal for smart home remote control applications.
  • FLEXIBLE GPIO EXPANSION: HY2.0-4P interface plus 6 GPIO female headers (G5/G6/G7/G8/G38/G39) – enables easy sensor and peripheral expansion for versatile embedded IoT builds.
  • USB TYPE-C & MULTI-PLATFORM: USB Type-C enables direct programming and serial communication; supports UiFlow2, Arduino IDE, ESP-IDF & PlatformIO – accessible for beginners and experienced developers alike.

Practical calibration and first run

  1. Raise the chassis so the drive wheels cannot catch fingers or furniture.
  2. Upload the UIFlow program and confirm that the ATOM boots normally.
  3. Set both servos near the guide’s approximately 1300 µs neutral value and verify that they stop.
  4. Test each servo independently at low movement values, recording which pulse direction produces forward motion on each side.
  5. Place the mouse on a clear, flat surface and issue a brief forward command.
  6. Correct steering by matching wheel speeds and checking that the caster rolls freely.

What to verify before buying parts

  • That the ATOM Matrix, TailBat and Grove-T use compatible connectors and the same pin arrangement as the documented build.
  • That the servo kit contains two continuous-rotation (360-degree) units, not positional servos.
  • That your Grove cables can accommodate the documented wire swap without damaging the connector.
  • That you have enough Technic beams, connectors, wheels and a caster to make a rigid chassis.
  • That you are purchasing individual parts rather than expecting a single official LEGO or M5Stack boxed kit.

Limitations of the published project

The available sources establish the parts list, wiring sequence and UIFlow settings, but they do not establish present-day inventory, prices, a current product revision, maze-solving software, runtime, speed or independent test results. Treat the 2022 instructions as a build reference and recheck manufacturer documentation when substituting newer hardware.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Source guide

Use the complete DigiKey Maker.io project guide for its illustrated chassis, wiring and UIFlow examples. The project’s M5Stack listing is available on the M5Stack project hub.

Best Value
M5Stack Atom Matrix ESP32 Dev Kit, Wi-Fi, Dual-Core 240MHz, 4MB Flash, 520KB SRAM, RGB LED Matrix, BMI270 IMU
  • POWERFUL PROCESSOR: Based on ESP32-PICO-D4 dual-core processor running at 240MHz with 520KB SRAM and 4MB flash memory for robust performance in embedded applications.
  • PRECISION MOTION SENSING: Built-in BMI270 6-axis IMU sensor with 3-axis gyroscope and 3-axis accelerometer delivers improved attitude detection accuracy and faster response for motion capture and control.
  • VISUAL DISPLAY: Features a 5x5 RGB LED matrix with 25 WS2812C-2020 LEDs for customizable visual feedback and interactive displays in your projects.
  • WIRELESS CONNECTIVITY: Integrated 2.4GHz Wi-Fi with 3D antenna and infrared transmission capability enables remote control and wireless communication functions.
  • COMPACT AND EXPANDABLE: Ultra-compact design measuring 0.94 x 0.94 x 0.55 inches and weighing 0.26 ounces, with USB Type-C and Grove interface for easy expansion and connectivity.
Rank #4
M5Stack Official Atom Lite ESP32 IoT Development Kit
  • ESP32 WI-FI & 4MB FLASH: Powered by ESP32-PICO-D4 dual-core 240 MHz with 4 MB Flash and built-in 3D antenna – delivers reliable 2.4 GHz Wi-Fi for IoT nodes, wearable devices, and embedded applications.
  • ULTRA-COMPACT 24×24mm BODY: Measures just 24×24×9.5 mm and weighs only 5.5 g with M2 screw hole mounting – fits into the tightest spaces for seamless integration into smart wearable and custom IoT builds.
  • IR TRANSMITTER & RGB LED: Built-in IR transmitter and SK6812 RGB LED provide wireless remote control and visual status feedback – ideal for smart home control and interactive embedded IoT applications.
  • USB TYPE-C & MULTI-PLATFORM: USB Type-C enables direct programming and serial communication; supports UiFlow1/2, Arduino IDE, ESP-IDF & PlatformIO – accessible for beginners and experienced developers alike.
  • 6 GPIO & GROVE EXPANSION: Provides 6 GPIO pins (G19/G21/G22/G23/G25/G33) plus GROVE I2C/I/O/UART interface – enables flexible sensor and peripheral expansion for diverse embedded IoT project builds.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Paint Desk

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.