Skip to content

ArduinoTITO-PlayerTracking

A homebrew slot machine TITO, player tracking and display project

Lihan__

Published July 06, 2026

Original author: marcrdavisOriginal source (new tab)

ArduinoTITO-PlayerTracking

Project description

Arduino TITO & Player Tracking โ€” Casino-Grade Ticketing and Loyalty for Your Home Slot Machine

#TITO #SASProtocol #PlayerTracking #W5100 #TOE #EthernetServer #ArduinoMega #RFID #RemoteManagement #RetroGaming

๐Ÿ“š Context: Long-running open-source hobby/enthusiast project (v1 โ†’ v4, actively maintained; v4.0 build 20260623) Implementation verified: full 3,200-line Mega sketch, W5100 Ethernet Shield, EthernetServer on port 80 + EthernetClient reporting, SAS protocol over Serial1, KiCad-free but PDF-documented hardware wiring.


01 โ€” What is this project?

Casinos use a deceptively sophisticated stack behind every slot machine. TITO (Ticket In / Ticket Out) is the industry mechanism that replaced coin hoppers: instead of dropping coins, a machine prints a barcoded voucher when you cash out, and accepts one when you sit down. Behind that sits SAS (Slot Accounting System) โ€” the Gaming-standard serial protocol, spoken by virtually every modern slot machine, that lets a host system read meters (credits, coin-in, games played, jackpots), issue commands (lock/unlock, enable/disable bill validator, mute), and validate tickets. On top of both runs player tracking: the loyalty layer that identifies a player by card, follows their play, and drives the little display on the machine that says "Welcome back."

For a home slot-machine owner โ€” a surprisingly active collector community โ€” all of that is normally locked inside proprietary casino management systems that cost more than the machine itself. There is no consumer product that gives a hobbyist TITO, remote control, and player tracking for a game sitting in their basement.

This project closes that gap. Using an Arduino Mega 2560 and a WIZnet W5100 Ethernet Shield, it implements a working slice of the real casino stack: it speaks SAS to any SAS-compatible game, prints and redeems TITO tickets, exposes a web management console for remote control, and pushes live play data to a central player-tracking server โ€” while reusing the machine's existing display, keypad, and card-reader hardware. Version 4.0 adds a rewritten web console for every network-enabled sketch and remote SD-card file updates.

The result: a homebrew board that turns a standalone slot machine into a networked, remotely-managed, loyalty-aware device โ€” the kind of thing that normally requires a casino IT department.

02 โ€” Why networked TITO & player tracking?

๐Ÿ”ท The serial protocol is only half the problem

Talking SAS over a serial line to one machine is a solved problem. The hard part is everything around it: getting meter data off the machine, letting an operator manage the game without standing in front of it, and correlating a physical RFID card with a player record. Every one of those is a network problem, not a serial one. The moment you want remote control and centralized player tracking, you need a reliable TCP/IP endpoint bolted onto a microcontroller.

๐Ÿ”ท Two network roles at once

What makes this project architecturally interesting is that the same board plays both sides of the network conversation:

  • As an HTTP server (EthernetServer server(80)), it serves a web management console so an operator can lock/unlock the game, toggle the bill validator, reset jackpots, and view configuration from a browser.
  • As an HTTP client (EthernetClient โ†’ client.connect(serverIP, 80)), it reports each card-in event and the player's session meters (credits, coin-in, games won/lost, total won) to a separate player-tracking server via a GET /?pu&cardID=โ€ฆ&data=โ€ฆ request.

Doing both, reliably, on an Arduino Mega's limited RAM โ€” alongside the SD and SAS libraries โ€” is exactly why the hardware TCP/IP offload of the WIZnet chip matters.

๐Ÿ”ท Reusing existing hardware

The project deliberately drives the machine's existing player-tracking display, keypad, and card reader. That constraint โ€” retrofit, don't replace โ€” is what makes it genuinely useful to the collector community rather than a lab demo.

03 โ€” System architecture

03 โ€” System architecture

04 โ€” Why WIZnet W5100? โญ

๐Ÿ”ท The technical core

The Arduino Mega 2560 has just 8 KB of SRAM. Running a full software TCP/IP stack (like the classic ENC28J60 + UIPEthernet path) on top of the SAS protocol handler, an IniFile config parser, the SD library, RFID, keypad, and display drivers would exhaust RAM and destabilize the whole system โ€” the README's changelog explicitly documents earlier stability problems caused by "the memory requirements of the Ethernet and SD libraries." The W5100 solves this at the hardware level.

๐Ÿ”ท Socket mode used โ€” TOE / TCP (Sn_MR_TCP)

This project uses the W5100's hardwired TCP mode (TOE โ€” TCP/IP Offload Engine) on both of its sockets:

  • Listening socket โ€” EthernetServer server(80) โ†’ server.begin() puts a socket into TCP listen for the web management console (equivalent to Sn_MR_TCP + listen()).
  • Client socket โ€” client.connect(serverIP, 80) opens an outbound TCP connection to the player-tracking server to report card and meter data.

The entire TCP handshake, retransmission, windowing, and checksum work happens inside the W5100 silicon. The Mega only reads and writes socket buffers over SPI โ€” no lwIP, no software stack, no per-packet CPU cost. That is precisely what lets a memory-constrained 8-bit MCU serve HTTP and act as an HTTP client while simultaneously running a real-time casino serial protocol.

๐Ÿ”ท Advantage over alternatives

  • vs ENC28J60 (software stack): ENC28J60 is a MAC+PHY only โ€” the MCU must run the full TCP/IP stack in SRAM. On a Mega already loaded with SD + SAS + RFID, that path was the documented source of instability. The W5100's onboard stack removes that burden entirely.
  • vs Wi-Fi shields: the README states plainly that "Wifi shields are NOT recommended" โ€” a slot machine on a casino/home floor needs a deterministic, low-latency wired link for meter accuracy and remote-command reliability, not a congested 2.4 GHz radio.
  • Drop-in ecosystem: the standard Arduino Ethernet.h library targets the W5100/W5200/W5500 family directly, so the shield is a true plug-and-play addition to the Mega stack.

๐Ÿ”ท Verified evidence โœ…

  • #include <Ethernet.h> + EthernetServer server(80) + EthernetClient confirmed in the 3,209-line V4 Mega sketch.
  • Header comment specifies the exact hardware: "Arduino Mega 2560 R3; Compatible RFID or magnetic reader; W5100 Ethernet Shield; Serial Port."
  • Configurable MAC (byte mac[]) and static-IP fallback (IPAddress ip(192,168,1,254)) with DHCP as primary โ€” production-grade network setup.
  • Full SAS command table present in code (LOCK, ULOCK, MUTE, EBILL/DBILL bill-validator enable/disable, transComplete, meter reads for credits/coin-in/games/jackpots).
  • Three PDF documentation manuals + a companion Game Manager app + a player-tracking server component โ€” a complete, reproducible system, not a snippet.

05 โ€” Key components

๐ŸŒ WIZnet W5100 โ€” TOE / TCP mode (dual socket: HTTP server + HTTP client)

Provides the hardware TCP/IP offload that makes networked TITO possible on an 8-bit Mega. One socket listens on port 80 for the web management console; another connects outbound to the player-tracking server. All TCP mechanics run in-chip over SPI.

๐ŸŽฐ Arduino Mega 2560 R3

The host controller. Chosen over the Uno specifically for its larger SRAM and multiple hardware serial ports โ€” Serial1 @ 19200 is dedicated to the SAS/TITO link with the game, leaving USB serial free for debugging.

๐Ÿ’ณ MFRC522 RFID reader

Identifies the player by card and triggers the "card-in" event that starts a tracked session and reports to the central server. (Magnetic-stripe readers are also supported via commented MagStripe includes.)

โŒจ๏ธ Keypad + LCD/VFD display

The on-machine operator/player interface. The keypad issues live SAS commands (mute, lock, enable bill validator); the display reuses the slot machine's existing player-tracking panel.

๐Ÿ’พ SD card

Stores the config file (IniFile), the web-console HTML, and player/bonus/admin card definitions โ€” and in v4 can be updated remotely over the network.

๐Ÿ“ก SAS protocol layer (Serial1)

A partial Arduino implementation of the Gaming-standard Slot Accounting System, reading meters and issuing machine commands โ€” the bridge between the physical game and the networked world.

06 โ€” Application scenarios

01. Home slot-machine collector

Retrofit a garage or game-room slot machine with real TITO ticketing and remote management โ€” cash out to a printed voucher, lock the game from a phone browser, all over the home LAN.

