Tic Tac Toe Machine

by brunoip in Circuits > Microcontrollers

5723 Views, 9 Favorites, 0 Comments

Tic Tac Toe Machine

tateti prev instructables.png
SAM_5530.JPG
This is a simple machine that plays tic tac toe. It was made mostly form dead electronics, like a printer and a DVD reader.
How it works: First we have to put our mark, it is a black square of cardboard, then by pushing a button we send the information that we are ready (if you want the machine to star just press the button without putting any piece). The the machine scans the board using Ir light witch will not be reflected over our piece. The the machine goes to the last step we it decides where put its mark and the cycle repeats until it detects a winner.

Stuff You Need

Basically you just need a dead printer and a dead DVD reader. The motor witch works with the cartridges in the printer and the one witch works with the laser in the DVD reader have to be bipolar steppers motors, so be sure of that.
The plastic parts where taken from the plastic of the printer, be sure to find some straight sheets a cut them from there.

Electronics

SAM_5526.JPG
tateti.PNG
I choose the PIC 16F628A for the micro controller for this project and the L298D as the driver for all the motors, the DC one and the two steppers.
I didn't make a custom PCB, I reused the PCB from a previous ible and completed it with a protoboard, I will upload the files for the custom PCB when I finish it.

Downloads

Base

SAM_4285.JPG
SAM_4291.JPG
SAM_4314.JPG
SAM_4298.JPG
SAM_4301.JPG
SAM_4311.JPG
SAM_4310.JPG
SAM_4314.JPG
SAM_4317.JPG
SAM_5442.JPG
SAM_5450.JPG
SAM_5448.JPG
The cartridge tray of my printer was the only part made of metal and it was pretty easy to took it out.
Once out I removed the cartridges and cut the platform in order to make it flat, here is where the board will rest.
Finally add two pieces of plastic in the borders for stabilization.

Board

SAM_5437.JPG
SAM_5313.JPG
SAM_5431.JPG
SAM_5427.JPG
SAM_5456.JPG
SAM_5510.JPG
First I was going to use the entire mechanism that moves the laser in the DVD reader but then I decided to make a new one in order to make it smaller but both will work.
Then make a small board using the plastic of a credit card and glue it over.


Buttons Dispencer

SAM_5468.JPG
SAM_5472.JPG
SAM_5474.JPG
SAM_5463.JPG
SAM_5481.JPG
SAM_5505.JPG
Using the other motor from the DVD reader (the one that opens the disc tray) I made this "button pushing" mechanism.
The video shows how it works.
It have to be placed at the end of the printer base in order that the button that it pushes will fall over the last square of the board.

Sensor

SAM_5478.JPG
SAM_5479.JPG
SAM_5497.JPG
circuito.PNG
The sensor works using the reflection of the Ir light.
While in the "scan mode" if the Ir transistor stops receiving the light it mean that under the sensor there is a black cardboard and that position is recorded.
The Ir receptor comes from an old dead mouse and the led Ir from a remote control.
The green led is there just for confirmation that it is working but is not necessary to use it.

Finish

SAM_5499 copia.JPG
Test that everything works fine and now you have your own tic tac toe playing machine.
Let me know if you find any grammar mistake or need more information in any step.