This is an old revision of the document!


Tic Tac Toe

Introduction

Name: Manea Andrei Iulian
Group: 331CB
Assistant: Alex Văduva

Description
The project is a physical implementation of the game Tic Tac Toe. Additionally, a speaker will play music in the background for better ambiance, there will be a buzzer to introduce a time limit for each move; it will signal when the player has 5 seconds left. Also, there will be a LED strip for a better visual effect.

Motivation
I think this is a fun game that I always used to play as a kid, so it's an additional motivation for me to implement it. It's simple, yet effective, and the fact that I can have „a pocket version” of it would mean a lot to me.

General description

I used two Arduino UNO R3 as µCs. For inputs, I will have a keyboard with four buttons for moving around the Tic Tac Toe grid and an additional button for selecting in which tile a symbol will go. The music will be played using microSD card reader for the input and a speaker for the output. A buzzer will also be used to signal the last five seconds until the player will have to make a move and the LED Strip will be used for visual enhancement. Finally, an LCD will be used to display the actual game.

Hardware Design

Materials:
2 x Arduino UNO R3
2 x mini breadboard
1 x button
1 x keyboard with 4 buttons
1 x LCD 1.44” SPI and ST7735 controller
1 x microSD/SDHC card module reader
1 x SDHC card
1 x speaker
1 X buzzer
1 X LED strip
1 X LED
3 X MOSFET N-MOS IRF540N transistor
1 X 220Ohm resistor
1 x XPT8871 mono audio amplifier
plenty of male-male and male-female wires

Circuit Layout

Circuit Design

Circuit Implementation

1. Arduino Uno (Rev3)

  • Role: Central controller. Drives SPI for the display and SD, outputs PWM for audio/buzzer and scans the keypad.
  • Power: Can use its onboard 5 V regulator (from VIN) or the two external AMS1117 regulators shown.

2. Voltage Regulators (U1 & U3)

  • U1 (AMS1117-5 V):
    • Input: 7-12 V
    • Output: 5 V rail feeding:
      • Arduino 5 V pin
      • WS2812 LEDs
      • PAM8403 audio amp
      • Buzzer (through its series resistor)
  • U3 (AMS1117-3.3 V)
    • Input: same VIN
    • Output: 3.3 V rail feeing:
      • TFT module
      • MicroSD module

3. TFT Display

  • Power & Backlight
    • VCC → 3.3 V
    • GND → common ground
    • LED + (backlight) → 5 V
  • SPI Signals (sharing the SPI bus)
    • SCK → D13 (hardware SCK)
    • MOSI → D11
    • CS → D10
    • DC → D9 (Data / Command select)
    • RST → D8

4. MicroSD Card Module

  • Power
    • VCC → 3.3 V
    • GND → common ground
  • SPI (same bus, separate CS)
    • MOSI → D11
    • MISO → D12
    • SCK → D13
    • CS → D4
  • Separate CS allows the Arduino to select either the TFT or the SD card independently.

5. Audio Amplifier Module (PAM8403) + Speaker

  • Power
    • VCC → 5 V
    • GND → common ground
  • Inputs
    • L IN / R IN → PWM-filtered audio from Arduino
  • Outputs
    • L OUT / R OUT → speaker
  • Function: Boosts the Arduino's low-level PWM audio to drive a few-watt speaker.

6. Passive Buzzer

  • Connections
    • One leg → D3 (PWM) through a 220 Ω resistor
    • Other leg → GND
  • Function: Generates tones / alerts by toggling PWM at audio frequencies.

Real-life Circuit

Software Design

Descrierea codului aplicaţiei (firmware):

  • mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR)
  • librării şi surse 3rd-party (e.g. Procyon AVRlib)
  • algoritmi şi structuri pe care plănuiţi să le implementaţi
  • (etapa 3) surse şi funcţii implementate

Rezultate Obţinute

Care au fost rezultatele obţinute în urma realizării proiectului vostru.

Concluzii

Download

O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului: surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-).

Fişierele se încarcă pe wiki folosind facilitatea Add Images or other files. Namespace-ul în care se încarcă fişierele este de tipul :pm:prj20??:c? sau :pm:prj20??:c?:nume_student (dacă este cazul). Exemplu: Dumitru Alin, 331CC → :pm:prj2009:cc:dumitru_alin.

Journal

06.05.2025 - decided on the project, wrote the description and the hardware materials
11.05.2025 - materials bought, starting on the hardware design
18.05.2025 - finished hardware design
19.05.2025 - uploaded circuit design and circuit layout

Bibliografie/Resurse

Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe Resurse Software şi Resurse Hardware.

Export to PDF

pm/prj2025/avaduva/andrei_iulian.manea.1747828125.txt.gz · Last modified: 2025/05/21 14:48 by andrei_iulian.manea
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0