The CrabBots use 8 light-sensing photodiodes to "see" the world around them. When the Bot detects a difference from the ambient lighting conditions, it reacts in one of two ways: driving towards the source of the light, or running away. At first, the Bots reacted to stationary beacons that could be moved by outside users, lit up either red or blue. While these reactions may seem simple, when we give the Bots the ability to emit light we can use colored light in conjunction with a bump-sensing accelerometer to facilitiate Bot-to-Bot communication. This communication can be used to get the Bots to "play" with each other -- to show this we've simulated a game of freeze tag, where a blue "it" Bot tries to tag Bots that are illuminated red.
Since our goal was to create several of our little CrabBots, it was important that the mechanical design was able to be manufactured repeatedly and assembled quickly. Our final chassis was 3D printed to allow for rapid manufacturing and made liberal use of snap joints to make putting all the pieces together easy. There are also captive nuts in the chassis for a ‘screw together’ construction of the shell and battery housing.
The two-wheeled, upright design aids in the bots ability to turn in a tight radius, but also tend to make the bot tippy -- the batteries sit in the bottom of the chassis for easy removal for charging and to lower the center of mass. Captive rubberbands on the wheels give CrabBot its traction and aids in rapid response to light. The internal chassis of the Bot is designed to hold the custom PCB snug so electrical connections stayed firm even when the bot is in motion. The photodiodes have dovetail joints connecting them to the head: allowing for simple assembly and disassembly. The CrabHat sits on the top of the Bot's head with a snap fit and provides light to communicate with other bots. The slope of the Bot's body also serves a functional purpose, keeping the photodiodes in the "head" far enough back that, even when directly in front of a beacon or other robot, they can still detect light.
The beacon was also 3D printed. It houses a strip of LEDs that change color, a small circuit board to control the LEDs, and a battery to power everything. The beacon is the user's way to interface with the CrabBot. By changing the light color with a toggle switch, the user can manipulate the bot's direction of motion.
A custom Arduino-based PCB is used to control the robots. The PCB is designed and assembled in-house. It is based off an Arduino Uno board but uses a multiplexer to extend the number of analog pins present, a dual H-bridge motor controller to control the movement of the robot, and a 3-axis accelerometer to detect bumps. Because it shares the same Atmega328-PB microcontroller as the Arduino Uno, the PCB can be programmed using the same Arduino IDE environment. Additional space has been provided for another multiplexer and op-amp circuitry, if needed. The schematic and block diagram for the circuit can be seen in the figures below.
Each of the CrabBots house 4 pairs of light-sensing photodiodes facing four different directions to "see" the world around them. Each pair of photodiodes has a red and blue filter to allow the bot to detect differences in the amount of red and blue light in front of them. Additionally, a NeoPixel LED strip has been mounted on top of the robots to act as a beacon for other bots to read. The combination of these two features allows the robots to transmit and receive their relative location: giving them all the necessary information for a game of tag.
The following image contains the final schematic for our PCB circuitry. THe final schematic contains a more simplified and elegant solution to our photodiode sensing circuit. This greatly reduced the amount of components needed and allowed us to leave parts of the assembled PCB unpopulated.
The main algorithm used by the CrabBots to react to light is shown below. Initially, every photodiode is calibrated to the ambient conditions of the room. The difference between the current reading and the ambient reading is found for each photodiode -- this difference is used to calculate the motor speeds for that time step. This algorithm is used by the robots whether they're reacting to the stationary beacons or to each other.
There are two main programs that can be loaded onto the final CrabBots: the "chased" program, and the "chasing" program, which correspond to the Bot's role in freeze tag. All code for the robots was written in Arduino.
The beacons were also programmed in Arduino, and used a simple program that toggled the color of a strip of LEDs between red, blue, and off with the press of a button.
All of the code for our project can be found here.
EE trying her best to figure out what a for loop is.
Keeps the team caffeinated and the current flowing.
Mechanical Engineer. Web Dev. Token Blonde.
Mechanical designer with big ideas building small robots.
Professional electron herder.
1000 Olin Way