02. Small-venue / arcade loyalty

Run a lightweight player-tracking loyalty layer across several machines, each board reporting card sessions and meters to one central server โ€” without a commercial casino-management contract.

03. Remote game administration

Manage a machine you can't physically reach: unlock/lock play, enable or disable the bill validator, reset jackpots, and inspect configuration from the web console โ€” the wired W5100 link keeps commands deterministic.

04. Retro-gaming & protocol education

A rare, fully-documented open-source reference for the SAS protocol and TITO mechanics โ€” valuable to anyone learning how real gaming hardware talks, with the network layer cleanly separated onto the WIZnet chip.

Conclusion

This project rebuilds a slice of a casino's machine-management stack โ€” TITO ticketing, SAS control, and player tracking โ€” on an 8-bit Arduino, and it is the hardware TCP/IP offload of the WIZnet W5100 that makes serving a web console and reporting to a loyalty server possible without collapsing the Mega's memory.

  • โœ… Implements real Gaming-industry mechanisms (TITO + SAS) on hobbyist hardware
  • โœ… W5100 runs in TOE/TCP mode as both HTTP server and HTTP client simultaneously
  • โœ… Offloads the entire TCP/IP stack from an 8-bit MCU already saturated with SD + SAS + RFID
  • โœ… Wired Ethernet chosen deliberately over Wi-Fi for command/meter reliability
  • โœ… Actively maintained across four major versions (latest build 20260623)
  • โœ… Complete, reproducible system: firmware + Game Manager app + tracking server + three PDF manuals
  • โœ… Retrofits existing machine hardware rather than replacing it
  • โœ… Demonstrates that casino-grade ticketing and loyalty gear is another place a WIZnet chip quietly lives

And the reach point: even the ticketing and player-tracking electronics behind a slot machine โ€” a domain almost nobody associates with hobbyist Ethernet โ€” run on a WIZnet chip.

 

07 โ€” Similar Projects on WIZnet Makers

