The Opendot Team decided to develop a machine that could maneuver sand-like material using small square magnets and create a Tic-Tac-Toe game usable remotely through a Telegram bot.
According to the initial concept, a metallic ball can move by a magnet into sand-like material in ways that can represent the letter “O” or the letter “X”. By repeating the movement of a ball (or a metal square) to sweep away material to expose an “O” or “X”, individuals could play a Tic-Tac-Toe game. The game could be replayed since the sand-like material could be shaken back into place by hand or by the addition of other programmable components.
The two players can face remotely using the Telegram messaging app: a custom bot receives the commands and places marks on the sand moving the electromagnet (on the bottom) and the metal square (on the the) along the X and Y axis.
Below is the structure scheme (Figure 1).
A Python Telegram bot translates the command to function and X-Y coordinates: using Gestalt nodes, the Python code controls the motors and so move the electromagnet. Two motors are used to control the X and Y motion of the machines. Since we use an electromagnet, which can be turned on and off, we do not need a third motor to control the Z axis.
The sand-like material can be contained in either particle board pockets (Figure 2) or windows (attached to translucent Plexiglas shown in Figure 3). One design could be to use an electromagnet that can control the pick-up and drop-off of the metal squares (Figure 4). Another design could be to use a regular magnet placed on a moveable Z-axis below the board linked to another magnet to be placed above the board to sweep material away, but this was more complicated so we decided to eliminate the Z-axis. Below is a video of the movement required to make an X for the game.
The machine will have an X and Y axis: X axis move Y axis that holds the magnet. Below are the schemes and the X container (Figure 5, 6, 7, 8, 9). After a first quick test we started the debug process: Right now there are some inteference and minor mistakes with the 3D model
The Python Telegram bot receives the command from the smartphone (/new to start a new game, X# or O# to draw a mark in #th cell), moves the electromagnet along the X and Y axis and stops it below the metal square using two Gestalt nodes.
Then, the Python code activates the electromagnet (which is controlloed by an Arduino), draws the mark (X or O) and goes back to the XY origin, ready for the next move.
TicTacToe_Machine.py - Python code for creating the Telegram bot, moving motors, drawing mark and handling the electromagnet.
The current version of the PCB used to control the electromagnet is attached directly to the device, without power driving circuitry. We are aware that exposure to absolute maximum rating conditions for extended periods may affect device reliability. Since the magnet will be activated for just a few seconds during each move, it is acceptable to attach it directly to the pin of the microcontroller.
In production, an external power source and a driving circuit with a transistor should be used. A possible circuit for controlling the electromagnet is bases on a NPN transistor, plus a resistor of 1-10K (dimensioned to limit base drive current coming from the microcontroller pin).
A second possible improvement could be the support for a local player, drawing directly on the sand with a stick, against a remote Telegram player (or an AI driven Telegram bot).