Skip to the content
2 layers55 × 34 mmLED Board, the printed circuit board in 3D

3d printed counter using Pi5, python, pyqt6, and sqlite that can export to folders or sharepoint

Size
55 × 34 mm
Copper layers
2
Thickness
1.6 mm
Parts
14
Nets
17
Pads
46
Tracks, vias
52, 0
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
4 Jul 2024
Updated
7 Mar 2026

Overview

LED Board is an open-source printed circuit board by rassweiler, from the rassweiler/pi-networked-counter repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 55 × 34 mm with 14 parts on 17 nets, routed with 52 tracks and 0 vias.

It is built around the AQY210EH. Its parts include 5 resistors, 4 ICs and 1 connector.

Main components

1

README

README.md

pi-networked-counter

Network attached counter using Pi5, python, pyqt6, and sqlite

Assembly Assembly IO Assembly Rear Assembly Opened Sensor Assembly Sensor Assembly 2 Sensor Assembly Opened

Dev Setup (Linux)

  • clone repository:
text
git clone https://github.com/rassweiler/pi-networked-counter.git && cd pi-networked-counter
  • Setup python environment:
text
python3 -m venv venv

source venv/bin/activate

pip3 install gpiozero lgpio msal msal_extensions python-dotenv pygobject
  • Install optional packages:
text
sudo apt install qtcreator sqlitebrowser

Device Setup (Pi5+)

Base Version Part List

Stacklight Version Part List

Optional Parts

Pi Software

  • Update system
text
sudo apt update && sudo apt upgrade
  • Install packages
text
sudo apt install < .packages
  • Disable sudo NOPASSWD:
text
sudo nano /etc/sudoers.d/010_pi-nopasswd

remove NOPASSWD:
  • Enable sudo logging:
text
sudo visudo

Insert:

Defaults    logfile=/var/log/sudo
  • Harden ssh config:
text
sudo nano /etc/ssh/sshd_config

PermitRootLogin prohibit-password
MaxAuthTries 5
MaxSessions 3
MaxStartups 3:90:15
PasswordAuthentication no
  • Harden ssh keys:
text
echo -e "# Restrict key exchange, cipher, and MAC algorithms, as per sshaudit.com\n# hardening guide.\n KexAlgorithms sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,gss-curve25519-sha256-,diffie-hellman-group16-sha512,gss-group16-sha512-,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256\n\nCiphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-gcm@openssh.com,aes128-ctr\n\nMACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com\n\nHostKeyAlgorithms sk-ssh-ed25519-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256\n\nRequiredRSASize 3072\n\nCASignatureAlgorithms sk-ssh-ed25519@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256\n\nGSSAPIKexAlgorithms gss-curve25519-sha256-,gss-group16-sha512-\n\nHostbasedAcceptedAlgorithms sk-ssh-ed25519-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,ssh-ed25519,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-256\n\nPubkeyAcceptedAlgorithms sk-ssh-ed25519-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,ssh-ed25519,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-256\n\n" > /etc/ssh/sshd_config.d/ssh-audit_hardening.conf
  • Remove avahi:
text
sudo systemctl stop avahi-daemon && sudo systemctl disable avahi-daemon

sudo apt purge avahi-daemon -y
  • Remove CUPS:
text
sudo systemctl stop cups && sudo systemctl disable cups

sudo apt purge cups -y 
  • PI configure Set the locale to UTF-8

  • Setup keyring for sharepoint integration Run seahorse and make sure there is a default keystore

  • clone repository to PI:

text
git clone https://github.com/rassweiler/pi-networked-counter.git && cd pi-networked-counter
  • Copy the desktop file to autostart the app:
text
sudo cp objectcounter.desktop /etc/xdg/autostart/objectcounter.desktop
  • Add panel icon
text
cp objectcounter.desktop ~/.local/share/applications/

Then restart the system to get the app in the menu under other, then right click the app and select add to taskbar

  • Setup startup IO for push button
text
echo "dtoverlay=gpio-poweroff,gpiopin=25,active_low" >> /boot/firmware/config.txt

Sharepoint Setup (Optional)

  • Add to the .settup.toml file your sharepoint access details:
text
[sharepoint]
authority = "https://login.microsoftonline.com/{AID}"
client = "{CID}"
scopes = 'User.ReadBasic.All Files.ReadWrite Sites.ReadWrite.All'
endpoint = "https://graph.microsoft.com/v1.0/me" 
  • run the get_token.sh script once to initialise your sharepoint token, it should provide a link and a key to login using a browser.