This project sits at the intersection of two families already present on WIZnet Makers: networked cashless-payment / vending controllers and Ethernet game peripherals. All of them lean on a WIZnet chip's TCP link to move money, credits, or input data off a machine โ€” the same architectural need TITO has.

  • mdb-arduino-cashless โ€” An Arduino Uno bridges the MDB (Multi-Drop Bus) vending protocol to a networked cashless payment flow, with an MFRC522 RFID reader for tap-to-pay. The closest cousin to TITO: MDB is to vending machines what SAS is to slot machines โ€” the standard serial protocol this board lifts onto the network.
  • Vending Machine / Cashless Device Implementation โ€” A vending cashless device (Nottingham Hackspace's Vend2 lineage) that also pairs RFID with a networked payment backend over TCP. Same "authenticate a card โ†’ authorize a transaction on a machine" loop as TITO's card-in event.
  • Ethernet gaming controller with W5500 โ€” A W5500-based Ethernet game controller. Shares TITO's gaming-peripheral-over-wired-Ethernet angle, but points the other direction: sending player input into a game rather than metering a game's output.

Comparison

ProjectCore MCUWIZnet roleMachine protocolCard / authDirection of dataServer/Client
Arduino TITO & Player Tracking (this)Arduino Mega 2560W5100 ยท TCP (TOE)SAS (slot machine)MFRC522 RFIDMeters out + remote cmds inBoth (HTTP server + client)
mdb-arduino-cashlessArduino UnoW5x00 ยท TCPMDB (vending)MFRC522 RFIDPayment authClient-side payment flow
Vending / Cashless (Vend2)ArduinoW5x00 ยท TCPVending (Vend2)RFIDPayment authNetworked backend
Ethernet gaming controller(controller board)W5500 ยท TCPโ€” (HID-style input)โ€”Input in to gameTCP link

Q&A

Q. Which WIZnet socket mode does this use, and why not UDP? A. It uses TOE / TCP mode (Sn_MR_TCP). Both the web management console (inbound) and the player-tracking reports (outbound) are HTTP, which is TCP-based โ€” reliable, ordered delivery matters for meter data and remote commands, so TCP is the correct choice over UDP.

Q. Why a W5100 and not just an ENC28J60 to save cost? A. The ENC28J60 is MAC+PHY only and forces the MCU to run the TCP/IP stack in software/SRAM. The README's changelog documents that the combined memory footprint of the Ethernet-plus-SD software path was a real source of instability on the Uno-class hardware. The W5100's in-silicon stack removes that RAM pressure โ€” essential when the Mega is already running SAS, SD, RFID, keypad, and display code.

Q. Could this move to a W5500 or W55RP20? A. Yes, cleanly. The standard Ethernet.h library covers the whole W5100/W5200/W5500 family, so a W5500 shield would be close to a drop-in upgrade with more sockets and higher SPI throughput. A W55RP20 (RP2040 + W5500-in-package) would be an interesting single-chip modernization, though it would mean porting the Mega-specific SAS timing to the RP2040.

Q. Is this legal / is it a cheating device? A. No. It reads standard SAS meters and manages a machine the owner controls โ€” the same read/command operations a legitimate casino host system performs. It targets home collectors and small venues managing their own hardware, not tampering with third-party machines.


[ํ•œ๊ธ€ ๋ฒ„์ „]

Arduino TITO & Player Tracking โ€” ์šฐ๋ฆฌ ์ง‘ ์Šฌ๋กฏ๋จธ์‹ ์— ์นด์ง€๋…ธ๊ธ‰ ํ‹ฐ์ผ“ํŒ…๊ณผ ๋ฉค๋ฒ„์‹ญ์„ ์–น๋‹ค

#TITO #SASํ”„๋กœํ† ์ฝœ #PlayerTracking #W5100 #TOE #EthernetServer #ArduinoMega #RFID #์›๊ฒฉ๊ด€๋ฆฌ #๋ ˆํŠธ๋กœ๊ฒŒ์ด๋ฐ

๐Ÿ“š ์ปจํ…์ŠคํŠธ: ์˜ค๋ž˜ ์œ ์ง€๋œ ์˜คํ”ˆ์†Œ์Šค ์ทจ๋ฏธ/์• ํ˜ธ๊ฐ€ ํ”„๋กœ์ ํŠธ (v1 โ†’ v4, ํ™œ๋ฐœํžˆ ์œ ์ง€๋ณด์ˆ˜ ์ค‘; v4.0 ๋นŒ๋“œ 20260623) ๊ตฌํ˜„ ๊ฒ€์ฆ: 3,200์ค„์งœ๋ฆฌ Mega ์Šค์ผ€์น˜ ์ „์ฒด ํ™•์ธ, W5100 ์ด๋”๋„ท ์‹ค๋“œ, 80ํฌํŠธ EthernetServer + EthernetClient ๋ฆฌํฌํŒ…, Serial1์„ ํ†ตํ•œ SAS ํ”„๋กœํ† ์ฝœ, PDF๋กœ ๋ฌธ์„œํ™”๋œ ํ•˜๋“œ์›จ์–ด ๋ฐฐ์„ .


01 โ€” ์ด ํ”„๋กœ์ ํŠธ๋Š” ๋ฌด์—‡์ธ๊ฐ€?

์นด์ง€๋…ธ์˜ ๋ชจ๋“  ์Šฌ๋กฏ๋จธ์‹  ๋’ค์—๋Š” ์˜์™ธ๋กœ ์ •๊ตํ•œ ์‹œ์Šคํ…œ์ด ๋Œ์•„๊ฐ„๋‹ค. TITO(Ticket In / Ticket Out)๋Š” ๋™์ „ ํ˜ธํผ๋ฅผ ๋Œ€์ฒดํ•œ ์—…๊ณ„ ํ‘œ์ค€ ๋ฐฉ์‹์ด๋‹ค. ๋™์ „์„ ์Ÿ์•„๋‚ด๋Š” ๋Œ€์‹ , ์ •์‚ฐํ•  ๋•Œ ๋ฐ”์ฝ”๋“œ๊ฐ€ ์ฐํžŒ ๋ฐ”์šฐ์ฒ˜๋ฅผ ์ถœ๋ ฅํ•˜๊ณ , ๊ฒŒ์ž„์„ ์‹œ์ž‘ํ•  ๋•Œ ๊ทธ ๋ฐ”์šฐ์ฒ˜๋ฅผ ๋ฐ›์•„๋“ค์ธ๋‹ค. ๊ทธ ์•„๋ž˜์—๋Š” SAS(Slot Accounting System)๊ฐ€ ์žˆ๋‹ค. ๊ฑฐ์˜ ๋ชจ๋“  ํ˜„๋Œ€ ์Šฌ๋กฏ๋จธ์‹ ์ด ์‚ฌ์šฉํ•˜๋Š” ๊ฒŒ์ด๋ฐ ์—…๊ณ„ ํ‘œ์ค€ ์‹œ๋ฆฌ์–ผ ํ”„๋กœํ† ์ฝœ๋กœ, ํ˜ธ์ŠคํŠธ ์‹œ์Šคํ…œ์ด ๋ฏธํ„ฐ๊ฐ’(ํฌ๋ ˆ๋”ง, ์ฝ”์ธ์ธ, ๊ฒŒ์ž„ ์ˆ˜, ์žญํŒŸ)์„ ์ฝ๊ณ , ๋ช…๋ น(์ž ๊ธˆ/ํ•ด์ œ, ์ง€ํ์ธ์‹๊ธฐ ํ™œ์„ฑํ™”/๋น„ํ™œ์„ฑํ™”, ์Œ์†Œ๊ฑฐ)์„ ๋‚ด๋ฆฌ๊ณ , ํ‹ฐ์ผ“์„ ๊ฒ€์ฆํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค€๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ด ๋‘˜ ์œ„์— ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น์ด ์–นํžŒ๋‹ค. ์นด๋“œ๋กœ ํ”Œ๋ ˆ์ด์–ด๋ฅผ ์‹๋ณ„ํ•˜๊ณ , ํ”Œ๋ ˆ์ด๋ฅผ ์ถ”์ ํ•˜๊ณ , ๋จธ์‹ ์— ๋ถ™์€ ์ž‘์€ ๋””์Šคํ”Œ๋ ˆ์ด์— "๋‹ค์‹œ ์˜ค์‹  ๊ฑธ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค"๋ฅผ ๋„์šฐ๋Š” ๋ฉค๋ฒ„์‹ญ ๊ณ„์ธต์ด๋‹ค.

์ง‘์— ์Šฌ๋กฏ๋จธ์‹ ์„ ๋‘๋Š” ์†Œ์œ ์ž โ€” ์˜์™ธ๋กœ ํ™œ๋ฐœํ•œ ์ˆ˜์ง‘๊ฐ€ ์ปค๋ฎค๋‹ˆํ‹ฐ๊ฐ€ ์กด์žฌํ•œ๋‹ค โ€” ์—๊ฒŒ ์ด ๋ชจ๋“  ๊ฑด ๋ณดํ†ต ๋จธ์‹  ๊ฐ’๋ณด๋‹ค ๋น„์‹ผ ์ƒ์šฉ ์นด์ง€๋…ธ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ ์•ˆ์— ์ž ๊ฒจ ์žˆ๋‹ค. ์ง€ํ•˜์‹ค์— ๋†“์ธ ๊ฒŒ์ž„๊ธฐ ํ•˜๋‚˜์— TITO, ์›๊ฒฉ ์ œ์–ด, ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น์„ ๋ถ™์—ฌ์ฃผ๋Š” ์†Œ๋น„์ž์šฉ ์ œํ’ˆ์€ ์—†๋‹ค.

์ด ํ”„๋กœ์ ํŠธ๊ฐ€ ๋ฐ”๋กœ ๊ทธ ๊ฐ„๊ทน์„ ๋ฉ”์šด๋‹ค. Arduino Mega 2560๊ณผ WIZnet W5100 ์ด๋”๋„ท ์‹ค๋“œ๋กœ, ์ง„์งœ ์นด์ง€๋…ธ ์Šคํƒ์˜ ๋™์ž‘ํ•˜๋Š” ์ผ๋ถ€๋ฅผ ๊ตฌํ˜„ํ•œ๋‹ค. SAS ํ˜ธํ™˜ ๊ฒŒ์ž„๊ธฐ์™€ SAS๋กœ ํ†ต์‹ ํ•˜๊ณ , TITO ํ‹ฐ์ผ“์„ ์ถœ๋ ฅยท์ƒํ™˜ํ•˜๊ณ , ์›๊ฒฉ ์ œ์–ด์šฉ ์›น ๊ด€๋ฆฌ ์ฝ˜์†”์„ ์—ด๊ณ , ์‹ค์‹œ๊ฐ„ ํ”Œ๋ ˆ์ด ๋ฐ์ดํ„ฐ๋ฅผ ์ค‘์•™ ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ์„œ๋ฒ„๋กœ ๋ฐ€์–ด์˜ฌ๋ฆฐ๋‹ค. ๊ทธ๊ฒƒ๋„ ๋จธ์‹ ์˜ ๊ธฐ์กด ๋””์Šคํ”Œ๋ ˆ์ดยทํ‚คํŒจ๋“œยท์นด๋“œ๋ฆฌ๋”๋ฅผ ๊ทธ๋Œ€๋กœ ์žฌํ™œ์šฉํ•˜๋ฉด์„œ. v4.0์€ ๋ชจ๋“  ๋„คํŠธ์›Œํฌ ์ง€์› ์Šค์ผ€์น˜์— ์ƒˆ๋กœ ์ž‘์„ฑ๋œ ์›น ์ฝ˜์†”๊ณผ ์›๊ฒฉ SD์นด๋“œ ํŒŒ์ผ ์—…๋ฐ์ดํŠธ๋ฅผ ์ถ”๊ฐ€ํ–ˆ๋‹ค.

๊ฒฐ๊ณผ๋ฌผ์€, ๋…๋ฆฝํ˜• ์Šฌ๋กฏ๋จธ์‹ ์„ ๋„คํŠธ์›Œํฌ์— ์—ฐ๊ฒฐ๋œ, ์›๊ฒฉ ๊ด€๋ฆฌ ๊ฐ€๋Šฅํ•œ, ๋ฉค๋ฒ„์‹ญ์„ ์ธ์‹ํ•˜๋Š” ์žฅ์น˜๋กœ ๋ฐ”๊ฟ”์ฃผ๋Š” ์ž์ž‘ ๋ณด๋“œ๋‹ค. ๋ณดํ†ต์€ ์นด์ง€๋…ธ IT ๋ถ€์„œ๊ฐ€ ์žˆ์–ด์•ผ ๊ฐ€๋Šฅํ•œ ๊ทธ๋Ÿฐ ๊ฒƒ ๋ง์ด๋‹ค.

02 โ€” ์™œ ๋„คํŠธ์›Œํฌ ๊ธฐ๋ฐ˜ TITO์™€ ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น์ธ๊ฐ€?

๐Ÿ”ท ์‹œ๋ฆฌ์–ผ ํ”„๋กœํ† ์ฝœ์€ ๋ฌธ์ œ์˜ ์ ˆ๋ฐ˜์ผ ๋ฟ

๋จธ์‹  ํ•œ ๋Œ€์™€ ์‹œ๋ฆฌ์–ผ๋กœ SAS๋ฅผ ์ฃผ๊ณ ๋ฐ›๋Š” ๊ฑด ์ด๋ฏธ ํ’€๋ฆฐ ๋ฌธ์ œ๋‹ค. ์–ด๋ ค์šด ๊ฑด ๊ทธ ์ฃผ๋ณ€ ์ „๋ถ€๋‹ค. ๋จธ์‹ ์—์„œ ๋ฏธํ„ฐ ๋ฐ์ดํ„ฐ๋ฅผ ๋นผ๋‚ด๊ณ , ์šด์˜์ž๊ฐ€ ๋จธ์‹  ์•ž์— ์„œ์ง€ ์•Š๊ณ ๋„ ๊ฒŒ์ž„์„ ๊ด€๋ฆฌํ•˜๊ณ , ๋ฌผ๋ฆฌ์  RFID ์นด๋“œ๋ฅผ ํ”Œ๋ ˆ์ด์–ด ๋ ˆ์ฝ”๋“œ์™€ ์—ฐ๊ฒฐํ•˜๋Š” ๊ฒƒ. ์ด ํ•˜๋‚˜ํ•˜๋‚˜๊ฐ€ ์‹œ๋ฆฌ์–ผ์ด ์•„๋‹ˆ๋ผ ๋„คํŠธ์›Œํฌ ๋ฌธ์ œ๋‹ค. ์›๊ฒฉ ์ œ์–ด์™€ ์ค‘์•™ ์ง‘์ค‘์‹ ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น์„ ์›ํ•˜๋Š” ์ˆœ๊ฐ„, ๋งˆ์ดํฌ๋กœ์ปจํŠธ๋กค๋Ÿฌ์— ์‹ ๋ขฐํ•  ์ˆ˜ ์žˆ๋Š” TCP/IP ์—”๋“œํฌ์ธํŠธ๋ฅผ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

๐Ÿ”ท ํ•œ ๋ณด๋“œ๊ฐ€ ๋„คํŠธ์›Œํฌ์˜ ์–‘์ชฝ ์—ญํ• ์„ ๋™์‹œ์—

์ด ํ”„๋กœ์ ํŠธ๊ฐ€ ์•„ํ‚คํ…์ฒ˜์ ์œผ๋กœ ํฅ๋ฏธ๋กœ์šด ์ง€์ ์€, ๊ฐ™์€ ๋ณด๋“œ๊ฐ€ ๋„คํŠธ์›Œํฌ ๋Œ€ํ™”์˜ ์–‘์ชฝ์„ ๋ชจ๋‘ ์ˆ˜ํ–‰ํ•œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

  • HTTP ์„œ๋ฒ„๋กœ์„œ(EthernetServer server(80)), ์›น ๊ด€๋ฆฌ ์ฝ˜์†”์„ ์ œ๊ณตํ•ด ์šด์˜์ž๊ฐ€ ๋ธŒ๋ผ์šฐ์ €์—์„œ ๊ฒŒ์ž„ ์ž ๊ธˆ/ํ•ด์ œ, ์ง€ํ์ธ์‹๊ธฐ ํ† ๊ธ€, ์žญํŒŸ ๋ฆฌ์…‹, ์„ค์ • ์กฐํšŒ๋ฅผ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ๋‹ค.
  • HTTP ํด๋ผ์ด์–ธํŠธ๋กœ์„œ(EthernetClient โ†’ client.connect(serverIP, 80)), ์นด๋“œ ์ธ์‹ ์ด๋ฒคํŠธ์™€ ํ”Œ๋ ˆ์ด์–ด์˜ ์„ธ์…˜ ๋ฏธํ„ฐ(ํฌ๋ ˆ๋”ง, ์ฝ”์ธ์ธ, ์Šน/ํŒจ ๊ฒŒ์ž„ ์ˆ˜, ์ด ํš๋“์•ก)๋ฅผ ๋ณ„๋„์˜ ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ์„œ๋ฒ„๋กœ GET /?pu&cardID=โ€ฆ&data=โ€ฆ ์š”์ฒญ์œผ๋กœ ๋ณด๊ณ ํ•œ๋‹ค.

์ด ๋‘ ๊ฐ€์ง€๋ฅผ Arduino Mega์˜ ์ œํ•œ๋œ RAM์—์„œ โ€” SD์™€ SAS ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊นŒ์ง€ ํ•จ๊ป˜ ๋Œ๋ฆฌ๋ฉด์„œ โ€” ์•ˆ์ •์ ์œผ๋กœ ํ•ด๋‚ด๋Š” ๊ฒƒ, ๋ฐ”๋กœ ๊ทธ๊ฒƒ์ด WIZnet ์นฉ์˜ ํ•˜๋“œ์›จ์–ด TCP/IP ์˜คํ”„๋กœ๋“œ๊ฐ€ ์ค‘์š”ํ•œ ์ด์œ ๋‹ค.

๐Ÿ”ท ๊ธฐ์กด ํ•˜๋“œ์›จ์–ด ์žฌํ™œ์šฉ

์ด ํ”„๋กœ์ ํŠธ๋Š” ์˜๋„์ ์œผ๋กœ ๋จธ์‹ ์˜ ๊ธฐ์กด ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ๋””์Šคํ”Œ๋ ˆ์ด, ํ‚คํŒจ๋“œ, ์นด๋“œ๋ฆฌ๋”๋ฅผ ๊ทธ๋Œ€๋กœ ๊ตฌ๋™ํ•œ๋‹ค. "๊ต์ฒดํ•˜์ง€ ๋ง๊ณ  ๊ฐœ์กฐํ•˜๋ผ"๋Š” ์ด ์ œ์•ฝ์ด์•ผ๋ง๋กœ, ์ด๊ฒƒ์„ ์‹คํ—˜์‹ค ๋ฐ๋ชจ๊ฐ€ ์•„๋‹ˆ๋ผ ์ˆ˜์ง‘๊ฐ€ ์ปค๋ฎค๋‹ˆํ‹ฐ์— ์ง„์งœ๋กœ ์“ธ๋ชจ ์žˆ๋Š” ๋ฌผ๊ฑด์œผ๋กœ ๋งŒ๋“ ๋‹ค.

03 โ€” ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜

03 โ€” ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜

04 โ€” ์™œ WIZnet W5100์ธ๊ฐ€? โญ

๐Ÿ”ท ๊ธฐ์ˆ ์  ํ•ต์‹ฌ

Arduino Mega 2560์˜ SRAM์€ ๊ณ ์ž‘ 8 KB๋‹ค. SAS ํ”„๋กœํ† ์ฝœ ํ•ธ๋“ค๋Ÿฌ, IniFile ์„ค์ • ํŒŒ์„œ, SD ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ, RFID, ํ‚คํŒจ๋“œ, ๋””์Šคํ”Œ๋ ˆ์ด ๋“œ๋ผ์ด๋ฒ„ ์œ„์— ์†Œํ”„ํŠธ์›จ์–ด TCP/IP ์Šคํƒ(๊ณ ์ „์ ์ธ ENC28J60 + UIPEthernet ๋ฐฉ์‹)๊นŒ์ง€ ์–น์œผ๋ฉด RAM์ด ๊ณ ๊ฐˆ๋˜๊ณ  ์‹œ์Šคํ…œ ์ „์ฒด๊ฐ€ ๋ถˆ์•ˆ์ •ํ•ด์ง„๋‹ค. README์˜ ๋ณ€๊ฒฝ ์ด๋ ฅ์€ "์ด๋”๋„ท๊ณผ SD ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ๋ฉ”๋ชจ๋ฆฌ ์š”๊ตฌ๋Ÿ‰" ๋•Œ๋ฌธ์— ๊ณผ๊ฑฐ์— ๊ฒช์€ ์•ˆ์ •์„ฑ ๋ฌธ์ œ๋ฅผ ๋ช…์‹œ์ ์œผ๋กœ ๊ธฐ๋กํ•˜๊ณ  ์žˆ๋‹ค. W5100์€ ์ด ๋ฌธ์ œ๋ฅผ ํ•˜๋“œ์›จ์–ด ๋ ˆ๋ฒจ์—์„œ ํ•ด๊ฒฐํ•œ๋‹ค.

๐Ÿ”ท ์‚ฌ์šฉ ์†Œ์ผ“ ๋ชจ๋“œ โ€” TOE / TCP (Sn_MR_TCP)

์ด ํ”„๋กœ์ ํŠธ๋Š” W5100์˜ **ํ•˜๋“œ์™€์ด์–ด๋“œ TCP ๋ชจ๋“œ(TOE โ€” TCP/IP Offload Engine)**๋ฅผ ๋‘ ์†Œ์ผ“ ๋ชจ๋‘์—์„œ ์‚ฌ์šฉํ•œ๋‹ค.

  • ๋ฆฌ์Šค๋‹ ์†Œ์ผ“ โ€” EthernetServer server(80) โ†’ server.begin()์ด ์›น ๊ด€๋ฆฌ ์ฝ˜์†”์„ ์œ„ํ•ด ์†Œ์ผ“์„ TCP ๋ฆฌ์Šจ ์ƒํƒœ๋กœ ๋‘”๋‹ค (Sn_MR_TCP + listen()์— ํ•ด๋‹น).
  • ํด๋ผ์ด์–ธํŠธ ์†Œ์ผ“ โ€” client.connect(serverIP, 80)์ด ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ์„œ๋ฒ„๋กœ ์นด๋“œยท๋ฏธํ„ฐ ๋ฐ์ดํ„ฐ๋ฅผ ๋ณด๊ณ ํ•˜๊ธฐ ์œ„ํ•ด ์•„์›ƒ๋ฐ”์šด๋“œ TCP ์—ฐ๊ฒฐ์„ ์—ฐ๋‹ค.

TCP ํ•ธ๋“œ์…ฐ์ดํฌ, ์žฌ์ „์†ก, ์œˆ๋„์ž‰, ์ฒดํฌ์„ฌ ์ „๋ถ€๊ฐ€ W5100 ์‹ค๋ฆฌ์ฝ˜ ๋‚ด๋ถ€์—์„œ ์ฒ˜๋ฆฌ๋œ๋‹ค. Mega๋Š” ๊ทธ์ € SPI๋กœ ์†Œ์ผ“ ๋ฒ„ํผ๋ฅผ ์ฝ๊ณ  ์“ธ ๋ฟ์ด๋‹ค โ€” lwIP๋„, ์†Œํ”„ํŠธ์›จ์–ด ์Šคํƒ๋„, ํŒจํ‚ท๋‹น CPU ๋น„์šฉ๋„ ์—†๋‹ค. ๋ฐ”๋กœ ์ด๊ฒƒ์ด, ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ ๋น ๋“ฏํ•œ 8๋น„ํŠธ MCU๊ฐ€ ์‹ค์‹œ๊ฐ„ ์นด์ง€๋…ธ ์‹œ๋ฆฌ์–ผ ํ”„๋กœํ† ์ฝœ์„ ๋Œ๋ฆฌ๋ฉด์„œ ๋™์‹œ์— HTTP ์„œ๋ฒ„ ๋…ธ๋ฆ‡๋„ ํ•˜๊ณ  HTTP ํด๋ผ์ด์–ธํŠธ ๋…ธ๋ฆ‡๋„ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“œ๋Š” ์š”์ธ์ด๋‹ค.

๐Ÿ”ท ๋Œ€์ฒด ์†”๋ฃจ์…˜ ๋Œ€๋น„ ์šฐ์œ„

  • vs ENC28J60(์†Œํ”„ํŠธ์›จ์–ด ์Šคํƒ): ENC28J60์€ MAC+PHY์ผ ๋ฟ์ด๋ผ MCU๊ฐ€ SRAM์—์„œ ์ „์ฒด TCP/IP ์Šคํƒ์„ ๋Œ๋ ค์•ผ ํ•œ๋‹ค. SD + SAS + RFID๋กœ ์ด๋ฏธ ๊ฐ€๋“ ์ฐฌ Mega์—์„œ ์ด ๋ฐฉ์‹์€ ๋ฌธ์„œ์— ๊ธฐ๋ก๋œ ๋ถˆ์•ˆ์ •์„ฑ์˜ ์›์ธ์ด์—ˆ๋‹ค. W5100์˜ ์˜จ๋ณด๋“œ ์Šคํƒ์€ ์ด ๋ถ€๋‹ด์„ ํ†ต์งธ๋กœ ์—†์•ค๋‹ค.
  • vs Wi-Fi ์‹ค๋“œ: README๋Š” "Wi-Fi ์‹ค๋“œ๋Š” ๊ถŒ์žฅํ•˜์ง€ ์•Š๋Š”๋‹ค"๊ณ  ๋ชป ๋ฐ•๋Š”๋‹ค. ์นด์ง€๋…ธ/๊ฐ€์ • ํ”Œ๋กœ์–ด์˜ ์Šฌ๋กฏ๋จธ์‹ ์€ ๋ฏธํ„ฐ ์ •ํ™•๋„์™€ ์›๊ฒฉ ๋ช…๋ น ์‹ ๋ขฐ์„ฑ์„ ์œ„ํ•ด ํ˜ผ์žกํ•œ 2.4 GHz ๋ฌด์„ ์ด ์•„๋‹ˆ๋ผ ๊ฒฐ์ •๋ก ์ ์ด๊ณ  ์ง€์—ฐ์ด ๋‚ฎ์€ ์œ ์„  ๋งํฌ๊ฐ€ ํ•„์š”ํ•˜๋‹ค.
  • ๋“œ๋กญ์ธ ์ƒํƒœ๊ณ„: ํ‘œ์ค€ Arduino Ethernet.h ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ W5100/W5200/W5500 ๊ณ„์—ด์„ ์ง์ ‘ ์ง€์›ํ•˜๋ฏ€๋กœ, ์ด ์‹ค๋“œ๋Š” Mega ์Šคํƒ์— ๊ทธ๋Œ€๋กœ ๊ฝ‚์•„ ์“ฐ๋Š” ํ”Œ๋Ÿฌ๊ทธ์•คํ”Œ๋ ˆ์ด ์ถ”๊ฐ€๋ฌผ์ด๋‹ค.

๐Ÿ”ท ๊ฒ€์ฆ๋œ ์ฆ๊ฑฐ โœ…

  • 3,209์ค„์งœ๋ฆฌ V4 Mega ์Šค์ผ€์น˜์—์„œ #include <Ethernet.h> + EthernetServer server(80) + EthernetClient ํ™•์ธ.
  • ํ—ค๋” ์ฃผ์„์ด ํ•˜๋“œ์›จ์–ด๋ฅผ ์ •ํ™•ํžˆ ๋ช…์‹œ: "Arduino Mega 2560 R3; ํ˜ธํ™˜ RFID ๋˜๋Š” ๋งˆ๊ทธ๋„คํ‹ฑ ๋ฆฌ๋”; W5100 ์ด๋”๋„ท ์‹ค๋“œ; ์‹œ๋ฆฌ์–ผ ํฌํŠธ."
  • ์„ค์ • ๊ฐ€๋Šฅํ•œ MAC(byte mac[])๊ณผ ์ •์  IP ํด๋ฐฑ(IPAddress ip(192,168,1,254)), DHCP๋ฅผ ๊ธฐ๋ณธ์œผ๋กœ ํ•˜๋Š” ํ”„๋กœ๋•์…˜๊ธ‰ ๋„คํŠธ์›Œํฌ ์„ค์ •.
  • ์ฝ”๋“œ์— SAS ๋ช…๋ น ํ…Œ์ด๋ธ” ์ „์ฒด ์กด์žฌ(LOCK, ULOCK, MUTE, ์ง€ํ์ธ์‹๊ธฐ ํ™œ์„ฑ/๋น„ํ™œ์„ฑ EBILL/DBILL, transComplete, ํฌ๋ ˆ๋”ง/์ฝ”์ธ์ธ/๊ฒŒ์ž„/์žญํŒŸ ๋ฏธํ„ฐ ์ฝ๊ธฐ).
  • PDF ๋งค๋‰ด์–ผ 3์ข… + ๋™๋ฐ˜ Game Manager ์•ฑ + ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ์„œ๋ฒ„ ์ปดํฌ๋„ŒํŠธ โ€” ์ฝ”๋“œ ์กฐ๊ฐ์ด ์•„๋‹ˆ๋ผ ์™„์ „ํ•˜๊ณ  ์žฌํ˜„ ๊ฐ€๋Šฅํ•œ ์‹œ์Šคํ…œ.

05 โ€” ํ•ต์‹ฌ ๊ตฌ์„ฑ์š”์†Œ

๐ŸŒ WIZnet W5100 โ€” TOE / TCP ๋ชจ๋“œ (๋“€์–ผ ์†Œ์ผ“: HTTP ์„œ๋ฒ„ + HTTP ํด๋ผ์ด์–ธํŠธ)

8๋น„ํŠธ Mega์—์„œ ๋„คํŠธ์›Œํฌ ๊ธฐ๋ฐ˜ TITO๋ฅผ ๊ฐ€๋Šฅ์ผ€ ํ•˜๋Š” ํ•˜๋“œ์›จ์–ด TCP/IP ์˜คํ”„๋กœ๋“œ๋ฅผ ์ œ๊ณตํ•œ๋‹ค. ํ•œ ์†Œ์ผ“์€ ์›น ๊ด€๋ฆฌ ์ฝ˜์†”์„ ์œ„ํ•ด 80ํฌํŠธ๋ฅผ ๋ฆฌ์Šจํ•˜๊ณ , ๋‹ค๋ฅธ ์†Œ์ผ“์€ ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ์„œ๋ฒ„๋กœ ์•„์›ƒ๋ฐ”์šด๋“œ ์—ฐ๊ฒฐํ•œ๋‹ค. ๋ชจ๋“  TCP ๋ฉ”์ปค๋‹ˆ์ฆ˜์ด SPI๋ฅผ ํ†ตํ•ด ์นฉ ๋‚ด๋ถ€์—์„œ ๋ˆ๋‹ค.

๐ŸŽฐ Arduino Mega 2560 R3

ํ˜ธ์ŠคํŠธ ์ปจํŠธ๋กค๋Ÿฌ. Uno๊ฐ€ ์•„๋‹ˆ๋ผ Mega๋ฅผ ๊ณ ๋ฅธ ๊ฑด ๋” ํฐ SRAM๊ณผ ๋‹ค์ˆ˜์˜ ํ•˜๋“œ์›จ์–ด ์‹œ๋ฆฌ์–ผ ํฌํŠธ ๋•Œ๋ฌธ์ด๋‹ค โ€” Serial1 @ 19200์„ ๊ฒŒ์ž„๊ธฐ์™€์˜ SAS/TITO ๋งํฌ ์ „์šฉ์œผ๋กœ ์“ฐ๊ณ , USB ์‹œ๋ฆฌ์–ผ์€ ๋””๋ฒ„๊น…์šฉ์œผ๋กœ ๋‚จ๊ฒจ๋‘”๋‹ค.

๐Ÿ’ณ MFRC522 RFID ๋ฆฌ๋”

์นด๋“œ๋กœ ํ”Œ๋ ˆ์ด์–ด๋ฅผ ์‹๋ณ„ํ•˜๊ณ , ์ถ”์  ์„ธ์…˜์„ ์‹œ์ž‘ํ•ด ์ค‘์•™ ์„œ๋ฒ„๋กœ ๋ณด๊ณ ํ•˜๋Š” "์นด๋“œ ์ธ์‹" ์ด๋ฒคํŠธ๋ฅผ ๋ฐœ์ƒ์‹œํ‚จ๋‹ค. (์ฃผ์„ ์ฒ˜๋ฆฌ๋œ MagStripe ์ธํด๋ฃจ๋“œ๋ฅผ ํ†ตํ•ด ๋งˆ๊ทธ๋„คํ‹ฑ ์ŠคํŠธ๋ผ์ดํ”„ ๋ฆฌ๋”๋„ ์ง€์›ํ•œ๋‹ค.)

โŒจ๏ธ ํ‚คํŒจ๋“œ + LCD/VFD ๋””์Šคํ”Œ๋ ˆ์ด

๋จธ์‹  ์ƒ์˜ ์šด์˜์ž/ํ”Œ๋ ˆ์ด์–ด ์ธํ„ฐํŽ˜์ด์Šค. ํ‚คํŒจ๋“œ๋Š” ์‹ค์‹œ๊ฐ„ SAS ๋ช…๋ น(์Œ์†Œ๊ฑฐ, ์ž ๊ธˆ, ์ง€ํ์ธ์‹๊ธฐ ํ™œ์„ฑํ™”)์„ ๋‚ด๋ฆฌ๊ณ , ๋””์Šคํ”Œ๋ ˆ์ด๋Š” ์Šฌ๋กฏ๋จธ์‹ ์˜ ๊ธฐ์กด ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ํŒจ๋„์„ ์žฌํ™œ์šฉํ•œ๋‹ค.

๐Ÿ’พ SD ์นด๋“œ

์„ค์ • ํŒŒ์ผ(IniFile), ์›น ์ฝ˜์†” HTML, ํ”Œ๋ ˆ์ด์–ด/๋ณด๋„ˆ์Šค/๊ด€๋ฆฌ์ž ์นด๋“œ ์ •์˜๋ฅผ ์ €์žฅํ•œ๋‹ค โ€” v4์—์„œ๋Š” ๋„คํŠธ์›Œํฌ๋ฅผ ํ†ตํ•ด ์›๊ฒฉ์œผ๋กœ ์—…๋ฐ์ดํŠธํ•  ์ˆ˜ ์žˆ๋‹ค.

๐Ÿ“ก SAS ํ”„๋กœํ† ์ฝœ ๊ณ„์ธต (Serial1)

๊ฒŒ์ด๋ฐ ์—…๊ณ„ ํ‘œ์ค€ Slot Accounting System์˜ ๋ถ€๋ถ„ ๊ตฌํ˜„์œผ๋กœ, ๋ฏธํ„ฐ๋ฅผ ์ฝ๊ณ  ๋จธ์‹  ๋ช…๋ น์„ ๋‚ด๋ฆฐ๋‹ค โ€” ๋ฌผ๋ฆฌ์  ๊ฒŒ์ž„๊ธฐ์™€ ๋„คํŠธ์›Œํฌ ์„ธ๊ณ„๋ฅผ ์ž‡๋Š” ๋‹ค๋ฆฌ๋‹ค.

06 โ€” ํ™œ์šฉ ์‹œ๋‚˜๋ฆฌ์˜ค

01. ๊ฐ€์ •์šฉ ์Šฌ๋กฏ๋จธ์‹  ์ˆ˜์ง‘๊ฐ€

์ฐจ๊ณ ๋‚˜ ๊ฒŒ์ž„๋ฃธ์˜ ์Šฌ๋กฏ๋จธ์‹ ์— ์ง„์งœ TITO ํ‹ฐ์ผ“ํŒ…๊ณผ ์›๊ฒฉ ๊ด€๋ฆฌ๋ฅผ ๊ฐœ์กฐ๋กœ ์–น๋Š”๋‹ค โ€” ์ •์‚ฐ์€ ์ถœ๋ ฅ๋œ ๋ฐ”์šฐ์ฒ˜๋กœ, ๊ฒŒ์ž„ ์ž ๊ธˆ์€ ํฐ ๋ธŒ๋ผ์šฐ์ €๋กœ, ์ „๋ถ€ ๊ฐ€์ • LAN์„ ํ†ตํ•ด.

02. ์†Œ๊ทœ๋ชจ ์—…์žฅ / ์•„์ผ€์ด๋“œ ๋ฉค๋ฒ„์‹ญ

์—ฌ๋Ÿฌ ๋จธ์‹ ์— ๊ฑธ์ณ ๊ฐ€๋ฒผ์šด ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ๋ฉค๋ฒ„์‹ญ ๊ณ„์ธต์„ ์šด์˜ํ•œ๋‹ค. ๊ฐ ๋ณด๋“œ๊ฐ€ ์นด๋“œ ์„ธ์…˜๊ณผ ๋ฏธํ„ฐ๋ฅผ ํ•˜๋‚˜์˜ ์ค‘์•™ ์„œ๋ฒ„๋กœ ๋ณด๊ณ  โ€” ์ƒ์šฉ ์นด์ง€๋…ธ ๊ด€๋ฆฌ ๊ณ„์•ฝ ์—†์ด.

03. ์›๊ฒฉ ๊ฒŒ์ž„ ๊ด€๋ฆฌ

๋ฌผ๋ฆฌ์ ์œผ๋กœ ๋‹ฟ์„ ์ˆ˜ ์—†๋Š” ๋จธ์‹ ์„ ๊ด€๋ฆฌํ•œ๋‹ค. ์›น ์ฝ˜์†”์—์„œ ํ”Œ๋ ˆ์ด ์ž ๊ธˆ/ํ•ด์ œ, ์ง€ํ์ธ์‹๊ธฐ ํ™œ์„ฑ/๋น„ํ™œ์„ฑ, ์žญํŒŸ ๋ฆฌ์…‹, ์„ค์ • ์ ๊ฒ€ โ€” ์œ ์„  W5100 ๋งํฌ๊ฐ€ ๋ช…๋ น์„ ๊ฒฐ์ •๋ก ์ ์œผ๋กœ ์œ ์ง€ํ•œ๋‹ค.

04. ๋ ˆํŠธ๋กœ ๊ฒŒ์ด๋ฐ & ํ”„๋กœํ† ์ฝœ ๊ต์œก

SAS ํ”„๋กœํ† ์ฝœ๊ณผ TITO ๋ฉ”์ปค๋‹ˆ์ฆ˜์— ๋Œ€ํ•œ ๋“œ๋ฌผ๊ฒŒ ์™„์ „ํžˆ ๋ฌธ์„œํ™”๋œ ์˜คํ”ˆ์†Œ์Šค ๋ ˆํผ๋Ÿฐ์Šค โ€” ์‹ค์ œ ๊ฒŒ์ด๋ฐ ํ•˜๋“œ์›จ์–ด๊ฐ€ ์–ด๋–ป๊ฒŒ ํ†ต์‹ ํ•˜๋Š”์ง€ ๋ฐฐ์šฐ๋ ค๋Š” ์ด์—๊ฒŒ ๊ฐ€์น˜ ์žˆ๊ณ , ๋„คํŠธ์›Œํฌ ๊ณ„์ธต์ด WIZnet ์นฉ์œผ๋กœ ๊น”๋”ํ•˜๊ฒŒ ๋ถ„๋ฆฌ๋˜์–ด ์žˆ๋‹ค.

๊ฒฐ๋ก 

์ด ํ”„๋กœ์ ํŠธ๋Š” ์นด์ง€๋…ธ์˜ ๋จธ์‹  ๊ด€๋ฆฌ ์Šคํƒ ์ผ๋ถ€ โ€” TITO ํ‹ฐ์ผ“ํŒ…, SAS ์ œ์–ด, ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น โ€” ๋ฅผ 8๋น„ํŠธ Arduino ์œ„์— ์žฌ๊ตฌ์ถ•ํ•œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์›น ์ฝ˜์†”์„ ์„œ๋น„์Šคํ•˜๋ฉด์„œ ๋™์‹œ์— ๋ฉค๋ฒ„์‹ญ ์„œ๋ฒ„๋กœ ๋ณด๊ณ ํ•˜๋Š” ๊ฒƒ์„ Mega์˜ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ๋ฌด๋„ˆ๋œจ๋ฆฌ์ง€ ์•Š๊ณ  ๊ฐ€๋Šฅ์ผ€ ํ•˜๋Š” ๊ฒƒ์ด ๋ฐ”๋กœ WIZnet W5100์˜ ํ•˜๋“œ์›จ์–ด TCP/IP ์˜คํ”„๋กœ๋“œ๋‹ค.

  • โœ… ์‹ค์ œ ๊ฒŒ์ด๋ฐ ์—…๊ณ„ ๋ฉ”์ปค๋‹ˆ์ฆ˜(TITO + SAS)์„ ์ทจ๋ฏธ์šฉ ํ•˜๋“œ์›จ์–ด์—์„œ ๊ตฌํ˜„
  • โœ… W5100์ด TOE/TCP ๋ชจ๋“œ๋กœ HTTP ์„œ๋ฒ„์™€ HTTP ํด๋ผ์ด์–ธํŠธ๋ฅผ ๋™์‹œ์— ์ˆ˜ํ–‰
  • โœ… SD + SAS + RFID๋กœ ์ด๋ฏธ ํฌํ™”๋œ 8๋น„ํŠธ MCU์—์„œ TCP/IP ์Šคํƒ ์ „์ฒด๋ฅผ ์˜คํ”„๋กœ๋“œ
  • โœ… ๋ช…๋ น/๋ฏธํ„ฐ ์‹ ๋ขฐ์„ฑ์„ ์œ„ํ•ด Wi-Fi๊ฐ€ ์•„๋‹Œ ์œ ์„  ์ด๋”๋„ท์„ ์˜๋„์ ์œผ๋กœ ์„ ํƒ
  • โœ… ๋„ค ๊ฐœ์˜ ๋ฉ”์ด์ € ๋ฒ„์ „์— ๊ฑธ์ณ ํ™œ๋ฐœํžˆ ์œ ์ง€๋ณด์ˆ˜ (์ตœ์‹  ๋นŒ๋“œ 20260623)
  • โœ… ์™„์ „ํ•˜๊ณ  ์žฌํ˜„ ๊ฐ€๋Šฅํ•œ ์‹œ์Šคํ…œ: ํŽŒ์›จ์–ด + Game Manager ์•ฑ + ํŠธ๋ž˜ํ‚น ์„œ๋ฒ„ + PDF ๋งค๋‰ด์–ผ 3์ข…
  • โœ… ๋จธ์‹  ํ•˜๋“œ์›จ์–ด๋ฅผ ๊ต์ฒดํ•˜์ง€ ์•Š๊ณ  ๊ฐœ์กฐ๋กœ ์žฌํ™œ์šฉ
  • โœ… ์นด์ง€๋…ธ๊ธ‰ ํ‹ฐ์ผ“ํŒ…ยท๋ฉค๋ฒ„์‹ญ ์žฅ๋น„ ์—ญ์‹œ WIZnet ์นฉ์ด ์กฐ์šฉํžˆ ์ž๋ฆฌ ์žก์€ ๋˜ ํ•˜๋‚˜์˜ ์˜์—ญ์ž„์„ ๋ณด์—ฌ์คŒ

๊ทธ๋ฆฌ๊ณ  ๋ฆฌ์น˜ ํฌ์ธํŠธ: ์Šฌ๋กฏ๋จธ์‹  ๋’ค์˜ ํ‹ฐ์ผ“ํŒ…ยทํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ์ „์ž์žฅ์น˜ โ€” ์ทจ๋ฏธ์šฉ ์ด๋”๋„ท๊ณผ๋Š” ๊ฑฐ์˜ ์•„๋ฌด๋„ ์—ฐ๊ฒฐ์ง“์ง€ ์•Š๋Š” ๋„๋ฉ”์ธ โ€” ์กฐ์ฐจ WIZnet ์นฉ ์œ„์—์„œ ๋Œ์•„๊ฐ„๋‹ค.

07 โ€” WIZnet Makers ๋‚ด ์œ ์‚ฌ ํ”„๋กœ์ ํŠธ

์ด ํ”„๋กœ์ ํŠธ๋Š” WIZnet Makers์— ์ด๋ฏธ ์กด์žฌํ•˜๋Š” ๋‘ ๊ณ„์—ด์˜ ๊ต์ง‘ํ•ฉ์— ๋†“์—ฌ ์žˆ๋‹ค. ๋„คํŠธ์›Œํฌ ๊ธฐ๋ฐ˜ ์บ์‹œ๋ฆฌ์Šค ๊ฒฐ์ œ/์žํŒ๊ธฐ ์ปจํŠธ๋กค๋Ÿฌ์™€ ์ด๋”๋„ท ๊ฒŒ์ž„ ์ฃผ๋ณ€๊ธฐ๊ธฐ๋‹ค. ์ด๋“ค ๋ชจ๋‘ ๋ˆ, ํฌ๋ ˆ๋”ง, ํ˜น์€ ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋ฅผ ๋จธ์‹  ๋ฐ–์œผ๋กœ ์˜ฎ๊ธฐ๊ธฐ ์œ„ํ•ด WIZnet ์นฉ์˜ TCP ๋งํฌ์— ์˜์กดํ•œ๋‹ค โ€” TITO๊ฐ€ ๊ฐ€์ง„ ๊ฒƒ๊ณผ ์ •ํ™•ํžˆ ๊ฐ™์€ ์•„ํ‚คํ…์ฒ˜์  ํ•„์š”๋‹ค.

  • mdb-arduino-cashless โ€” Arduino Uno๊ฐ€ MDB(Multi-Drop Bus) ์žํŒ๊ธฐ ํ”„๋กœํ† ์ฝœ์„ ๋„คํŠธ์›Œํฌ ์บ์‹œ๋ฆฌ์Šค ๊ฒฐ์ œ ํ๋ฆ„์œผ๋กœ ๋ธŒ๋ฆฌ์ง€ํ•˜๊ณ , MFRC522 RFID ๋ฆฌ๋”๋กœ ํƒœ๊ทธ ๊ฒฐ์ œ๋ฅผ ์ฒ˜๋ฆฌํ•œ๋‹ค. TITO์˜ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์‚ฌ์ดŒ์ด๋‹ค. MDB๊ฐ€ ์žํŒ๊ธฐ์—์„œ ํ•˜๋Š” ์—ญํ• ์ด SAS๊ฐ€ ์Šฌ๋กฏ๋จธ์‹ ์—์„œ ํ•˜๋Š” ์—ญํ• ๊ณผ ๊ฐ™๋‹ค โ€” ์ด ๋ณด๋“œ๊ฐ€ ๋„คํŠธ์›Œํฌ๋กœ ๋Œ์–ด์˜ฌ๋ฆฐ ํ‘œ์ค€ ์‹œ๋ฆฌ์–ผ ํ”„๋กœํ† ์ฝœ์ธ ๊ฒƒ์ด๋‹ค.
  • Vending Machine / Cashless Device Implementation โ€” ์žํŒ๊ธฐ ์บ์‹œ๋ฆฌ์Šค ์žฅ์น˜(Nottingham Hackspace์˜ Vend2 ๊ณ„๋ณด)๋กœ, ์—ญ์‹œ RFID์™€ TCP ๊ธฐ๋ฐ˜ ๋„คํŠธ์›Œํฌ ๊ฒฐ์ œ ๋ฐฑ์—”๋“œ๋ฅผ ๊ฒฐํ•ฉํ•œ๋‹ค. "์นด๋“œ ์ธ์ฆ โ†’ ๋จธ์‹ ์—์„œ ๊ฑฐ๋ž˜ ์Šน์ธ"์ด๋ผ๋Š” ๋ฃจํ”„๊ฐ€ TITO์˜ ์นด๋“œ ์ธ์‹ ์ด๋ฒคํŠธ์™€ ๋™์ผํ•˜๋‹ค.
  • Ethernet gaming controller with W5500 โ€” W5500 ๊ธฐ๋ฐ˜ ์ด๋”๋„ท ๊ฒŒ์ž„ ์ปจํŠธ๋กค๋Ÿฌ. TITO์˜ ์œ ์„  ์ด๋”๋„ท ๊ธฐ๋ฐ˜ ๊ฒŒ์ด๋ฐ ์ฃผ๋ณ€๊ธฐ๊ธฐ ๊ฐ๋„๋ฅผ ๊ณต์œ ํ•˜์ง€๋งŒ ๋ฐฉํ–ฅ์ด ๋ฐ˜๋Œ€๋‹ค. ๊ฒŒ์ž„์˜ ์ถœ๋ ฅ์„ ๊ณ„์ธกํ•˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ, ํ”Œ๋ ˆ์ด์–ด์˜ ์ž…๋ ฅ์„ ๊ฒŒ์ž„์œผ๋กœ ๋ณด๋‚ธ๋‹ค.

๋น„๊ต

ํ”„๋กœ์ ํŠธํ•ต์‹ฌ MCUWIZnet ์—ญํ• ๋จธ์‹  ํ”„๋กœํ† ์ฝœ์นด๋“œ/์ธ์ฆ๋ฐ์ดํ„ฐ ๋ฐฉํ–ฅ์„œ๋ฒ„/ํด๋ผ์ด์–ธํŠธ
Arduino TITO & Player Tracking (๋ณธ)Arduino Mega 2560W5100 ยท TCP (TOE)SAS (์Šฌ๋กฏ๋จธ์‹ )MFRC522 RFID๋ฏธํ„ฐ ์•„์›ƒ + ์›๊ฒฉ๋ช…๋ น ์ธ์–‘์ชฝ (HTTP ์„œ๋ฒ„+ํด๋ผ์ด์–ธํŠธ)
mdb-arduino-cashlessArduino UnoW5x00 ยท TCPMDB (์žํŒ๊ธฐ)MFRC522 RFID๊ฒฐ์ œ ์ธ์ฆํด๋ผ์ด์–ธํŠธ์ธก ๊ฒฐ์ œ ํ๋ฆ„
Vending / Cashless (Vend2)ArduinoW5x00 ยท TCP์žํŒ๊ธฐ (Vend2)RFID๊ฒฐ์ œ ์ธ์ฆ๋„คํŠธ์›Œํฌ ๋ฐฑ์—”๋“œ
Ethernet gaming controller(์ปจํŠธ๋กค๋Ÿฌ ๋ณด๋“œ)W5500 ยท TCPโ€” (HIDํ˜• ์ž…๋ ฅ)โ€”์ž…๋ ฅ ์ธ โ†’ ๊ฒŒ์ž„TCP ๋งํฌ

Q&A

Q. ์–ด๋–ค WIZnet ์†Œ์ผ“ ๋ชจ๋“œ๋ฅผ ์“ฐ๋ฉฐ, ์™œ UDP๊ฐ€ ์•„๋‹Œ๊ฐ€? A. **TOE / TCP ๋ชจ๋“œ(Sn_MR_TCP)**๋ฅผ ์“ด๋‹ค. ์›น ๊ด€๋ฆฌ ์ฝ˜์†”(์ธ๋ฐ”์šด๋“œ)๊ณผ ํ”Œ๋ ˆ์ด์–ด ํŠธ๋ž˜ํ‚น ๋ณด๊ณ (์•„์›ƒ๋ฐ”์šด๋“œ) ๋ชจ๋‘ HTTP์ด๋ฉฐ, HTTP๋Š” TCP ๊ธฐ๋ฐ˜์ด๋‹ค. ๋ฏธํ„ฐ ๋ฐ์ดํ„ฐ์™€ ์›๊ฒฉ ๋ช…๋ น์—๋Š” ์‹ ๋ขฐ์„ฑ ์žˆ๊ณ  ์ˆœ์„œ๊ฐ€ ๋ณด์žฅ๋œ ์ „๋‹ฌ์ด ์ค‘์š”ํ•˜๋ฏ€๋กœ UDP๋ณด๋‹ค TCP๊ฐ€ ์˜ฌ๋ฐ”๋ฅธ ์„ ํƒ์ด๋‹ค.

Q. ๋น„์šฉ ์ ˆ๊ฐ์„ ์œ„ํ•ด ENC28J60์„ ์“ฐ๋ฉด ์•ˆ ๋˜๋‚˜? A. ENC28J60์€ MAC+PHY์ผ ๋ฟ์ด๋ผ MCU๊ฐ€ ์†Œํ”„ํŠธ์›จ์–ด/SRAM์—์„œ TCP/IP ์Šคํƒ์„ ๋Œ๋ ค์•ผ ํ•œ๋‹ค. README ๋ณ€๊ฒฝ ์ด๋ ฅ์€ ์ด๋”๋„ท+SD ์†Œํ”„ํŠธ์›จ์–ด ๊ฒฝ๋กœ์˜ ๋ฉ”๋ชจ๋ฆฌ ์ด๋Ÿ‰์ด Uno๊ธ‰ ํ•˜๋“œ์›จ์–ด์—์„œ ์‹ค์ œ ๋ถˆ์•ˆ์ •์„ฑ์˜ ์›์ธ์ด์—ˆ์Œ์„ ๊ธฐ๋กํ•œ๋‹ค. W5100์˜ ์นฉ ๋‚ด์žฅ ์Šคํƒ์€ ์ด RAM ์••๋ฐ•์„ ์—†์•ค๋‹ค โ€” Mega๊ฐ€ ์ด๋ฏธ SAS, SD, RFID, ํ‚คํŒจ๋“œ, ๋””์Šคํ”Œ๋ ˆ์ด ์ฝ”๋“œ๋ฅผ ๋Œ๋ฆฌ๊ณ  ์žˆ์„ ๋•Œ ํ•„์ˆ˜์ ์ด๋‹ค.

Q. W5500์ด๋‚˜ W55RP20์œผ๋กœ ์˜ฎ๊ธธ ์ˆ˜ ์žˆ๋‚˜? A. ๊น”๋”ํ•˜๊ฒŒ ๊ฐ€๋Šฅํ•˜๋‹ค. ํ‘œ์ค€ Ethernet.h ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ W5100/W5200/W5500 ๊ณ„์—ด ์ „์ฒด๋ฅผ ์ง€์›ํ•˜๋ฏ€๋กœ, W5500 ์‹ค๋“œ๋Š” ๋” ๋งŽ์€ ์†Œ์ผ“๊ณผ ๋” ๋†’์€ SPI ์ฒ˜๋ฆฌ๋Ÿ‰์„ ๊ฐ–์ถ˜ ๊ฑฐ์˜ ๋“œ๋กญ์ธ ์—…๊ทธ๋ ˆ์ด๋“œ๊ฐ€ ๋œ๋‹ค. W55RP20(RP2040 + W5500 ํŒจํ‚ค์ง€ ํ†ตํ•ฉ)์€ ํฅ๋ฏธ๋กœ์šด ๋‹จ์ผ์นฉ ํ˜„๋Œ€ํ™”์ด์ง€๋งŒ, Mega ์ „์šฉ SAS ํƒ€์ด๋ฐ์„ RP2040์œผ๋กœ ํฌํŒ…ํ•ด์•ผ ํ•œ๋‹ค.

Q. ์ด๊ฑฐ ํ•ฉ๋ฒ•์ธ๊ฐ€ / ๋ถ€์ • ์žฅ์น˜ ์•„๋‹Œ๊ฐ€? A. ์•„๋‹ˆ๋‹ค. ํ‘œ์ค€ SAS ๋ฏธํ„ฐ๋ฅผ ์ฝ๊ณ  ์†Œ์œ ์ž๊ฐ€ ํ†ต์ œํ•˜๋Š” ๋จธ์‹ ์„ ๊ด€๋ฆฌํ•  ๋ฟ์ด๋ฉฐ, ์ด๋Š” ์ •๋‹นํ•œ ์นด์ง€๋…ธ ํ˜ธ์ŠคํŠธ ์‹œ์Šคํ…œ์ด ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒƒ๊ณผ ๋™์ผํ•œ ์ฝ๊ธฐ/๋ช…๋ น ๋™์ž‘์ด๋‹ค. ์ œ3์ž์˜ ๋จธ์‹ ์„ ์กฐ์ž‘ํ•˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ, ์ž๊ธฐ ํ•˜๋“œ์›จ์–ด๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ€์ • ์ˆ˜์ง‘๊ฐ€์™€ ์†Œ๊ทœ๋ชจ ์—…์žฅ์„ ๋Œ€์ƒ์œผ๋กœ ํ•œ๋‹ค.

Comments

Comments