
Type e
google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards

Systeme ambilight temps reel : un script Python analyse les bords d'une video, extrait les couleurs dominantes et les envoie en UDP via WiFi a un microcontroleur Seeed XIAO ESP32-C6 qui pilote 2 chaines de 260 LEDs…
Ambilight kicad is an open-source printed circuit board by lan-ensad, from the lan-ensad/arash_nassiri repository on GitHub. It is a 2-layer board of 58 × 89 mm with 16 parts on 32 nets, routed with 100 tracks and 9 vias.
Its parts include 5 connectors, 3 capacitors, 2 resistors and 2 ICs. It belongs with the ESP32 and RISC-V boards of this library.
Systeme ambilight temps reel : un script Python analyse les bords d'une video, extrait les couleurs dominantes et les envoie en UDP via WiFi a un microcontroleur Seeed XIAO ESP32-C6 qui pilote 2 chaines de 260 LEDs WS2812 (520 LEDs au total, 8.67 m, 60 pixels/m).
L'ESP32 et l'ordinateur de diffusion sont connectes sur un reseau WiFi ferme dedie. L'ESP32 est monte au milieu du bas ; les 2 chaines partent de ce point central vers la gauche et la droite, pour minimiser la longueur du fil data.
Source video (fichier ou capture HDMI via Cam Link)
│
▼
Script Python (PC) ──► analyse des bords ──► traitement couleur ──► UDP (WiFi)
(zones.py) (colors.py) (udp_sender.py)
│
▼
Reseau WiFi ferme
│
▼
Firmware ESP32-C6
(NeoPixelBus → WS2812)
│
▼
2 chaines de 260 LEDs
(A = gauche, B = droite)Vu depuis la position du spectateur, face a l'ecran :
┌─────────────────────────────────────────────────────┐
│ (haut : pas de ruban) │
│ │
│ │
▲ │ │ ▲
│ │ │ │
150 │ │ │ │ 150
LEDs│ │ [ E C R A N ] │ │ LEDs
│ │ │ │
│ │ │ │
│ └──────────┐ ┌───────────┘ │
│ │ │ │
└─ CHAINE A ──┤ ├── CHAINE B ──┘
(cote gauche) │ │ (cote droit)
│ ┌──────────────┐ │
◄─────────────┤ │ ESP32 + PCB │ ├─────────────►
110 LEDs └───────┤ ├───────┘ 110 LEDs
demi-bas │ milieu │ demi-bas
gauche └──────┬───────┘ droit
│
▼
Alimentation 5 VPour chaque chaine, le flux data part de l'ESP32, remonte le demi-bas (110 LEDs) puis le cote vertical (150 LEDs, du bas vers le haut).
arash_nassiri/
├── readme.md Ce fichier -- documentation generale
│
├── Firmware/ Firmware ESP32-C6 (PlatformIO)
│ └── README.md → Installation, flashage, protocole UDP, troubleshooting firmware
│
├── script/ Script Python (cote ordinateur)
│ └── README.md → Installation, configuration, utilisation, troubleshooting soft
│
├── kicad/ Electronique (schema + BOM + cablage)
│ ├── README.md → Dimensionnement, BOM, cablage, precautions electriques
│ └── ambilight_kicad/ Projet KiCad
│
├── test_videos/ Videos de test (generees par ffmpeg)
├── run.sh Lancement production (fullscreen + unclutter)
└── _devis/ Documents administratifs (devis, factures)| Composant | Documentation | Concerne |
|---|---|---|
| Electronique | kicad/README.md | Dimensionnement, BOM, cablage, SN74HCT14N, alimentation |
| Firmware ESP32 | Firmware/README.md | PlatformIO, WiFi, flashage, protocole UDP |
| Script Python | script/README.md | OpenCV, source video, pipeline couleur, parametres |
Ordre recommande pour une premiere mise en route :
Firmware/src/wifi_config.h puis flasher (voir Firmware/README.md)script/config.py (voir script/README.md)./run.sh depuis la racine (ou configurer le service systemd, section suivante)Pour tester le pipeline Python sans materiel (loopback UDP) : voir la section Troubleshooting dans script/README.md.
Pour une installation permanente. Recommande quand la source video est externe (Cam Link) et headless = True dans script/config.py -- aucune session graphique requise.
run.sh integre deja l'attente reseau (ping de la passerelle par defaut, max 30 s) et une rotation simple des logs au demarrage : aucune modification requise avant installation.
script/config.py| Parametre | Valeur recommandee | Raison |
|---|---|---|
headless | True | Pas de session graphique sous systemd user (sauf si DISPLAY configure dans l'unit) |
terminal_preview | False | Pas de terminal → les codes ANSI du preview polluent le fichier de log |
dry_run | False | Sinon aucun paquet UDP n'est envoye |
video_path / camera_index | source reelle | video_path est resolu relativement a script/ |
IP ESP32 coherente entre script/config.py (esp32_ip) et Firmware/src/wifi_config.h (LOCAL_IP_BYTES).
Fichier ~/.config/systemd/user/ambilight.service :
[Unit]
Description=Ambilight video capture and UDP send
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
WorkingDirectory=/path/to/arash_nassiri
ExecStart=/path/to/arash_nassiri/run.sh
Restart=on-failure
RestartSec=5
Environment=PYTHONUNBUFFERED=1
# Double destination des logs :
# - Fichier persistant (rotation geree par run.sh au demarrage, >10 Mo → archive timestampee, max 5 backups)
# - Journal systemd user natif (rotation + compression gerees par journald)
StandardOutput=append:/path/to/arash_nassiri/logs/ambilight.log
StandardError=append:/path/to/arash_nassiri/logs/ambilight.log
[Install]
WantedBy=default.targetAdapter les 3 chemins
/path/to/arash_nassiri/...au chemin reel du projet. Le dossierlogs/est cree automatiquement parrun.sh.
mkdir -p ~/.config/systemd/user
# (copier ambilight.service dans ce dossier)
systemctl --user daemon-reload
systemctl --user enable --now ambilight.servicesudo loginctl enable-linger $USERSans cette ligne, le service ne demarre qu'apres connexion interactive.
Utilisateur dans le groupe video pour acceder a la capture (Cam Link, webcam) :
sudo usermod -aG video $USER
# logout/login pour que le groupe prenne effet# Etat
systemctl --user status ambilight.service
# Logs temps reel -- deux options equivalentes
tail -f logs/ambilight.log # fichier dedie
journalctl --user -u ambilight.service -f # journal systemd
# Logs filtres
journalctl --user -u ambilight.service -p err # erreurs uniquement
journalctl --user -u ambilight.service --since "1 hour ago"
# Cycle de vie
systemctl --user restart ambilight.service
systemctl --user stop ambilight.servicesystemctl --user disable --now ambilight.service
rm -f ~/.config/systemd/user/ambilight.service
systemctl --user daemon-reload
sudo loginctl disable-linger $USER # optionnelPC et ESP32 sur un reseau WiFi dedie (routeur/AP dedie ou hotspot du PC). Aucun trafic Internet ni autre appareil -- isolation garantit :
Config par defaut :
| Parametre | Valeur | Fichier |
|---|---|---|
| IP ESP32 | <IP_ESP> | script/config.py + Firmware/src/wifi_config.h |
| Hostname ESP32 | esp_ambilight | Firmware/src/wifi_config.h |
| Port UDP | 4210 | Firmware/src/wifi_config.h |
| SSID / password | <SSID + PASS> | Firmware/src/wifi_config.h |
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 2 | 100nF | Capacitor_THT:C_Disc_D3.8mm_W2.6mm_P2.50mm | C1, C2 |
| 2 | 330 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1, R2 |
| 1 | 22uF | Capacitor_THT:C_Radial_D6.3mm_H7.0mm_P2.50mm | C3 |
| 1 | 7414 | Package_DIP:DIP-14_W7.62mm | U1 |
| 1 | Alim_ChaineA | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J4 |
| 1 | Alim_ChaineB | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J5 |
| 1 | Alim_Input | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J3 |
| 1 | RubanA | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_Horizontal | J1 |
| 1 | RubanB | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_Horizontal | J2 |
| 1 | XIAO-ESP32-C6 | XIAO:XIAO-ESP32C6-DIP | U2 |

google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards

conorpp/u2f-zero
U2F USB token optimized for physical security, affordability, and style

rusefi/rusefi
rusefi - GPL internal combustion engine control unit

VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group

hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!


It measures 58 × 89 mm and has 2 copper layers, 1.6 mm thick.
16 parts. 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.
From the lan-ensad/arash_nassiri repository on GitHub, at the commit this page was made from: the board is kicad/ambilight_kicad/ambilight_kicad.kicad_pcb and its schematic kicad/ambilight_kicad/ambilight_kicad.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask lan-ensad before reusing the design.