S.C.O.R.E.

JAVIER VEGA // FINAL PROJECT LOG

WHAT IT IS

S.C.O.R.E. (Smart Calculated Operations & Radar Engine) is a portable device that turns any regular soccer goal into a smart training system. You attach it to the goalposts, and it's ready. It automatically detects your shots, calculates kinetic speed through an invisible time-of-flight laser gate, and sends the data instantly to a custom Web App on your phone, mapping exactly where the ball entered.

Professional football tools are usually too expensive and hard to use for amateur players. Most people cannot measure their shot power or improve their accuracy with hard data. This project solves that problem by creating an accessible, industrial-grade tracking device that lets anyone track their progress just like the pros.

THE MOTIVATION

I have been passionate about football since I was a kid. Training alone can be frustrating without feedback. I often wonder: "How fast was that shot?" or "Did I hit the corner precisely?" By combining my passion for the sport with the digital fabrication skills learned in Fab Academy, I built a system to answer those questions.

To achieve portability and sub-millisecond precision, S.C.O.R.E. integrates the following components:

A. ELECTRONICS & IOT

  • 2x XIAO ESP32C6: Powerful microcontrollers managing local edge-computing, ESP-NOW telemetry, and a Web Server.
  • Custom PCBs: Fabricated in KiCad to route sensors and hardware logic protection.
  • 8x Diffuse IR Sensors (3m): Industrial sensors creating the time-of-flight trap.
  • 0.91" OLED I2C Display: Integrated directly on the master post for physical readouts.

B. POWER & MECHANICS

  • 5V External Powerbanks: Portable autonomy for high-drain active sensors.
  • 3D Printed Body (PLA): Impact-resistant cases designed in SolidWorks.
  • Velcro Mounting System: Allows rapid deployment on any goalpost.

One of the main goals of S.C.O.R.E. was to keep it accessible. By using standard components and digital fabrication, the total cost is drastically lower than commercial professional radars.

Component Qty Approx. Cost (USD)
Seeed Studio XIAO ESP32C62$10.00
E18 D80NK8$32.00
SMD Components (SS14 Diodes)2$5.00
0.91" OLED Display I2C1$3.00
5V Portable Powerbanks2$20.00
Velcro Straps & Fasteners1 Pack$5.00
TOTAL ESTIMATE:$75.00

CRITICAL RESEARCH: BALL DETECTION

To catch a football traveling at 80+ km/h, optical hardware needs an insanely fast response time. Standard sensors lacked the range, but I discovered a breakthrough.

Yellow Diffuse Sensor

1. Solviora E3F-DS30C4 (Standard)

  • Response Time: 1 ms (Excellent)
  • Range: 3 - 80 cm
  • Verdict: REJECTED

Analysis: While the 1ms response time was perfect for high-speed tracking, its maximum range of 30 cm is a critical failure point. A football passing through the center of the net would go undetected.

Yellow Diffuse Sensor

2. E3F 3-Meter Diffuse Variant

  • Response Time: 1 ms (Instant Reaction)
  • Range: Up to 3 Meters (300 cm)
  • Verdict: SELECTED

Analysis: THE PLOT TWIST. I discovered an upgraded industrial variant of the sensor that extends the diffuse range to a massive 3 meters. This eliminates the need to align complex reflector plates across the goal, while keeping the crucial 1ms reaction time to prevent blind spots.

INPUT DEVICES: THE SENSORY NERVES

The system uses eight E18-D80NK Infrared Distance Sensors acting as the primary inputs. These sensors work on the "Beam Breaking" principle. They continuously emit an IR light beam. When a physical object (the football) enters their line of sight, the light reflects back into the receiver. This triggers an immediate hardware interrupt, sending a digital LOW signal directly to the XIAO ESP32-C6.

E18-D80NK Sensors
Input Hardware: E18-D80NK Infrared Sensors
Testing the Input Reaction Time

OUTPUT DEVICES: THE VISUAL FEEDBACK

While the main output is the mobile Web Dashboard, the system also features local hardware feedback. A 0.91" I2C OLED Display acts as the primary physical output. Connected to the Master Board, this screen provides instant on-the-field metrics, displaying the calculated speed of the ball immediately after an impact is registered without needing to look at a phone.

