Introduction: Whiteboard Erasing Robot
My entry for the Microcontroller contest is a whiteboard cleaning robot. The goal of this project was to create a robot which could erase written text on a whiteboard completely autonomously, i.e. no human interface. The processes involved in this project included devising a method for the robot to search a whiteboard for text, designing a way to physically move a robot to the text, and enabling a robot to erase the text.
Step 1: Parts/System Break Down
Arduino Mega Protoshield, with 2 mini breadboards and jumpers
3 VEX motors
BlueSmirf Bluetooth Adapter (located in the yellow VEX case with antenna)
RoboRealm Vision Software
VEX linear sliders
VEX Rack and Pinion gears
VEX 9.6V Battery
4 VEX small wheels
Vex metal, screws, etc.
This project is made up of two main sections. The first section is the actual robot. The robot in theory is somewhat simple. It consists of a base with two wheels which rides on a whiteboard track. The base design allows the robot to cover the entire x-axis of the whiteboard. To move on the y-axis, the robot uses linear sliders to move an arm up and down. Attached to the end of the arm is a dry-eraser that does the actual erasing.
Building the robot is not hard. It just consists of 2 motors which each respectively drive 2 small VEX wheels.
Step 2: Computer Vision
The second section, and more complicated part of the project, is the webcam and computer base control station located opposite the whiteboard. Utilizing an standard webcam and vision software at the computer base station, the robot locates any text anywhere on the whiteboard. It does this by using a series of filters and processing functions within the vision software, RoboRealm. In RoboRealm I used many different filters to find the center-of-gravity of the text on the whiteboard. The center of gravity cannot be found based on just the webcam image. I first used a RGB filter to eliminate everything but the green writing. Then the color is inverted by a Negative filter. The image is then converted from the Negative image ( the pink “hello”) to black and white using a gray-scale filter. This is necessary because the center of gravity can only be found on a black and white image. Then a center-of-gravity module is used to find the center of gravity. RoboRealm is a great software that has many uses and features. To find out more about the software go to www.RoboRealm.com
*The code that is attached is a basic proof of concept code. It shows how the eraser would move to the text, no matter where it is on the whiteboard. Move your mouse to simulate where the text is written. In order to use the code, you need a copy of RoboRealm. The standard cost is $89, or you can download a 30-day free trial at http://www.roborealm.com/registration/index.php
Step 3: Microcontroller Control
Once the program finds the center of gravity of the writing on the whiteboard, it is converted to a point on a coordinate plane. Then using basic math, the program tells the robot to move to this point using motor commands derived from the point on the coordinate plane. All of the math and calculations are performed on the computer and only the motor commands are sent to the robot via Bluetooth. Performing the math on the computer and not on the actual robot makes the system perform significantly faster and smoother. In this case the microcontroller is only acting as a physical interface. The only code that gets loaded onto the Arduino Mega is an interface code that allows RoboRealm to communicate with the Mega.
The code attached is the interface code that allows the Mega to communicate over Bluetooth to RoboRealm software.
Step 4: Versatility
One of the original goals of this project was versatility. This robot is designed to work on any whiteboard at my high school. Every whiteboard in the school has a track at the bottom for holding markers and erasers. By designing the robot to ride on this track, it can work anywhere in the school.
However riding on this track proved a bigger challenge than I originally anticipated. The track at the bottom of the whiteboard is very narrow. In order to get the robot to stay on this track, I had to build the center of gravity directly over the track; otherwise it would fall off (which happened very frequently in the early design stages). This gave me a very small area to work in and I had to fit all the heavy parts into a tight area, hence the very messy and awkward placement of the battery and microcontroller.
Step 5: Conclusion
- Automatic schedule, for example: erase every 10 minutes
- Work with voice command instead of a webcam
- A light sensor which would trigger the robot to erase the entire whiteboard when the lights go off i.e. when the teacher leaves the class room for the night
- Only erasing certain color writing. Since the program uses a RGB filter, the robot could theoretically erase only red, green, blue, yellow, or cyan colored writing