
Slushengine modelx lite
Roboteurs/slushengine-modelx-lite
Slushehgine model x lite version hardware files

Scripts controlling our space access. Superseded by https://code.flipdot.org/flipdot/flipdoor.
Pihat door is an open-source printed circuit board by flipdot, from the flipdot/door repository on GitHub. It is a 2-layer board of 65 × 56.5 mm with 35 parts on 78 nets, routed with 295 tracks and 11 vias.
It is built around the PIC16LF77-I/PT, DMMT5401 and LM1117IMPX-ADJ, with the LM317T, BC547 and BSS138 among its other parts. Its parts include 10 resistors, 6 connectors, 5 capacitors, 4 ICs and 3 transistors. It belongs with the PIC boards of this library.
Door control system for the flipdot hackspace. It runs on a Raspberry Pi at the
door together with a custom PCB in Raspberry Pi HAT form factor
(pihat_door).
The current door control system is flipdot/flipdoor, a Rust project with web and SSH interfaces that serves door.flipdot.space. The Python implementation in this repository is legacy and no longer maintained. The sections below document that implementation and the hardware, which remain useful for reference.
The system:
api.flipdot.org, where it is displayed on the
flipdot.org status page| Path | Description |
|---|---|
hardware/ | KiCad project for the pihat_door PCB |
door_firmware.X/ | Firmware for the PIC microcontroller on the HAT (MPLAB X project, XC8, PIC16LF1719) |
door_lib.py | Shared Python library: serial access, door state, open/close, API update |
web.py | Flask web frontend (login via LDAP, door state, open/close) |
mqtt2door.py | MQTT bridge + RFID reader daemon |
door.py | Small script that reads the door state and logs it to syslog |
door_state.sh | Shell helper that reads the door state from the serial port |
acme.py, acme.sh/ | (legacy) TLS via Let's Encrypt/acme.sh; TLS is now handled by nginx |
door-master.nginx.conf | Example nginx configuration (TLS, reverse proxy) |
web.service, mqtt2door.service | systemd units |
sync.sh | Syncs authorized_keys for the opendoor user from LDAP |
sync_rfid_tags.sh | Regenerates rfid_tags.json (employee numbers) from LDAP |
config.example.py | Configuration template (copy to config.py, see below) |
The ldap_user/ and acme.sh/ submodules provide LDAP authentication and
certificate handling respectively.
The HAT carries a PIC16LF1719 that is wired to the Raspberry Pi GPIO header.
It talks over a UART at 9600 baud 8N1 (config.SERIAL, default
/dev/ttyAMA0).
The PIC continuously samples the door switch (ADC, averaged over 30 samples) and prints one line per batch:
<adc> - <ra0>\r\n<adc>: 10-bit average of the door switch reading; values > 500 mean the
door is open<ra0>: digital input on pin RA0Commands (single character, no newline required):
1 – pulse the door open (~200 ms)0 – pulse the door closed (~200 ms)The PIC sends b at startup and r (followed by a UART re-init) when it hits
a UART over-error. door_lib.get_state() skips lines that do not start with a
number, so these are handled transparently.
web.py is a small Flask app:
ldap_user submodule)config.fake_door is set)is_member LDAP attribute)pip install -r requirements.txt
cp config.example.py config.py # adjust DOMAIN, EMAIL, SERIAL, ...
./web.pyFor production it runs under systemd (web.service) behind nginx
(door-master.nginx.conf), which terminates TLS.
Set fake_door = True in config.py to run the app without the hardware.
mqtt2door.py (run under systemd as mqtt2door.service) does three things:
power.flipdot.space:1883 and closes the
door on the actor/door/close topic (plus a raw ESP sensor topic)./dev/ttyUSB0. If the scanned tag is in
rfid_tags.json, the door is opened, otherwise the event is only logged.
sync_rfid_tags.sh regenerates rfid_tags.json from the employeeNumber
attributes of all LDAP members, so member cards work automatically.https://api.flipdot.org/sensors/door/locked/<0|1> every 60 seconds.door_firmware.X/ is an MPLAB X project for the PIC16LF1719 on the HAT
(build with the XC8 compiler, e.g. via MPLAB X IDE). See
hardware/pihat_door.pro for the board design.
Copy config.example.py to config.py (git-ignored) and adjust:
| Key | Meaning |
|---|---|
PORT, HTTPS_PORT | Ports for the Flask app |
SERIAL | Serial device of the HAT, e.g. /dev/ttyAMA0 |
DOMAIN, EMAIL | Domain and contact for certificate issuance |
DEBUG | Verbose logging |
STAGING | Use the Let's Encrypt staging server |
fake_door | Simulate the door state (for development) |
| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | CONN_01X02 | Connect:AK300-2 | P1, P2, P4, P5, P6 |
| 3 | 1k | Resistors_SMD:R_0805_HandSoldering | R2, R4, R5 |
| 2 | BC547 | TO_SOT_Packages_THT:TO-92_Inline_Wide | Q2, Q3 |
| 2 | C_Small | Capacitors_SMD:C_0805_HandSoldering | 100n1, 100n2 |
| 1 | 0.1uf | Capacitors_SMD:C_0805_HandSoldering | C7 |
| 1 | 10k | Resistors_SMD:R_0805_HandSoldering | R11 |
| 1 | 10uf/6.3V | Capacitors_SMD:c_elec_6.3x7.7 | C6 |
| 1 | 1u | Capacitors_SMD:c_elec_6.3x7.7 | C2 |
| 1 | 1uf | Capacitors_SMD:C_0805_HandSoldering | C8 |
| 1 | 240 | Resistors_SMD:R_0805_HandSoldering | R9 |
| 1 | 330R | Resistors_SMD:R_0805_HandSoldering | R1 |
| 1 | 360 | Resistors_SMD:R_0805_HandSoldering | R10 |
| 1 | 390 | Resistors_SMD:R_0805_HandSoldering | R8 |
| 1 | 47k | Resistors_SMD:R_0805_HandSoldering | R12 |
| 1 | 4k7 | Resistors_SMD:R_0805_HandSoldering | R3 |
| 1 | 50uf/50v | Capacitors_SMD:c_elec_6.3x7.7 | C1 |
| 1 | BSS138 | TO_SOT_Packages_SMD:SOT-23_Handsoldering | Q1 |
| 1 | DMMT5401 | TO_SOT_Packages_SMD:SOT-23-6 | U5 |
| 1 | LED | LEDs:LED-3MM | D3 |
| 1 | LM1117IMPX-ADJ | Power_Integrations:TO-220 | U4 |
| 1 | LM317T | Power_Integrations:TO-220 | U1 |
| 1 | PIC16(L)F77-I/P | Housings_DIP:DIP-40_W15.24mm | U2 |
| 1 | Raspberry_Pi_+_Conn | Connect:IDC_Header_Straight_40pins | P3 |
The 31 most common of 35 parts.
It measures 65 × 56.5 mm and has 2 copper layers, 1.6 mm thick.
35 parts, built around the PIC16LF77-I/PT, DMMT5401, LM1117IMPX-ADJ and LM317T. 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 flipdot/door repository on GitHub, at the commit this page was made from: the board is hardware/pihat_door.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask flipdot before reusing the design.

Roboteurs/slushengine-modelx-lite
Slushehgine model x lite version hardware files


UMONS-GFA/kicad-projects
Open your .sch file -> Preferences -> Component libraries


CatoLynx/LAWO-Arduino
Arduino Nano adapter board for LAWO XY5 flipdot displays


SkullKill/RDMA-PCB
Rpi Dead Man Alarm - PCB and 3D case - Occupancy Monitoring - Raspberry Pi hat