OLED Screen Output
Output Hardware: I2C OLED Display
Testing the OLED Speed Output Display

To track the entire goal without running wires across the 1.6-meter crossbar (which would inevitably break from ball impacts), the system relies on a Wireless Dual-Node Topology. Each post is entirely independent in terms of power, utilizing its own dedicated 5V Powerbank to drive the high-drain active sensors.

LEFT POST (SLAVE NODE) Houses 4 sensors connected to its own PCB. It acts autonomously. When a ball crosses its side, the internal MCU calculates the speed locally. It immediately transmits a data packet (Speed + Impact Zone) via ESP-NOW, an ultra-low latency wireless protocol that operates peer-to-peer, bypassing the need for a router.
RIGHT POST (MASTER NODE) The brain of the operation. It houses its own 4 sensors to cover the right side. Simultaneously, it "listens" for incoming ESP-NOW packets from the left post. Upon registering any impact (local or remote), it updates the physical OLED Display and serves the data through an asynchronous Local Web Server.
VIDEO TEST: Verifying ESP-NOW Wireless Comms Between Master & Slave Nodes

PHYSICAL DISTRIBUTION

Goal sensor diagram

Fig 2. Sensor distribution along both vertical posts to detect ball crossing position and speed.

1. THE SPEED TRAP MATH

The core logic relies on classical physics kinematics. The goal structure holds a front sensor and a back sensor perfectly parallel. The physical depth separating them is exactly 30 cm (0.3 meters).

  • When the ball breaks the front sensor's beam, a hardware interrupt is triggered, and the code starts a high-precision `micros()` timer.
  • When the ball travels and breaks the back sensor's beam, the code stops the timer and calculates the total elapsed time.
  • Using the fixed 30 cm distance, the MCU derives the velocity using the formula: $v = \frac{d}{t}$. Finally, the output is converted to km/h to be displayed to the user.

2. HARDWARE LOGIC: ACTIVE-LOW

A major learning curve involved understanding industrial NPN logic. The sensors operate as Normally Closed (NC). The MCU pin reads HIGH when idle. When the infrared beam is reflected back by a passing ball, the circuit connects to Ground, pulling the logic pin to LOW. The C++ logic had to be inverted to register `LOW` as a positive hit.

3. DEFEATING THE "DISCO EFFECT"

The Problem: Wi-Fi Power Spikes During testing, the sensors began to flash erratically, registering "phantom goals" even when no ball was present. This was traced back to the ESP32's Wi-Fi module. Whenever the antenna transmitted data, it caused microscopic voltage drops on the 5V line. The hyper-sensitive E18 sensors interpreted these power drops as ball interruptions.
The Solution: Software Debouncing To fix this without redesigning the power delivery, I implemented a non-blocking software filter. When the pin drops to LOW, the MCU waits 20 milliseconds and checks again. If it returns to HIGH, it was just a Wi-Fi power spike (noise). If it remains LOW, it confirms a legitimate physical object blocking the laser.

DESIGNING & MILLING THE BOARDS

The electronic heart of S.C.O.R.E. consists of two custom PCBs (Master and Slave) designed in KiCad. These boards serve to break out the pins of the XIAO ESP32-C6, manage power distribution, and house the SS14 hardware protection diodes.

KiCad Master Board
Master Board Traces (KiCad)
KiCad Slave Board
Slave Board Traces (KiCad)
Fabrication: Milling the FR1 Copper Clad on the Roland SRM-20

After the CNC milling was complete, the SMD components and pin headers were hand-soldered to ensure robust connections capable of withstanding the vibrations of a soccer ball impact on the frame.

Final Soldered PCB
The Final Soldered PCB with XIAO ESP32-C6

To achieve a perfect fit and protect the electronics, all enclosures and frame joints were modeled in SolidWorks and produced using Additive Manufacturing (3D Printing). The casings hold the sensors perfectly parallel to ensure the Time-of-Flight distance remains exactly 30 cm.

THE PRINTING PROCESS

SolidWorks Orbit Review
3D Printing the Parts (PLA)

