Technology

Bluetooth Pen with AI Assistant: How the Nexus Pen Works

Logan Holby   March 18, 2026   6 min read

At first glance, the Nexus Pen looks like a sleek, premium writing instrument. Pick it up, and it writes with smooth erasable ink on any paper. But hidden inside its matte black body is a complete AI system: a microphone, speaker, OLED display, ESP32 microcontroller, and Bluetooth Low Energy — all working together to put artificial intelligence literally in your hand.

Here's a deep dive into how it all works.

The Hardware Inside

Every Nexus Pen Donna contains:

  • ESP32 Microcontroller — The brain of the pen. A dual-core processor running at 240MHz with built-in WiFi and Bluetooth.
  • MEMS Microphone (INMP441) — Captures your voice with high clarity using I2S digital audio at 16kHz.
  • MAX98357A Amplifier + Dayton Audio CE32A-8 Speaker — Delivers crystal-clear 24kHz audio output. Donna's voice sounds natural, not robotic.
  • 1.3" OLED Display (SH1107) — Shows mode status, volume, connection info, and text snippets from Donna's responses.
  • LiPo Battery — Powers 6-7 hours of active use with USB-C fast charging.
  • 4-Layer Custom PCB — All 38 components fit on a board just 120mm x 18mm — narrow enough to fit inside a pen barrel.

The Audio Pipeline: From Voice to Answer

When you press the talk button and ask a question, here's what happens in under 3 seconds:

  1. Voice Capture — The MEMS microphone records your voice at 16kHz via I2S digital audio protocol.
  2. BLE Transmission — Audio data is streamed from the pen to the Nexus Pen app on your phone via Bluetooth Low Energy. We use MTU 512 for large packets and burst delivery for zero-gap streaming.
  3. Cloud Processing — The app sends the audio to our FastAPI backend running on the cloud. OpenAI Whisper transcribes your speech to text with near-perfect accuracy.
  4. AI Response — The transcribed text goes to GPT-4o (or GPT-4o-mini for simple queries), configured with mode-specific prompts for optimal answers.
  5. Text-to-Speech — The AI response is converted to natural speech using OpenAI's TTS engine at 24kHz — full speech bandwidth for natural-sounding output.
  6. Audio Encoding — The speech audio is encoded in u-law G.711 format for efficient BLE transmission. This compression reduces data size by 50% while maintaining excellent quality.
  7. BLE Delivery — The encoded audio is burst-delivered back to the pen at 24KB/s via the BLE audio downstream characteristic.
  8. Playback — The pen's firmware decodes the u-law audio directly to 24kHz I2S output, driving the speaker through the MAX98357A amplifier.

The entire pipeline takes 2-3 seconds from button press to hearing Donna's voice. Meanwhile, the text response is displayed on the OLED and sent to the app for history.

Bluetooth Low Energy: The Connection

Nexus Pen uses BLE 4.2 with a custom GATT service layout:

  • Audio Upstream — Microphone data from pen to phone (Notify)
  • Audio Downstream — Speaker data from phone to pen (Write No Response)
  • Text Display — Control commands and text for the OLED (Write)
  • Device Status — Pen state, battery level, firmware version (Read/Notify)

BLE was chosen over Classic Bluetooth because it's more power-efficient (critical for a pen-sized battery), connects faster, and works reliably on both iOS and Android. The tradeoff — lower bandwidth — is solved by our u-law encoding and burst delivery protocol.

The OLED Display Experience

The 1.3-inch OLED display runs at 128x64 pixels with SH1107 driver. It shows:

  • Current AI mode (Answer Now, School, Research, Creative, Language)
  • BLE connection status
  • Volume level
  • Battery percentage
  • Text snippets from Donna's responses
  • A boot animation on startup (NEXUS/PEN/version splash)
  • Mode cycling animation during idle

Despite its small size, the OLED is incredibly useful. Glance at the pen to see what mode you're in, check your battery, or read the first few words of Donna's response — all without touching your phone.

Power Management

Running all this hardware in a pen-sized form factor requires aggressive power management:

  • CPU frequency scaling — The ESP32 drops to 80MHz during idle and scales back to 240MHz for audio processing and BLE activity.
  • Soft sleep mode — After 2 minutes of inactivity, the pen enters a low-power state while keeping BLE alive.
  • OLED dimming — The display contrast drops during extended idle to save power.
  • Smart wake — Any button press or BLE data instantly wakes the pen to full power.

Built from Scratch by Students

Every component of this system — the circuit board design in KiCad, the firmware in C++ (Arduino), the mobile app in React Native, and the cloud backend in Python — was designed and built by four high school students from Illinois. No outside engineering team, no consulting firm. Just determination, late nights, and a lot of Stack Overflow.

We open-sourced our learning journey because we believe technology should be understood, not just consumed. The Nexus Pen is proof that with the right tools and enough passion, anyone can build something real.

Get the Pen That Thinks

The Nexus Pen Donna is available now for $119. Real ink. Real AI. Real engineering — in the palm of your hand.

Get Your Nexus Pen — $119
Back to Blog