Skip to the content
2 layersAegis, the printed circuit board in 3D

Networked rotating ultrasonic radar system built on the Deneyap Kart 1A (ESP32-S3), with a real-time web dashboard served directly from the board.

Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
39
Pads
70
Tracks, vias
100, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
28 Jun 2026
Updated
7 Aug 2026

Overview

Aegis is an open-source printed circuit board by YousefAliAicha, from the YousefAliAicha/aegis-embedded-system repository on GitHub, published under the MIT licence. It is a 2-layer board with 9 parts on 39 nets, routed with 100 tracks and 0 vias.

It is built around the HC-SR04. Its parts include 4 connectors, 1 resistor and 1 IC. It belongs with the home automation and IoT boards and the ESP32 boards of this library.

Main components

1

README

README.md

AEGIS — Networked Rotating Ultrasonic Radar System

License Platform Board Dashboard

AEGIS Dashboard

A radar system on the Deneyap Kart 1A (ESP32-S3). A servo sweeps an HC-SR04 ultrasonic sensor across a 180° arc; the board streams range telemetry over WebSocket and serves a full dashboard from its own flash — no external server, no app.


How it works

Sweep and sensing run in a non-blocking loop: each step is gated by a millisecond timer, not delay(), so the WebSocket and HTTP stacks stay responsive between steps.

text
[Servo position] → [HC-SR04 pulse] → [distance measurement]
       ↓                                        ↓
  [LCD update]                     [WebSocket broadcast]
                                            ↓
                                   [Browser radar canvas]

Inbound commands from the dashboard arrive as JSON over WebSocket port 81 and apply to the live sweep parameters immediately — no reflash.

Offline behavior: if Wi-Fi association fails after 30 attempts (~12 seconds), the LCD shows OFFLINE MODE and the sweep loop keeps running locally. The dashboard is unreachable in that state, but ranging, detection, and the LCD readout are unaffected — the radar doesn't depend on the network being up to function.


Features

Hardware

  • Continuous 0–180° servo sweep, configurable range/speed/step
  • HC-SR04 ranging to 300cm
  • 1602A LCD showing live angle, distance, detection state — no clear() in the loop, so no flicker
  • Falls back to local-only operation if Wi-Fi is unavailable