Print Parts

  • Print out the Front case section (Should contain the screen brackets as well)
  • Print out the Rear case section
  • Print out the Sensor case sections
  • Print any required brackets/stands

Prepare Sensors

  • Connect both power wires together from the IR emitter and receiver
  • Connect both ground wires together from the IR emitter and receiver
  • Solder the M12 AMP Connector Male to the sensors following the pinout below

Sensor Pinout To Cable

  • Pin 1 (Brown): 3.3V
  • Pin 2 (White): Unused
  • Pin 3 (Blue): Emitter signal (Yellow)
  • Pin 4 (Black): Ground
  • Pin 5 (Gray): Unused Connector Pinout

Lightstack Pinout

  • Cable Brown: 12V
  • Cable Green: Green LED
  • Cable Yellow: Yellow LED
  • Cable Red: Red LED

Pi5 Wiring

  • Pin 1 (3.3V): To infeed sensor pin 1
  • Pin 2 (5V): To Display pin 5 (5V)
  • Pin 6 (GND): To Display pin 1 (GND)
  • Pin 9 (GND): To infeed sensor pin 4
  • Pin 11: To infeed sensor pin 3
  • Pin 13: To stack light green wire
  • Pin 14 (GND): To outfeed sensor pin 4
  • Pin 15: To stack light yellow wire
  • Pin 16: To outfeed sensor pin 3
  • Pin 17: (3.3V): To outfeed sensor pin 1
  • Pin 18: To stack light red wire
  • Pin 22: To power led +
  • Pin 25 (GND): To dev board for ground
  • Pin 30 (GND): To power led -

Assembly Schematic

The Pi5 board is not entirely accurate, the J2 and J8 pins are proper however. Schematic

Parts

14
QtyValueFootprintReferences
5220Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR1, R2, R3, R4, R5
4AQY210EHLibrary:Panasonic_AQY210EHU1, U2, U3, U4
2,
2MountingHole_3.2mm_M3_DIN965_Pad_TopBottomMountingHole:MountingHole_3.2mm_M3_DIN965_Pad_TopBottomMount, Mount
1Conn_01x12_PinConnector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_VerticalJ9

Similar boards

  • 2 layers124 × 112 mmOpenDropV3, the printed circuit board in 3D

    OpenDropV3

    GaudiLabs/OpenDrop

    Open Source Digital Microfluidics Bio Lab

    318 parts492GPL-3.0
  • 2 layers100 × 117 mmBHV Badge, the printed circuit board in 3D

    BHV Badge

    biomurph/BioVill_Badge

    DEFCON Micro Fluidics Badge Design For Biohacking Village

    270 parts1MIT
  • 2 layers116.8 × 30 mmType d, the printed circuit board in 3D

    Type d

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    14 parts3kApache-2.0
  • 2 layers32 × 22 mmDiff driver, the printed circuit board in 3D

    Diff driver

    rene-dev/stmbl

    AC Servo Driver for STM32F4

    14 parts990GPL-3.0
  • 2 layers34 × 45 mm2032Charger, the printed circuit board in 3D

    2032Charger

    hackclub/OnBoard

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

    14 parts915
  • 2 layers34 × 109.9 mmTdisplay s3, the printed circuit board in 3D

    Tdisplay s3

    landonr/homeThing

    Wifi Smart Home Remotes that run on ESPHome

    14 parts551GPL-3.0
  • 2 layers45.3 × 42.7 mmMainPcb, the printed circuit board in 3D

    MainPcb

    adamb314/ServoProject

    Getting the most out of your hobby servo

    14 parts545
  • 2 layers42.5 × 28.8 mmC5VRX JACK DIY, the printed circuit board in 3D

    C5VRX JACK DIY

    Twotoz/C5VRX

    Ultra-minimal, zero-CPU 5.8 GHz analog FPV video receiver using ESP32-C5 Wi-Fi 6 PHY MODEM_DIAG, BitScrambler WBFM demodulation & resistor DAC CVBS

    14 parts515GPL-3.0

Questions

How big is the LED Board PCB?

It measures 55 × 34 mm and has 2 copper layers, 1.6 mm thick.

What parts does the LED Board use?

14 parts, built around the AQY210EH. 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 LED Board KiCad files?

From the rassweiler/pi-networked-counter repository on GitHub, at the commit this page was made from: the board is Schematics/LED_Board/LED_Board.kicad_pcb and its schematic Schematics/Assembly/Assembly.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the LED Board design in my own project?

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