All enclosures were printed using standard PLA filament. Parameters were optimized for strength: thick walls (1.2mm minimum) and high infill (30% cubic) to withstand stray ball impacts.

Finished PLA Parts
Finished 3D Printed Parts: Sensor Housings & PCB Box

BRANDING & AESTHETICS

To give the prototype a finished, commercial look, I utilized subtractive manufacturing (Vinyl Cutting) to create custom decals for the goalposts. A silhouette of CR7 was vectorized and cut on the plotter to decorate the PVC structure.

Vinyl Plotter Cutting the Decal

THE MOBILE DASHBOARD

The data generated by S.C.O.R.E. is useless if the player can't see it. The Master board is programmed to create its own Wi-Fi Access Point (Local Server). By connecting a smartphone to this network, the player accesses a custom HTML/JS interface completely hosted on the microcontroller.

Real-Time Impact Zones The UI dynamically updates to show exactly where the ball entered. It maps the goal into 4 distinct quadrants: Top-Left, Bottom-Left, Top-Right, and Bottom-Right, displaying the specific speed generated in that zone.
History & System Diagnostics I implemented a "Show Last 10 Shots" button that pulls an array from the MCU's memory, allowing players to review their training session. Additionally, a dedicated footer dashboard provides diagnostic checkmarks confirming that the ESP-NOW link between both posts and the Wi-Fi connection to the phone are active and stable.

Using industrial NPN sensors created an electrical hazard. The sensors can output higher voltages, but the XIAO ESP32C6 operates strictly at 3.3V. High voltage on the data pins would fry the board instantly.

The Solution: Logic-Level Valve To protect the board, the custom PCB integrates SS14 Schottky SMD Diodes acting as one-way valves on every data line.
  • The diode is placed with its cathode (grey line) pointing toward the sensor's signal wire.
  • Idle (No Ball): The diode blocks higher voltages from returning to the board. The XIAO pin remains safely HIGH via its internal 3.3V pull-up.
  • Triggered (Ball Detected): The NPN sensor connects the line to Ground (0V). The diode "opens", pulling the XIAO pin to LOW, registering a hit without voltage exposure.

The culmination of the S.C.O.R.E. project. Below are the key video logs documenting the physical assembly on the goal, the raw sensor calibration tests, and the final working prototype.

TAPE 01: Physical Assembly & Velcro Mounting on the Goal
TAPE 02: Sensor Calibration & Diagnostic Telemetry Test
TAPE 03: S.C.O.R.E. - Final Project Presentation

The S.C.O.R.E. prototype fulfills the initial requirements of providing accessible, local telemetry for football training. However, the architecture is designed to be scalable. Future developments include:

  • Integrated LiPo Battery Management: Replacing the external powerbanks with internally managed 18650 batteries and TP4056 charging circuits.
  • Cloud Database Logging: Adding an MQTT bridge to allow players to save their historical data and track their speed improvements over months of training.
  • Advanced Gamification: Programming "Target Practice" modes where the OLED screen tells the player which zone to hit, scoring them based on accuracy and speed.

Roadmap aligned with the Fab Academy 2026 Official Schedule. Click on any phase to view the full weekly documentation.

  • WEEK 1 (JAN 21)

    Project Management

    Defining the concept, sketching the initial idea, and setting up the documentation website (Git & HTML).

  • WEEK 2 (JAN 28)

    Computer-Aided Design

    Creating the first 2D and 3D representations of the goal structure using SolidWorks.

  • WEEKS 6-8 (FEB-MAR)

    Electronics Design & Production

    Designing the custom PCB in KiCad (Week 6) and fabricating it (Week 8) to house the ESP32 and power management.

  • WEEK 11 (APR 01)

    Networking & Communications

    Programming the ESP32s to communicate wirelessly via ESP-NOW and Wi-Fi Access Point.

  • WEEK 14 (APR 29)

    Interface Programming

    Developing the visual Asynchronous Web Dashboard where the player sees their speed and accuracy stats.

  • WEEKS 15-17 (MAY)

    System Integration & Development

    Final assembly, 3D printing enclosure, cable management, field testing, and recording the presentation video.