Foobot Football Game
2016-08-05 | By Steve Barnett
License: None
Foobot is a table football game with two teams of two adorable ATtiny-based robots controlled by classic Nintendo and Sega controllers.
The core of each robot is ATtiny2313 microcontroller, with an SN754410 to control 16000 RPM 9V motors, and a cheap 1402 433 MHz radio receiver module. These are mounted on a simple laser cut perspex frame with two wheels mounted directly onto the motors.
As the radio modules are very simple (and one-way), I decided to avoid the problem of collisions between multiple transmitters by attaching the controllers for all players to a single radio transmitter which reads all of the controllers and sends a packet addressed to each robot in turn. Messages for the robots consist of a robot ID, the message payload and a checksum. Robots ignore all messages not addressed to them and any messages with invalid checksums. Dropped packets or interference are dealt with by hoping the next message with more up to date data will arrive.
The transmitter module is based around a tiny 8-pin ATtiny13 microcontroller. This has just enough pins to read data from all of the controllers and to send a signal to the transmitter module. Some of the lines are shared with the In-Circuit Programming interface for the microcontroller – these were chosen to be the outputs so there was no need to worry about other hardware interfering with programming.
In order to read 4 controllers with 4 pins the transmitter uses a pair of controller interface boards. These have a socket for a Nintendo controller (which contains a shift register so the button states can be read out serially) and a 74LS165 shift register which enables the Master System controller to behave like a NES controller. The 75LS165′s latch line is inverted so a transistor was required to invert this in order for the same latch signal to operate both devices.
I’ve uploaded the project to github, including all of the code, schematics, PCB layouts and chassis/case CAD files.
The intention eventually is to build some games around these robots. Possibly with the ability for a computer to control some of the robots via some image processing, if I’m feeling really ambitious.