SpongeBot SteelPants
Magnetic robot that erases whiteboard marker strokes using camera detection
Author: Daniel ION
GitHub Project Link: SpongeBot Repository
Description
SpongeBot SteelPants is a two-wheel robot designed to automate the process of cleaning
whiteboards. Clinging magnetically to surfaces via a PWM-controlled electromagnet, the
robot uses a low-res OV7670 camera to detect marker strokes. Once a trace is identified,
the robot navigates over it and wipes it clean using an attached sponge.
The system is built around a Raspberry Pi Pico 2W which handles image processing,
sensor input and motor control. The components have been chosen to keep the bot as
lightweight as possible.
Motivation
The main premise I went with when deciding to build this project was fairly simple:
Why not automate something boring?
Cleaning whiteboards is a repetitive chore that eats up a bit of time every day, so
I decided to build a small robot that could take over that chore - and the good news is,
this robot won't take anyone's job!
Architecture
Log
Week 5 - 11 May
To be updated
Week 12 - 18 May
To be updated
Week 19 - 25 May
To be updated
Hardware
The main components which I've chosen for the robot are the following:
- Raspberry Pi Pico 2W
- Core component that handles image processing, Wi-Fi commands and GPIO for all peripherals
- TB6612FNG Dual Motor Driver
- Dual H-bridge Motor Driver powered directly from battery rail, receives direction and PWM speed from the Pico
- Drives the two GA12-N20 Gearmotors
- D4184 MOSFET Module
- Logic-level gate which receives commands from Pico
- Adjusts the grip of the electromagnet depending on the tilt angle
- GY-521 (MPU-6050 IMU)
- 3-axis accelerometer + 3-axis gyroscope, supplies tilt angle
- The tilt angle commands the adhesion force through the Pico and towards the MOSFET module
- GA12-N20 Gearmotors
- Small and light, these motors provide the torque needed to pull a sponge and a magnet across a whiteboard
- OV7670 Camera Module
- Provides low-res frames, good enough to determine by applying a grayscale where the marker strokes are
- IR Obstacle Sensors (x4)
- IR LEDs mounted at the corners to prevent the robot from falling off the edge of the whiteboard.
- Electromagnet 5 V/25 N
- Strong enough to cling the small robot to the whiteboard
- PWM-driven grip allows for adjustable adhesion
- 0.96 OLED Display
- Indicates the mode which the robot is currently using (cleaning by using the camera module or just simply going around)
- Displays remaining battery charge
Other components:
- WAGO Connectors split the battery rail into separate current branches
- 4xAA Battery Holder powers the robot
- Sponge
- Wires, Breadboards, Jumpers, Diodes, Wheels, Chassis etc.
Schematics
Schematics will be added soon
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | Main microcontroller with Wi-Fi; controls all peripherals | 39.66 RON |
GA12-N20 100:1 Gearmotor | Drives wheels with high torque for sponge movement | 24.99 RON × 2 |
TB6612FNG Motor Driver | Dual H-bridge to control 2 DC motors via PWM | 24.99 RON |
D4184 MOSFET Module | Switches the electromagnet on/off using PWM | 5.00 RON |
GY-521 (MPU-6050) | Measures tilt to adjust magnet force dynamically | 24.16 RON |
OV7670 Camera Module | Captures low-res frames to detect marker strokes | 12.66 RON |
IR Obstacle Sensor | Detects whiteboard edges to prevent falling | 3.07 RON × 4 |
0.96″ OLED Display (SSD1306) | Shows battery level and operating mode | 16.35 RON |
Electromagnet 5V / 25N | Holds robot against whiteboard via magnetic force | ~27.00 RON |
WAGO 5-pin Connector (221-415) | Splits battery power and ground safely | 2.98 RON × 2 |
4×AA Battery Holder | Powers the robot with 4 AA batteries | 6.24 RON |
Miscellaneous (breadboards, wires, diodes, etc.) | Circuit prototyping, motor connection, edge detection, and mechanical assembly | ~70 RON |
Total | - | 294.28 RON |
Software
Library | Description | Usage |
---|---|---|
embassy | Async embedded framework with executors and timers. | Runs tasks concurrently (e.g. motor control, sensors). |
embassy-net | Async network stack (TCP/UDP, DNS, etc.). | Handles communication over Wi-Fi. |
embassy-rp | Embassy HAL for RP2040/RP2350 chips (Pico & Pico W). | Gives async access to GPIO, I²C, SPI, PWM, PIO, etc. |
tb6612fng | Driver for the TB6612FNG dual motor driver. | Used to control direction and speed of both gearmotors. |
mpu6050 | I²C driver for MPU-6050 accelerometer + gyro. | Reads tilt to adjust magnet grip and detect movement. |
ssd1306 | OLED driver for SSD1306 controller over I²C/SPI. | Displays robot mode or battery on 0.96″ screen. |
embedded-graphics | 2D graphics primitives and text rendering. | Renders UI elements on the OLED screen. |
cyw43 | Async Wi-Fi driver for the Pico W’s CYW43439 chip. | Enables Wi-Fi for control or telemetry via Embassy. |