Hardware design files and reference material for the Bodybytes implantable WiFi router, a custom flexible PCB built around the MediaTek MT7628AN.
Firmware, OS, and provisioning documentation live in the sibling bodybytes-firmware repository, see that repo if you're looking for anything software-related rather than hardware design.
- A WiFi-capable microprocessor manages the operating system.
- On boot, a sensor can trigger the device to enter a read-only recovery bootloader, which lets the user roll back the OS and configure the device for use cases beyond a simple WiFi file server.
- User-accessibl memory is the primary storage medium for both the OS and user data (documents, pictures, video).
- Bodybytes uses wireless power delivery, with capacitive energy storage buffering brown-outs from power-draw spikes and temporary coil misalignment. A battery-powered option is possible but not planned at this time.
| Component | Part | Notes |
|---|---|---|
| Printed circuit board | 4-layer polyimide flexible PCB | Manufactured by PCBWay |
| Microprocessor | MediaTek MT7628AN | Router SoC |
| RAM | Etron EM68D16CBQC-18IH | 256 MB DDR2 |
| SPI NOR flash | Winbond W25Q512JV | 64 MB |
| eMMC | Kingston EMMC128-IY29-5B111 | 128 GB NAND |
| WiFi antenna | Antenova SR4W035 Serica | 2.4 GHz SMD chip antenna |
| Wireless power receiver | TI BQ51013C | Qi v2.0 |
| Power converter | TI TPS62442 | Dual step-down converter |
| Energy buffer | 4x KEMET T545H158M006ATE035 | 1500 uF polymer tantalum |
| Boot-trigger sensors | IR photodiode + Hall-effect sensor | Redundant, see Sensor |
| Operating system | OpenWrt + apk | See bodybytes-firmware for OS/package documentation |
| Recovery bootloader | Das U-Boot | See bodybytes-firmware/docs/uboot.md |
| Property | Value |
|---|---|
| Length x Width | 91.8mm x 23.65mm |
| Layers | 4 |
| Thickness | 0.3mm |
| Min track/spacing | 0.06mm |
| Min hole size | 0.15mm |
| Min pad size | 0.35mm |
| Finished copper | 18um |
| Inner copper | 18um |
Bend radius
The only copper traces transiting the bend are the two for the Qi receiver coil, both on layer 2. The routing in this area incorporates an accordion strain-relief topology. PCBWay's flexible PCB specifications indicate that a polyimide flex with a single copper layer can safely bend at a radius 3-6 times the PCB thickness - with a 0.3mm thick PCB, a 1mm bend radius should be safe to let the coil adhere to the ferrite sheet.
MT7628 variants
| Variant | Built-in RAM | External RAM |
|---|---|---|
AN |
none | up to 256 MB DDR2 |
NN |
none | up to 256 MB DDR2 |
KN |
8 MB DDR1 | not supported |
DAN |
64 MB DDR2 | not supported |
Bootstrapping pins (MT7628AN datasheet section 2.4)
| Bootstrap signal | Pin | Value | Meaning |
|---|---|---|---|
DBG_JTAG_MODE |
UART_TXD1 (147) |
0 |
JTAG mode |
XTAL_FREQ_SEL |
PERST_N (135) |
1 |
40 MHz SMD crystal |
DRAM_TYPE |
I2S_SDO (17) |
0 |
DDR2 |
CHIP_MODE[2:0] |
SPI_MOSI (27), SPI_CLK (25), SPI_CS1 (24) |
011 |
Boot from XTAL (SPI 4-byte addressing) |
EXT_BGCK |
UART_TXD0 (30) |
0 |
Normal (default) |
DDR2 RAM: DDR2 does not support write leveling to accommodate the skew introduced by the fly-by routing topology.
eMMC: the reset pin is connected to MDI_TN_P1 (pin 42) to overcome fault conditions. Vccq IO voltage is 3.3V, which does not allow HS200/HS400 speeds - but the MT7628 doesn't support those speeds either, so this isn't a limitation in practice.
Antenova SR4W035 Serica, 2.4 GHz SMD chip antenna (see Specifications). See bodybytes-firmware/docs/wifi.md for the RF path and calibration profile.
Coil configuration
The wireless charging coil is a 4-layer continuous PCB trace, on the same flexible PCB as the rest of the components. Assembly folds the coil section over the main PCB; a ferrite sheet is adhered to the bottom of the main PCB, and the coil is adhered to the top of the ferrite sheet.
Coil properties (Bodybytes v1.0)
| Measurement | Value |
|---|---|
| LCR coil inductance without ferrite (Ls) | 23.70uH |
| LCR coil inductance with ferrite (Ls') | 41.00uH |
| VNA coil inductance without ferrite (Ls) | 21.15uH (56pF 250V: 1.800MHz (314pF) ~ 22pF 100V: 1.889MHz (314pF)) |
| VNA coil inductance with ferrite (Ls') | 66.50uH (56pF 250V: 1.355MHz (151pF) ~ 22pF 100V: 1.482MHz (151pF)) |
| Coil resistance | 3.6 Ohm |
| Ferrite plate permeability | 1000 |
Coil capacitor calculations (BQ51013C datasheet, page 30)
C1 = 1 / ((fS * 2pi)^2 * Ls')
C1 = 1 / ((100kHz * 2pi)^2 * 66.5uH) = 38.1 nF
Selected: ~39nF
C2 = 1 / ((fD * 2pi)^2 * Ls - (1 / C1))
C2 = 1 / ((1MHz * 2pi)^2 * 21.15uH - (1 / 39nF)) = 1.20 nF
Selected: ~1.2nF
Page 31 of the BQ51013C datasheet specifies 47nF, 470nF, and 10nF for the COMM/CLAMP/BOOT capacitors respectively. The COMM capacitor could be bumped down to 22nF to weaken power-contract negotiation fidelity while increasing power-transfer efficiency.
Power supply system
The BQ51013C Qi v2.0 receiver negotiates a power contract with a Qi-compliant transmitter and generates a 5VDC output. Designs with similar coil configurations have supplied 500mA continuously without significant voltage droop, though transmit/receive coil alignment is critical for consistent operation. Qi charging losses manifest as heat in the receiver, which is a concern in the hermetically sealed environment of an implant.
The TPS62442 dual step-down converter is configured for a 3.3VDC output powering most of the system, plus a 1.8VDC output for several subsystems. The MT7628's integrated power supply provides 1.2VDC for the digital core. The COMP/FSET resistor (45kOhm) selects compensation setting 2 with spread-spectrum clocking disabled, weighting the operating frequency toward the maximum (4MHz) to increase efficiency and reduce ripple/heat in the low-value switching inductor (0.47uH). SSC was deemed unnecessary since output noise isn't a significant concern and dithering could introduce unforeseeable complications with surrounding circuitry.
MT7628AN current consumption
| Voltage | Min current (mA) | Max current (mA) |
|---|---|---|
3.3VDC |
440 |
1000 |
1.8VDC DDR2 |
50 |
170 |
1.2VDC |
150 |
380 |
Two external sensor types are redundantly connected to a single GPIO on the MT7628 (MDI_TP_P1, pin 40) so the user can force the device into the recovery bootloader on power-up.
IR photodiode: human skin has a light-absorption window around 1000nm. Würth's WL-SDCB series photodiodes have a good spectral response around 940nm (1.8uA/mW/cm^2 photocurrent) over a roughly 250nm window (800-1050nm). Solar spectra from NREL put average irradiance in that window at 0.07 mW/cm^2/nm, or 17.5 mW/cm^2 across the window. Published transmission data shows ~16.5% of light passing through 5mm of skin at 870nm; assuming thinner skin and higher transmittance at 940nm, ~30% is assumed to reach the sensor (5.25mW/cm^2).
Candidate IR LEDs emit 5-6 mW/sr at 20mA, equivalent to 5-6 mW/cm^2 at 1cm. The MT7628's 3.3V GPIO needs to read below 0.8V for low and above 2V for high. Sunlight would drive the photodiode's I_P to 9.5uA; targeting 3.1V output in sunlight needs a 22kOhm resistor with a 3.3V supply, and reaching 0.8V through that resistor needs 120uA, requiring 66.6mW/cm^2 at the photodiode - accounting for skin attenuation, that means ~200 mW/sr from the IR LED. 15412094A3060, 15412094A2070, and 15435394A9050 had the highest mW/sr/mA among candidates evaluated.
Hall-effect sensor: a surface-mount omnipolar Hall-effect sensor sits at the board edge near the WiFi antenna. A magnetic field strength calculator determined that a 3x1mm N52 magnet generates 13mT at 5mm from the sensor. The DRV5032FC Hall-effect sensor (Texas Instruments) was selected to avoid erroneous triggering from environmental magnets or the Qi wireless-charging field.
Background and design-journey notes that shaped v1.0 but aren't part of its current spec.
Bodybytes is an implantable WiFi router with software the user can configure and update. The Pegleg was a previous implant with similar goals, but it ran the now-defunct PirateBox software, couldn't be updated or configured over the air, and was built from off-the-shelf development boards like the Raspberry Pi Zero W. Bodybytes is a custom PCB designed from the ground up for implant performance and usability.
Before the custom PCB existed, a VoCore2 development board - which uses the same MT7628AN SoC - served as the hardware reference and software bring-up platform. Early bring-up work on VoCore2 also characterized power consumption and file-transfer throughput as a baseline for the custom board.
VoCore2 remains useful today as a lower-risk development board for firmware bring-up; see bodybytes-firmware/docs/vocore2.md for how it's used as a development proxy, and the Reference Docs/vocore2/ directory in this repo for its schematics and PCB files.
Proposed changes and open considerations for later hardware revisions, none of these are part of the current v1.0 board.
- Companion charging device: a separate device, worn on a strap enclosing the install location, incorporating a wireless-power transmitter with support for multiple charging coils and a sensor trigger to initiate the recovery bootloader. Intended to improve charging efficiency/reliability over a hand-aligned transmitter and reduce receiver heat in the sealed implant environment.
- Add a pull-up resistor to
SPI_MOSIfor reliable 4-byte addressing of the NOR flash. - Remove the pull-down resistor
R9onUART_TXD1, because the eMMC SDIO bus does not work when JTAG is enabled by this strapping pin. Instead, expose it as a testpoint to be driven during flashing. - Possible hardware write-protect on the NOR flash.
- Increase the size of
C42(BQ51013A rectifier capacitor) to decrease derating at the20Vlimit.
PJabbs, Mayhem, mei&, SilentPotato, Satur9