Dashboard (served at http://<device-ip>)

  • Radar scope with sweep beam, phosphor trail, range rings
  • On-canvas adjustable detection threshold
  • Manual steer — click/drag on the canvas to aim the servo directly
  • Threat perimeter — draw a polygon; detections inside it trigger a breach alarm
  • Waterfall history strip, signal waveform panel, motion intensity meter
  • Alert log with INNER/OUTER zone classification
  • Sonar ping tones scaled by target distance (Web Audio API)
  • System telemetry: CPU%, memory%, uptime, chip temperature
  • Auto-reconnecting WebSocket — survives reload and short network drops

Firmware controls (all runtime-adjustable, no reflash)

CommandEffect
SET_SWEEP_MINLeft boundary of sweep arc (0–180°)
SET_SWEEP_MAXRight boundary of sweep arc (0–180°)
SET_STEP_DEGAngular resolution per step (1–10°)
SET_STEP_DELAYMilliseconds between steps (5–200ms)
SET_THRESHOLDDetection distance in cm (1–300cm)
MANUAL_STEERPoint servo to a specific angle
AUTO_RESUMEReturn to automatic sweep

▶ Demo video


WebSocket protocol

One frame broadcast per sweep step on port 81.

Outbound (board → browser):

json
{ "a": 90, "d": 34.2, "det": true }
  • a — servo angle (0–180°)
  • d — distance in cm, or -1 if out of range
  • det — true if within detection threshold

Inbound (browser → board): see the firmware controls table above.


Hardware requirements

ComponentQtyNotes
Deneyap Kart 1A1ESP32-S3 based; other ESP32 boards need pin remapping
HC-SR0415V supply required
SG90 servo15V supply required; never power from board 3.3V
1602A LCD (HD44780-compatible)116-pin, 4-bit parallel
MB102 breadboard power module1Supplies 5V to servo, sensor, LCD
9V DC wall adapter1Centre-positive, ≥1A. Not a PP3 battery
10kΩ potentiometer1LCD contrast
220Ω resistor1LCD backlight current limiting

Wiring

Full pin map: WIRING.md.

Deneyap pinConnected to
D0SG90 PWM signal
D1HC-SR04 TRIG
D11HC-SR04 ECHO
D4LCD Enable
D5–D7LCD D4–D6
D10LCD RS
D12LCD D7
GNDMB102 GND rail (mandatory common ground)

The MB102 GND rail must be wired to the Deneyap Kart GND pin — without a shared ground reference, signal levels are undefined.

Hardware Setup


Software setup

1. Prerequisites

  • Arduino IDE 2.x
  • Deneyap Kart board package — add under File → Preferences → Additional boards manager URLs:
    text
    https://raw.githubusercontent.com/deneyapkart/deneyapkart-arduino-core/master/package_deneyapkart_index.json
    then install Deneyap Kart via Tools → Board → Boards Manager.

2. Libraries

Install via Tools → Manage Libraries:

LibraryAuthor
WebSocketsMarkus Sattler
ESP32ServoKevin Harrington
ArduinoJsonBenoit Blanchon

LiquidCrystal and WiFi ship with the board package.

3. Wi-Fi credentials

bash
cp firmware/aegis-deneyap/secrets.h.example firmware/aegis-deneyap/secrets.h

Edit secrets.h:

cpp
#define WIFI_SSID     "your_network_name"
#define WIFI_PASSWORD "your_password"

secrets.h is gitignored and never committed.

4. Flash

  1. Open firmware/aegis-deneyap/aegis-deneyap.ino
  2. Tools → Board → Deneyap Kart 1A
  3. Select the correct COM port
  4. Upload

On boot, the LCD shows AEGIS v1.0, then Connecting WiFi, then the board's IP address for ~3 seconds before the radar loop starts.

5. Open the dashboard

On the same Wi-Fi network:

text
http://<ip from LCD or serial monitor 115200>

Served directly from flash — no internet needed after first font load (or remove the Google Fonts import in dashboard.h for fully offline use).


Project structure

text
aegis-embedded-system/
├── assets/
├── firmware/
│   └── aegis-deneyap/
│       ├── aegis-deneyap.ino   # Main firmware — radar loop, Wi-Fi, WebSocket
│       ├── dashboard.h         # Self-contained dashboard, stored in flash
│       ├── secrets.h           # Not committed
│       └── secrets.h.example
├── hardware/
│   ├── aegis.kicad_sch
│   ├── aegis.kicad_pcb
│   ├── aegis.kicad_pro
│   └── HC-SR04/
├── .gitignore
├── README.md
└── WIRING.md

License

MIT — see LICENSE.

Acknowledgements

Parts

9
QtyValueFootprintReferences
110kΩPotentiometer_THT:Potentiometer_Bourns_3296W_VerticalRV1
1220ΩResistor_SMD:R_0201_0603MetricR1
1DENEYAP_LEFTConnector_PinHeader_2.54mm:PinHeader_1x16_P2.54mm_VerticalJ1
1DENEYAP_RIGHTConnector_PinHeader_2.54mm:PinHeader_1x16_P2.54mm_VerticalJ2
1HC-SR04HC-SR04:XCVR_HC-SR04U1
1MB102_BOT_RAILConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ4
1MB102_TOP_RAILConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3
1Motor_ServoConnector_Harwin:Harwin_M20-89003xx_1x03_P2.54mm_HorizontalM1
1WC1602ADisplay:WC1602ADS1

Similar boards

  • 2 layers80 × 60 mmEnvMonitor, the printed circuit board in 3D

    EnvMonitor

    kennySzhucheng/EnvMonitor

    🌡️ 智能环境监测站 | STM32F103C8T6 + FreeRTOS + ESP8266 | 温湿度/光照/测距/OLED菜单/ThingSpeak上云 | 从裸机到RTOS到KiCad PCB全流程

    27 parts10
  • 2 layers120.7 × 184.1 mmBeachRover circuit, the printed circuit board in 3D

    BeachRover circuit

    wizardofrobots/roverCode

    Jetson Nano powered Arduino Rover

    11 parts10
  • 2 layers110 × 80 mmNoko 2, the printed circuit board in 3D

    Noko 2

    NikolaiRadke/Noko_2

    The do-it-yourself Arduino-based Noko monster. Version 2 with PCB and 3D printed casing.

    51 parts3Apache-2.0
  • 2 layers150 × 100 mmMaze kiCad, the printed circuit board in 3D

    Maze kiCad

    billtsol/Maze

    This project demonstrates how to use an Arduino board, IR sensors, and a motor driver shield to create a maze-solving robot.

    39 parts2
  • 2 layers111.5 × 102 mmWall e, the printed circuit board in 3D

    Wall e

    c-lydia/ESP-ROS2

    A tiny robot with IMU (MPU5060) and an ultrasonic sensor (HC-SR04), running on micro-ROS, communicating over UDP.

    12 parts2Apache-2.0
  • 2 layers25.2 × 27.3 mmCf2-hcsr04, the printed circuit board in 3D

    Cf2-hcsr04

    dbrgn/crazyflie2-hcsr04

    Ultrasonic sensor (HC-SR04) extension board for the Crazyflie 2.0

    9 parts2
  • 2 layers170.2 × 119.4 mmSentinel, the printed circuit board in 3D

    Sentinel

    YousefAliAicha/sentinel-arduino-firmware

    Adaptive traffic-light FSM on the Arduino UNO R3 — pedestrian preemption, LDR-gated night mode with HC-SR04 vehicle detection, and a multiplexed 7-segment countdown. Fully non-blocking.

    25 parts2MIT
  • 2 layers100 × 90 mmManbo carrier, the printed circuit board in 3D

    Manbo carrier

    1708018656-ship-it/-manbo-robot-dog

    精简版底板(70 × 54 mm,13 个元件)。完整版底板见 hardware/

    38 parts1MIT

Questions

What parts does the Aegis use?

9 parts, built around the HC-SR04. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Aegis KiCad files?

From the YousefAliAicha/aegis-embedded-system repository on GitHub, at the commit this page was made from: the board is hardware/aegis.kicad_pcb and its schematic hardware/aegis.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Aegis design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).