Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chatbox

A small desk terminal for talking to an LLM agent. Press the knob, ask a question out loud, and the answer streams onto a 128×64 LCD. Left alone it shows a clock, a couple of Home Assistant readings, and — for a few hours each morning — a briefing on the day ahead.

It is a Raspberry Pi Zero W, a BigTreeTech Mini12864 display board (which usefully carries an LCD, a rotary encoder with a push switch, three addressable LEDs and a piezo on one PCB), and an I2S microphone, in a 3D-printed 45° wedge about the size of a paperback — 143 × 82 × 65 mm.

The printed case, face plate in blue

The Pi does no speech recognition or inference itself — it records to RAM, posts the audio to a host running Hermes Agent for transcription, then streams the reply back token by token. Any OpenAI-compatible chat endpoint plus any Whisper-style transcription endpoint will do; see SOFTWARE.md.

The screens

Idle, it is a clock with the outdoor readings you'd otherwise open an app for:

The home screen: AQI and temperature above a large clock and the date

Between start_hour and end_hour — 6 to 9 AM by default — that flips. For the first hours of the day you already know roughly what time it is; what you don't know is whether to take a coat, whether the air is worth avoiding, and what you already agreed to do. So the clock shrinks to the bottom row and the middle band becomes the briefing:

The morning briefing: air quality and current conditions, an inverted row reading STORMS 90/67 57%, two calendar events, and the date with a small clock

Two readings should change what you do next, so both get the same treatment — the row inverts, and the knob LEDs light while the window is open so the box is legible from the doorway before you're close enough to read a 10 px row. Storms go amber. Bad air takes the EPA's own category colour, and outranks the weather, because you can dress for a storm:

The same briefing with the top row inverted, reading AQI 168

Every part is optional and degrades on its own: no humidity sensor and the top row shows temperature alone, no calendar and the event rows go away, Home Assistant unreachable and you get -- rather than a blank screen. Drop the [morning] section from the config to keep the ordinary clock around the clock.

Full details in SOFTWARE.md.

Documentation

HARDWARE.md Wiring, printing the case, assembly
SOFTWARE.md Install, configuration, architecture, driver notes

Bill of materials

Electronics

Qty Item Notes
1 Raspberry Pi Zero W or Zero 2 W Zero 2 W has more headroom; the Zero W is sufficient
1 BigTreeTech Mini12864 V2.0 128×64 ST7567 LCD, EC11 encoder, 3 × WS2812, piezo
1 INMP441 I2S microphone breakout 14 mm round module
1 microSD card, 8 GB or larger
1 5 V / 2 A micro-USB power supply
~19 Female–female dupont jumper leads 100 mm; 14 to the display, 5 to the mic
1 Knob for a 6 mm D-shaft the knob BTT ships with the display fits

You also need a host on the LAN running Hermes Agent (or equivalent). Home Assistant is optional — without it the home screen is just the clock, and the morning briefing and spoken answers are unavailable, since both are built on entities it provides.

Printed parts and fasteners

Qty Item Notes
~150 g PLA or PETG filament four parts, ~140 cm³ total
4 M3 × 8 socket head display board → face plate
4 M3 × 12 socket head face plate → body
4 M3 × 10 socket head base plate → body
2 M2.5 × 6 Pi Zero → base posts

All M3s are self-tapping into printed Ø2.6 pilots — no inserts or nuts. The Pi is the exception: its mounting holes are Ø2.75 and will not pass an M3.

Tools

2.5 mm and 2.0 mm hex keys, a soldering iron for the microphone's pads, and a 3D printer with a bed of at least 145 × 85 mm.

Quick start

  1. Print the case. STLs are in Hardware/case/stl/, already oriented. See HARDWARE.md for orientation and settings.
  2. Wire it up. 14 leads to the display, 5 to the microphone. Full table in HARDWARE.md.
  3. Install the software. Flash Raspberry Pi OS Lite, enable SPI and I2S, copy pi/ to the Pi, fill in config.toml, enable the service. See SOFTWARE.md.

Repository layout

chatbox/
├── README.md            this file
├── HARDWARE.md          wiring, printing, assembly
├── SOFTWARE.md          install, configuration, architecture
├── docs/                screen captures, rendered on the device
├── Hardware/
│   ├── case/
│   │   ├── chatbox_case.py     parametric source for the printed parts
│   │   ├── chatbox_case.3mf    all four parts, arranged as printed
│   │   └── stl/                individual parts, pre-oriented
│   ├── wiring-reference.html   pinouts with the leads drawn on photos
│   └── *.step, *.png, *.jpg    manufacturer models and datasheet images
└── pi/
    ├── hermes_display.py       the application
    ├── mini12864.py            display driver
    ├── config.example.toml     copy to config.toml and fill in
    ├── hermes-display.service  systemd unit
    ├── asound.conf             ALSA gain for the microphone
    ├── backlight.py, beep.py   LED and buzzer utilities
    ├── diagnostics/            bring-up and bench scripts
    └── fonts/                  Terminus bitmap font used for answer text

pi/config.toml holds an API key, a password and a Home Assistant token. It is gitignored — keep it that way.

License

MIT. The BigTreeTech STEP model and datasheet images under Hardware/ are the manufacturer's, included for reference.

About

A desk voice terminal: press the knob, ask out loud, and the answer streams onto a 128x64 LCD. Pi Zero W + BigTreeTech Mini12864 + I2S mic in a printed wedge.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages