Introduction: Tic Tac Toe Machine

Picture of Tic Tac Toe Machine
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.

Step 1: 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.

Step 2: Electronics

Picture of Electronics

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.

Step 3: Base

Picture of Base

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.

Step 4: Board

Picture of Board
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.


Step 5: Buttons Dispencer

Picture of Buttons Dispencer
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.

Step 6: Sensor

Picture of Sensor

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.

Step 7: Finish

Picture of Finish

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.

Comments

flaming_goat (author)2013-04-02

Great project, nice recycling. Could you speed up the checking code by finishing the check sequence as soon as a new piece is found as there will only be one new piece each turn.

Arlekin85 (author)2013-04-02

Buen trabajo amigo... para jugar solitario :) Saludos desde Chile

rimar2000 (author)2013-04-02

Solo cinco palabras, Bruno: ¡IM PRE SIO NAN TE!

brunoip (author)rimar20002013-04-02

Muchas gracias rimar!

About This Instructable

3,701views

7favorites

License:

Bio: Robots and video games...
More by brunoip:"Analog" Bicycle Speedometer Tic Tac Toe MachineEasy USB charger
Add instructable to: