Skip to the content
4 layers67 × 140.3 mmUnkey, the printed circuit board in 3D

Swimmie-Textie

Size
67 × 140.3 mm
Copper layers
4
Thickness
1.6 mm
Parts
139
Nets
161
Pads
618
Tracks, vias
1,109, 197
Pours
5
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
9 Aug 2024
Updated
18 Feb 2026

Overview

Unkey is an open-source printed circuit board by natecermak, from the natecermak/unkey repository on GitHub. It is a 4-layer board of 67 × 140.3 mm with 139 parts on 161 nets, routed with 1,109 tracks and 197 vias.

It is built around the PDSE1-S3-D24-M, TLV9062IDR-MS and ADA4098-1BUJZ-RL7, with the AH1912-W, SN74LV165ARGYR and CPC1002N among its other parts. Its parts include 74 ICs, 31 capacitors, 19 resistors, 11 connectors and 3 diodes. It belongs with the NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

12

README

README.md

Acoustic Underwater Text-based Communication Device (Name TBD)

Purpose/Motivation

Divers often need to communicate with one another or with a dive boat, but typically can only communicate when in visual range of each other. A simple means to communicate with a bandwidth of text messaging (~40 wpm) over distances of several hundred meters could potentially save lives when if other divers or the dive boat can be made aware of and respond to unexpected conditions/situations.

Communication scheme overview

Acoustic communication is basically the only feasible scheme underwater, and hence has been the standard for underwater communication since at least the early 1900s. Electromagnetic signals penetrate very poorly underwater, so convential means of communication (cellular communication, radio/walkie-talkies, bluetooth, wifi) are not feasible. Optical signaling is sometimes feasible (e.g. with flashlights), but relies on line of sight and good water clarity, and has limited range due to scattering and absorption underwater. However, if one has ever heard dolphins or whales underwater, they can attest to the immense distances these signals can travel, greatly exceeding the distance one can see underwater.

Underwater environments (a) add a lot of noise and (b) distort signals due to reflections.

Here, we use a FM/AM/OFDM scheme to send bits.

Subsystems:

Keyboard

To get around difficulties with mechanical keys, we chose to use magnetic sensors and a magnet-bearing stylus. Underwater, mechanical keys have several failure modes:

  • They can break in such a way that allows water into the device, and
  • As one goes underwater, pressure increases, which eventually can press keys on its own, at which point buttons are stuck in the 'pressed' state, and basically useless. We chose to use omnipolar Hall-effect switches, which have a digital output that changes from high to low when the magnetic flux through the device increases beyond some threshold. We rapidly read out every key's on/off state using an array of daisy-chained shift registers, an approach commonly used in other keyboards. When the user brings the magnet-tipped stylus near a sensor "key", the microcontroller can read the change in the Hall-effect switch output.

Users typically prefer some tactile feedback when they hit a key, and this system doesn't naturally provide that. As such, we experimented with adding a soft (low coercivity) magnetic material (1-2mm mild steel ball bearings) above the Hall-effect sensor, to provide a small pull-in magnetic force when the stylus is brought close to the key. This provides tacticle sensation to the user that they have actually touched a key. It's essential that this material is magnetizable so that it attracts the stylus, but also that it cannot develop a permanent magnetic moment. If it were to develop a permanent magnetic moment, it would turn the Hall-effect sensor on all the time and the key would be stuck "on".

Keyboard layout: ---------- Default, no modifier ------- 1 2 3 4 5 6 7 8 9 0 q w e r t y u i o p a s d f g h j k l DEL CAP z x c v b n m ? BCK SYM SPACESPACESPACESP , . RET (plus 6 arrow keys, SEND)

---------- SYM modifier --------------- ! @ # $ % ^ & * ( ) ` ~ - _ = + : ; ' " [ ] { } | \ / < > DEL CAP z x c v b n m ? BCK SYM SPACESPACESPACESP , . RET

key count is: row 1: 10 keys row 2: 10 keys row 3: 10 keys row 4: 10 keys row 5: 5 keys off-grid: 6 arrow keys, 1 SEND key Total: 52 keys

Non-character keys: 6 arrow keys, SEND, BCK, DEL, CAP, SYM

Future work could use open-drain hall-effect sensors in a grid to give more precise hit-boxes (e.g. a 2x2 grid of AH1925-HK4-7, wired in parallel, for each key). However, this would be significantly more expensive, as it would require roughly 4x as many switches.

Microcontroller

We use a Teensy 4.1 microcontroller due to ease of development. Essential features this microcontroller provides are:

  • rapid (~100 ksps) ADC readout via DMA
  • SPI peripheral for driving a TFT LCD scree n - DMA-compatible SPI peripheral for driving a DAC
  • I2C peripheral for controlling an external switch matrix However, many other microcontrollers would likely work fine for this system.

Battery

We use a rechargeable lithium ion battery, which provides a nominal 3.7V input.

Transducer

We use a 45mm x 45mm x 1.4mm square piezo plate from Steminc (SMPL45W45T14111) as a transducer. This piezo is spec'd as having a capacitance of 5.4nF +- 20%. It's made from material SM111, which has a piezo d33 constant of 320e-12 C/N.

We made some measurements of the impedance at various frequencies: - Frequency Real Imaginary (Capacitance, Q) - 0.1 kHz: 570 - 103.5k imag (15.3nF, Q=182) - 1.0 kHz: 45 - 10.42k imag (15.3nF, Q=236) - 10.0 kHz: 2.9 - 1.03k imag (15.4nF, Q=356) - 40.0 kHz: 2.25 - 63 imag (63.0nF, Q=28) -100.0 kHz: -0.09 - 132 imag (12nF, Q=1350)

Overall, this seems pretty discrepant with their claim of 5.4nF. Given two parallel plates of this size, separated by 1.4mm, and a dielectric constant of 1400 (also from the SM111 materials page), the calculated capacitance should be 17.9nF, closer to our measured value than their spec.

We also purchased several other transducers to try out, but have not yet used/characterized ther others:

  • SMD25T14F15111 - Piezo Ceramic Disc 25x1.4mm R 1.5 Mhz 1.9 nF
  • SMD50T21F1000R - Piezo Electric Disc 50x2.1mm R 1 MHz 10 nF

Transducer driver

Transducer sensor

We use a charge amplifier circuit with a configurable gain.

Sensor data processing

We use Goertzel filters to extract amplitude and phase at a fixed set of frequencies.

Screen

TBD.

Enclosure

TBD.

Version history:

v1.2 PCB changes:

  • switch from teensy 4.1 to t4 for space
  • add battery monitor circuitry
  • replicate LiIon charger circuit on it https://github.com/adafruit/Adafruit-USB-LiIon-LiPoly-Charger-PCB/tree/master
  • switch shift registers to qfn
  • redo keyboard layout
  • add 40-pin ZIF connector for 3.2" TFT from buydisplay.com
  • make all passives 0402 for consistency
  • add explicit space for screen
  • add explicit space for battery
  • add explicit space for Qi charger coil + PCB
  • pull LAT down on MCP4, or just wire it out -- cant leave it floating
  • CE on 5V boost wont work! needs to be always enabled, and drive a switch
  • figure out FMARK and RD on ZIF connector for display: tested with them floating and display still works, so non-essential

v1.3 pcb

  • split board into two separate parts with explicit design for overall assembly. This is for two reasons:
    1. so that I can do single-sided assembly on both pieces, but then have some parts sticking up (keyboard) and some facing down (teensy/driver electronics)
    2. it makes the face of the screen flush with the face of the magnetic switches.
  • fix TFT connector pin numbering (it's backwards from the connector)
  • make an attempt at a BOM

Firmware File Organization

text
firmware/
├── platformio.ini
├── include/                  # All header files
│   ├── battery.h
│   ├── chat_logic.h
│   ├── comm.h
│   ├── config.h              # Shared constants, types, UI/chat/layout settings
│   ├── display.h
│   ├── goertzel.h
│   ├── hardware_config.h     # Pin assignments and hardware setup
│   └── keyboard.h
├── src/                      # Main firmware source code
│   ├── battery.cpp
│   ├── chat_logic.cpp        # Message buffer, scrolling, state management
│   ├── comm.cpp              # Encode/decode bits, tx/rx state
│   ├── display.cpp           # Drawing chat, keyboard, cursor
│   ├── goertzel.cpp          # Frequency detection (demodulation)
│   ├── keyboard.cpp          # Polling, key states, modifiers, stylus interaction
│   └── main.cpp              # Entry point: setup(), loop(), high-level orchestration
├── test/                     # Unit test suites (organized by feature and file)
│   ├── receiving/
│   │   ├── test_adc_buffer_full_interrupt/
│   │   │   └── adc_buffer_full_interrupt.cpp
│   │   ├── test_decode_single_bit_from_adc_window/

Parts

139
QtyValueFootprintReferences
51AH1912-WPackage_TO_SOT_SMD:SC-59U1, U2, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23 +35
160.1uCapacitor_SMD:C_0402_1005MetricC1, C2, C3, C4, C5, C6, C7, C10, C11, C20, C22, C23, C24, C26, C27, C31
8Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1, J4, J7, J8, J11, J12, J13, J14
72.2uCapacitor_SMD:C_0402_1005MetricC8, C9, C21, C25, C28, C29, C32
7SN74LV165ARGYRPackage_DFN_QFN:Texas_RGY_R-PVQFN-N16_EP2.05x2.55mmU53, U54, U55, U56, U57, U58, U59
61kResistor_SMD:R_0402_1005MetricR2, R3, R9, R81, R82, R84
4AH1921-W-7Package_TO_SOT_SMD:SC-59U45, U68, U69, U70
310kResistor_SMD:R_0402_1005MetricR11, R68, TH1
3LEDLED_SMD:LED_0603_1608MetricD65, D66, D67
2100Resistor_SMD:R_0402_1005MetricR1, R79
2100kResistor_SMD:R_0402_1005MetricR76, R78
2500Resistor_SMD:R_0402_1005MetricR6, R80
2CPC1002NPackage_SO:SOP-4_3.8x4.1mm_P2.54mmU71, U73
2Conn_01x05_PinConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ2, J3
2TLV9062xDPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU62, U65
10Resistor_SMD:R_0402_1005MetricR4
1100MResistor_SMD:R_0402_1005MetricR5
1100pCapacitor_SMD:C_0402_1005MetricC17
110nCapacitor_SMD:C_0402_1005MetricC13
110pCapacitor_SMD:C_0402_1005MetricC19
118kResistor_SMD:R_0402_1005MetricR10
11nCapacitor_SMD:C_0402_1005MetricC15
12342-05-000unkey-footprints:2342-05-000U61
12kResistor_SMD:R_0402_1005MetricR83
13.3nCapacitor_SMD:C_0402_1005MetricC14
1330pCapacitor_SMD:C_0402_1005MetricC16
133nCapacitor_SMD:C_0402_1005MetricC12
133pCapacitor_SMD:C_0402_1005MetricC18
1ADA4098Package_TO_SOT_SMD:SOT-23-6U67
1ADG728Package_SO:TSSOP-16_4.4x5mm_P0.65mmU63
1Conn_01x40_PinConnector_FFC-FPC:Hirose_FH12-40S-0.5SH_1x40-1MP_P0.50mm_HorizontalJ6
1MCP48CVD21Package_DFN_QFN:DFN-10-1EP_3x3mm_P0.5mm_EP1.55x2.48mmU64
1MCP73833Package_DFN_QFN:DFN-10-1EP_3x3mm_P0.5mm_EP1.58x2.35mmU80
1MYRBP500080B21REunkey-footprints:MYRBP500080B21REU60
1PDSE1-S3-D24-Munkey-footprints:CONV_PDSE1-S3-D24-MPS1
1Teensy4.0unkey-footprints:Teensy40U76
1XC6210B332MRPackage_TO_SOT_SMD:SOT-23-5U66

Similar boards

  • 6 layers35 × 50 mmPower stage rev8, the printed circuit board in 3D

    Power stage rev8

    oresat/oresat-adcs-hardware

    Controller PCB for OreSat reaction wheels, magnetorquers, IMU, and magnetometers

    239 parts21GPL-2.0
  • 2 layers144.5 × 54.5 mmBMS 13 VF, the printed circuit board in 3D

    BMS 13 VF

    EOSCogniton/ELIZ-2022

    Le Git Artemiz de l'EPSA. Contient le Catia, ainsi que la documentation en cours et quelques modèles.

    114 parts4
  • 2 layers100 × 100 mmCOM Switcher, the printed circuit board in 3D

    COM Switcher

    twfth9/Kenwood-Handset-Switch-PCB

    459 partsGPL-3.0
  • 2 layers120 × 66 mmIo daughterboard, the printed circuit board in 3D

    Io daughterboard

    kbob/MinimumViableSynth

    A virtual analog synthesizer with lots of knobs and buttons.

    136 parts28GPL-3.0
  • 2 layers36 × 42.7 mmKeynjector, the printed circuit board in 3D

    Keynjector

    jhagmar/keynjector

    There are several bad solutions to managing passwords securely, e.g.,

    44 partsGPL-2.0
  • 2 layers133.4 × 97.8 mmSmartIOv3.3, the printed circuit board in 3D

    SmartIOv3.3

    igg-iot/BBD9000

    Automated Biodiesel Dispensing Kiosk and Coop Management Software - A Free Software and Hardware Project

    126 parts2
  • 2 layers114.8 × 68.6 mmLight controller, the printed circuit board in 3D

    Light controller

    cmumford/light-controller

    Test PCB to control an array of lights

    38 parts1MIT
  • 2 layers27 × 60 mmCore board, the printed circuit board in 3D

    Core board

    unl-rocketry/flight-computer

    An experimental flight controller/altimeter board family developed by UNL Aerospace Rocketry

    39 parts1CERN-OHL-S-2.0

Questions

How big is the Unkey PCB?

It measures 67 × 140.3 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Unkey use?

139 parts, built around the PDSE1-S3-D24-M, TLV9062IDR-MS, ADA4098-1BUJZ-RL7 and AH1912-W. 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 Unkey KiCad files?

From the natecermak/unkey repository on GitHub, at the commit this page was made from: the board is pcb/unkey.kicad_pcb and its schematic pcb/keyboard.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Unkey design in my own project?

Its repository states no licence, so its author keeps all rights: ask natecermak before reusing the design.