Lohmega BoxTag: from idea to ordered board in 56 hours

Nov 2026 · results from CST, Optenni, KiCad and FreeCAD, compared with openEMS and Altium

BoxTag at a glance

Lohmega BoxTag: Bluetooth tag that finds boxes and logs shipments

BoxTag, top side at an angle
BoxTag, top side at an angle

The tag attaches to a box, a crate or a parcel. It tells you where the box is and which shelf it sits on. It beeps and blinks when someone is looking for it, and notices when the box is moved.

Sent along with a shipment, it logs temperature, humidity and air pressure at regular intervals and records shocks and drops. The log is read over Bluetooth when the box arrives.

26 × 26mm, about 7 mm thick
CR2032replaceable coin cell
~4 yearsbattery life, locating1
4 sensorsmotion, pressure, temp, RH

Find the right box

  • Position from fixed listeners in the building
  • Shelf level from air pressure, against a fixed reference
  • Buzzer and red LED on command
  • Wakes on motion, listens for commands every 60 s

Log the shipment

  • Temperature and relative humidity
  • Shocks and drops with time and the highest sampled acceleration4
  • Air pressure, for example during air freight
  • Read out by phone or listener on arrival

Specifications

Radio
RadioNordic nRF54L05, Bluetooth Low Energy 2.4 GHz
AntennaBuilt into the circuit board, along its edge
EfficiencyAbout −3.6 dB (44 %) in free space, worst channel2
MountingPlastic and wood have little effect. Keep at least 20 mm from metal.2
RangingThe radio supports Channel Sounding (Bluetooth 6.0)
NFCOption: pads for an external NFC coil. Tap a phone on the tag to read the log or pair; the field wakes the tag. Without a coil the pads are two spare GPIO.
Sensors
TemperatureSensirion SHT40, ±0.2 °C typical
HumiditySensirion SHT40, ±1.8 %RH typical, 0–100 %RH non-condensing
Air pressureBosch BMP581, noise < 0.1 Pa (about 1 cm of height)
AccelerationST LIS2DH12, ±2/4/8/16 g, with wake on motion, shock threshold and free-fall detection
Logging
IntervalConfigurable, for example every 10 minutes
EventsShock above threshold, drop and motion, all time-stamped4
MemoryInternal, on the order of tens of thousands of records3
Signalling
BuzzerPiezo, at least 65 dB at 10 cm
LEDRed
Power
BatteryCR2032, 3 V, 220 mAh, replaced without tools
Battery lifeAbout 4 years when locating. About 1.5 years in shipment mode, with the accelerometer at 100 Hz for shocks.1
Mechanical and environment
Size26 × 26 × about 7 mm, about 6 g with battery
FormAssembled circuit board. Enclosure to the customer's needs.
Operating temperature−20 to +60 °C, limited by the battery
ProgrammingTest pads (SWD). Firmware adapted to each application.

1 Calculated from the component datasheets. The sleep current will be measured on the prototype series. Shipment mode assumes the wake-up scan is off.

2 Electromagnetic simulation (CST) of antenna, board, battery and holder, to be verified by measurement on the prototype. The value is the routed board with its own matching network; the ordered revision, which has a small stiffening bridge across the antenna slot, is estimated at about −3.4 dB. Range depends on the surroundings and the receiver.

3 Estimate. The number depends on how much memory the firmware leaves free and on the record size. At one record every 10 minutes (144 a day), 10,000 records cover about 70 days and 50,000 about 350 days, before shock events are counted. The log can therefore be shorter than the battery life.

4 The accelerometer is sampled, for example at 100 Hz (10 ms between samples), and measures at most ±16 g per axis. A short impact can be missed or its peak underestimated. The real peak is to be verified with controlled drop tests.

All values are preliminary and subject to change.

Contact: info@lohmega.com

Summary

A 26 × 26 mm BLE locator tag on a 4-layer, 1.0 mm board, taken from a requirement spec to fabrication files. The printed antenna reaches −3.4 dB worst-case total efficiency over the BLE band in the CST antenna model, with a milled air slot beside the arm. A 0.6 mm tongue of FR4, the board material, is left across the middle of the slot to keep the arm stiff. The datasheet gives −3.6 dB, a CST−based estimate for the routed board before the tongue was added: its copper simulated in CST, with a network fitted to it by calculation (2.6 nH series, 4.8 nH shunt). For revision A as ordered, with the tongue and the network refitted (1.5 nH series, 3.9 nH shunt), the estimate is about −3.4 dB; the datasheet keeps the lower figure. The antenna figures are CST and Optenni simulations; the prototype series is to verify them before a larger series (see Prototype test plan).

Starting point

The input was a one-page requirement spec for a coin-cell BLE tag that is taped to storage boxes, so fixed listeners can locate them and a buzzer can find the last metre.

System

Every box in the office, lab and store gets a tag. Fixed ESP32 listeners pick up its advertising and report RSSI over MQTT to a server, which builds an approximate position per box over time. The server sends wake-up and beep commands back through the listeners. For the last metre, a phone talks to the tag directly. Later, nRF54L anchors or phones can measure distance with Channel Sounding.

The listeners are placed at surveyed positions. A few BoxTags at carefully surveyed positions among the boxes can complement them as reference tags: their signals travel through the same shelves and boxes as everyone else's, so the server can calibrate how signal strength falls off in the real room and correct the other tags' positions. That raises accuracy at the cost of a few extra tags.

The tag talks to listeners and phones; the server keeps the positions Tag on every boxnRF54L05, CR2032, 26 × 26 mmPiezo, LED, accelerometerPressure sensor for shelf height ESP32 listeners, 4–8One per room or shelf section ServerPosition and height per boxWeb UI: search and beep PhoneLast metre: RSSI and beepLater: Channel Sounding nRF54L anchors (later)CS initiator, measures distance advertisingwake-up, beepMQTTdirect BLEChannel Sounding
System overview · tag, listeners, server, phone

The tag sleeps almost all the time and wakes only for short transmit and listen windows. Firmware sets the behaviour, but each mode sets a requirement on the hardware:

ModeWhat the tag doesHardware on this board
RestOne BLE advertising event per day (extended advertising)Radio, 32.768 kHz crystal for the low-power timer
Wake-up listeningScans for about 25 ms on one channel every 60 s for a listener's commandRadio
Dense advertisingConnectable advertising every few seconds for a few minutes, after a wake-up or a moveRadio, 2 × 47 µF buffer
BeepDrives the piezo in antiphase from two GPIOs and blinks the LEDBZ_A (P1.04), BZ_B (P1.12), LED (P1.07)
MoveThe accelerometer's wake-up interrupt wakes the MCU, and the server resets that box's position historyLIS2DH12 on SPI, INT1 on P1.06
ClimatePowers up the humidity sensor with the pressure sensor and logs temperature and relative humidity, for example during a shipmentSHT40 on the same I2C bus and switched supply
HeightPowers up the pressure sensor, reads air pressure and switches it off again. The server compares the reading with a fixed reference sensor to find the shelf levelBMP581 on its own I2C bus, powered from a GPIO
Channel SoundingReflector role, for distance from anchors or phonesRadio; wide-band matching matters more than peak efficiency

A wake-up packet carries the tag ID and command in manufacturer data, for example "tag 0x1234: beep" or "all: advertise densely for 5 min", so beeping needs no connection.

The CR2032 feeds the nRF54L05 and the accelerometer directly, with no regulator. The average current is about 5–6 µA: 1.5–2 µA sleep with the timer running, about 1.4 µA for the wake-up scans (25 ms every 60 s at Nordic's 3.4 mA receive current with the 32 MHz crystal running), about 2–2.5 µA for the accelerometer (wake-up detection needs it running; ST gives 2 µA at 1 Hz in low-power mode at 1.8 V, a little more at 3 V) and almost nothing for the daily advertising. That gives about 4–5 years on 220 mAh, about 4 years with self-discharge. Battery life is a target until the sleep current is measured on the prototype. The cell runs from about 3.2 V new to 2.0 V empty, inside the nRF54L05's 1.7–3.6 V, and the buffer capacitors carry the TX and beep current pulses.

A barometric pressure sensor, Bosch BMP581, tells shelf levels apart. It runs from 1.71 to 3.6 V, so it works over the whole life of the CR2032. It sits on its own I2C bus (TWIM30 on port P0), separate from the accelerometer's SPI, and is powered from a GPIO (P0.00, pin 23), so it draws nothing in sleep. A 10 Ω resistor between the GPIO and the sensor's supply pins limits the inrush current, as Bosch requires when the supply can ramp faster than 10 µs (datasheet section 6.2.5). The I2C pull-ups sit on the GPIO side of it, so no current leaks through SDA or SCL when the sensor is off. SCL is on clock pin P0.03 (pin 28), as the nRF54L datasheet requires for TWIM, and SDA on P0.01 (pin 24). CSB tied to VDDIO selects I2C, and SDO to ground gives address 0x46. The datasheet gives under 0.1 Pa RMS noise (about 1 cm of height), 0.06 hPa relative accuracy per 10 kPa step and 0.5 Pa/K temperature drift. No tracks or vias run under the sensor, as Bosch recommends. Weather moves air pressure by several metres' worth of height per day, so height needs a fixed reference sensor, for example in a listener, and a one-time calibration at a known height.

A Sensirion SHT40 measures relative humidity (±1.8 %RH typical) and temperature (±0.2 °C typical). It shares the I2C bus and the switched supply after the 10 Ω resistor with the pressure sensor, at address 0x44, with its own 100 nF capacitor. It sits in the upper-right corner, the only free area near the bus, away from the DC/DC inductor and outside the antenna sector. Its opening needs contact with the surrounding air, so it must not be covered with tape or coating, and no copper runs under it (the keep-out area in its footprint). Its built-in heater draws far more current than a measurement and is not meant for the GPIO-switched supply, so firmware must keep it off. With both sensors on the same switched supply, the voltage at the sensors during simultaneous measurement and I2C traffic, with a nearly empty cell, is on the prototype test plan.

Key findings and decisions

The milled air slot is what makes the antenna work: it lifts worst-case total efficiency across 2400–2483.5 MHz from −4.8 dB to −3.3 dB by removing FR4 where the field is strongest.

Variant (CST + Optenni, real parts)ResonanceRadiation efficiencyMatched, worst in band
Without slot2440 MHz45–48 %−4.8 dB
Without slot, FR4 made lossless (diagnosis only)2444 MHz86–89 %−3.4 dB
With slot, 1.6 mm board2465 MHz65–67 %−3.4 dB
With slot, 1.0 mm board2463 MHz67–69 %−3.4 dB
With slot and 0.6 mm tongue (this design)2446 MHz66–68 %−3.3 dB (network refitted; −3.2 dB without the tongue, same method)
  1. FR4 loss dominates. Removing dielectric loss raised radiation efficiency from 46 % to 87 %. Making the coin cell and holder perfect conductors changed nothing.
  2. A milled slot recovers most of it. A 1.05 mm slot between the ground edge and the arm costs only a routing operation at JLCPCB. It runs along the long open section of the arm; a slot between the feed and the short adds nothing.
  3. A 0.6 mm FR4 tongue across the slot stiffens the arm. Without it, the 1.6 mm wide strip of FR4 under the arm spans about 21 mm with nothing holding it. A tongue in the middle of the slot halves that span: by a simple beam estimate the strip bends about an eighth as much and the stress where it joins the board drops by about half. The FR4 in the tongue pulls the resonance down 17 MHz, to 2446 MHz. With the antenna model's network that costs 0.75 dB, but with the network refitted it is −3.30 dB against −3.22 dB without the tongue. The network is fitted on the first batch anyway; the starting values are under Check against the routed board. The tongue sits in the middle, where it stiffens most. A 1 mm tongue there cost more (−3.46 dB), and a 1 mm tongue a third of the way from the feed matched the 0.6 mm one (−3.30 dB) but left a longer free span. JLCPCB gives no rule for the 0.60 mm of FR4 between two routed slots, so it is confirmed with the order.
  4. Bandwidth, not loss, is the final limit. Without FR4 loss the antenna Q rises, so even an ideal network gains only 1.4 dB on the full band.
  5. Board thickness does not matter once the slot exists. 0.8, 1.0 and 1.6 mm all matched to −3.4 dB. 1.0 mm was chosen for a thinner tag with margin for battery insertion.
  6. Matching uses real parts and the real layout. The pi network uses Murata LQW15AN inductors and the track lengths of the routed board, where the feed to the antenna leaves from the shunt inductor's pad. On the antenna model with the 0.6 mm tongue the best values are 1.6 nH series and 4.8 nH shunt, giving −3.3 dB (2.4 and 7.0 nH without the tongue); the third position (L22) is not fitted. The network is not assembled at the factory: it is measured and fitted by hand on the first batch.
  7. Layout rules from Nordic were kept. In the RF filter, capacitor C6 grounds only to pin 32, pin 32 only to the exposed pad (a copper bridge inside the footprint), and C9 grounds only on the bottom layer through an isolated via.
  8. Pin assignment follows the placement. SPI uses the P2 pins that face the accelerometer. The buzzer and LED use the P1 pins on the side that faces them, and the pressure sensor the P0 pins at the top-left corner, right under it. The 32 MHz crystal is turned 90° so its two traces do not cross each other. Decoupling capacitors that would block the QFN escapes connect through the planes.
  9. The NFC pins come out to two pads. P1.02 and P1.03 (NFC1/NFC2) run to two 2.0 × 1.8 mm solder pads at the bottom edge of the top side, about 1 mm from the edge and at least 1.8 mm from the 47 µF capacitors (both were turned upright for this), so a wire or coil is easy to solder, with a 0201 footprint from each line to ground for NFC tuning (not fitted). They serve as two spare GPIO with NFC disabled in firmware, or take a soldered-on NFC coil, whose field can also wake the chip. The pins sat boxed in by the crystal and buzzer traces, so seven nets around that side were rerouted with 0.1 mm track and clearance (JLCPCB allows 0.09 mm on four layers; the rest of the board keeps 0.15 mm). The two traces of the 32.768 kHz crystal now run on inner layer 2 with two vias each, where they pass other nets, and NFC1 passes under that crystal. Oscillator start-up and, with a coil fitted, coupling into the 32.768 kHz oscillator are on the prototype test plan.
  10. The RF line is 50 Ω. The 0.35 mm traces over inner layer 1, the ground plane (0.2104 mm of 7628 glass-weave prepreg, εr 4.4), are 51.2 Ω as microstrip and 50.4 Ω as grounded coplanar with the 0.15 mm pour gap. Along most of the path the pour is further away, which puts them at 50–53 Ω. The 0.2 mm, 1.1 mm QFN escape is about 67 Ω, but it is 1.7 % of a wavelength. The ground plane is unbroken under the whole path, except the last 0.76 mm of the feed, which crosses the antenna notch where the CST port sits. JLCPCB later narrowed these traces for its own impedance calculation (see Manufacturing, panel and programming jig).
  11. Pins and parts are checked against the datasheets. The nRF54L05 QFN48 pinout matches the nRF54L datasheet v1.0 on all 48 pins, and a GPIO DETECT signal from the accelerometer wakes the chip from System OFF. The crystals, DC/DC inductor, ferrite and RF filter match Nordic's reference BOM. The 32 MHz crystal's ESR is 40 Ω against a limit of about 75–95 Ω at CL 8 pF. Every part was in stock at JLCPCB when ordered; the scarcest were the nRF54L05 (607 pieces) and the Keystone holder (455).
  12. The battery contact is three pasted pads, and only ground vias may sit in their openings. The main negative pad is a 5 mm circle 3.6 mm off centre, clear of the exposed-pad vias under the QFN and well inside the cell's negative cap. Two more 3 mm pads sit where the bottom layer is free of other nets, all within 6.1 mm of the cell centre, so the cell rests on three solder bumps. All vias are tented. A custom DRC rule forbids any non-ground via in a pad's mask opening.

Radiation pattern

The far field around the board, like CST's own plot: drag to rotate, scroll or pinch to zoom. The semi-transparent surface is realized gain at 2.44 GHz through the fixed pi network, so it includes mismatch. The colour scale follows each case, from blue at its weakest to red at its strongest (at most 20 dB down), with the range under the view; the distance from the centre grows 1.4 mm per dB above −25 dBi. The board and the box wall are to scale: the wall sits under the battery holder, grey for metal at its air gap and beige for plastic.

In free space the pattern is close to omnidirectional, with a shallow dip towards −x. Directivity is 1.6 dBi and radiation efficiency −1.7 dB (68 %). The CST model has the board, cell and holder, but no components or enclosure.

Fixed views of the same data, for print:

Realized gain at 2.44 GHz for all six cases from the same angle; up is away from the box, whose wall is below the tag
Realized gain at 2.44 GHz for all six cases from the same angle; up is away from the box, whose wall is below the tag
CST's own 3D gain plot at 2.44 GHz in free space (IEEE gain, without the matching network), lobe semi-transparent over the board and cell
CST's own 3D gain plot at 2.44 GHz in free space (IEEE gain, without the matching network), lobe semi-transparent over the board and cell
The same, seen edge-on with the board in the xy plane
The same, seen edge-on with the board in the xy plane

Antenna on a box

On a plastic box the tag loses 0.4 dB; on metal it needs about 20 mm of spacing to work almost as well as in free space. The CST model puts the tag battery-side down on an 80 × 80 mm wall: 2 mm polypropylene in contact, or a metal sheet at an air gap from the holder. Every case is evaluated through the same pi network that is tuned for free space, with Murata's measured part data.

Worst-case total efficiency in band against the air gap to a metal surface
Worst-case total efficiency in band against the air gap to a metal surface

At 10 mm the tag loses 3.2 dB against free space, about 30 % less range. Closer than 5 mm it loses 5–6.5 dB, about half the range. The metal lowers both the radiation efficiency (25–30 % at 0.5–5 mm, against 67 % in free space) and the match.

Matched S11 on a plastic box and on metal at 5 mm and 20 mm, against free space
Matched S11 on a plastic box and on metal at 5 mm and 20 mm, against free space

The resonance barely moves: plastic pulls it down about 15 MHz and metal at 20 mm about 10 MHz. So the network does not need retuning for boxes; on metal the loss is radiation, not detuning. For metal shelves or crates, a 20 mm foam or plastic spacer behind the tag is the practical fix.

Metal makes the tag one-sided. Plastic leaves the pattern unchanged. With metal behind it, the radiation into the box drops to −15 dBi at 2 mm, −13 dBi at 5 mm and −8 dBi at 20 mm, against −1 dBi in free space. Along the surface, the direction to a listener across the room when the tag sits on a box side, the average drops from −3.2 dBi to about −9.8 dBi at 2–5 mm and −6.7 dBi at 20 mm. At 20 mm the metal works as a reflector: realized gain straight out from the box rises to +4.7 dBi, against −0.6 dBi in free space.

Realized gain at 2.44 GHz in two elevation cuts; +z points away from the box
Realized gain at 2.44 GHz in two elevation cuts; +z points away from the box

Manufacturing spread

With the pi network fixed at the antenna model's values (2.4 nH series, 7.0 nH shunt), the worst manufacturing case drops to -4.5 dB worst-case total efficiency, 1.2 dB below nominal. FR4 permittivity (4.2–4.6), board thickness (0.9–1.1 mm) and slot width (±0.1 mm) each move the resonance by 15–25 MHz; radiation efficiency stays at 66–70 %. Every case loses 0.6–1.2 dB at one band edge. Measuring the network on the first batch, as planned, removes most of this; a batch with very different FR4 may need its own values.

Case (same pi network)Worst in bandvs nominal
Nominal (εr 4.4, 1.0 mm)-3.3 dB–
FR4 εr 4.2-4.1 dB-0.8 dB
FR4 εr 4.6-3.9 dB-0.6 dB
Board 0.9 mm-4.5 dB-1.2 dB
Board 1.1 mm-4.3 dB-1.0 dB
Slot 0.1 mm narrower-4.1 dB-0.8 dB
Slot 0.1 mm wider-4.0 dB-0.8 dB
Matched S11 under FR4 spread, same network
Matched S11 under FR4 spread, same network

Check against the routed board

The routed board is estimated to perform within 1 dB of the antenna model with the model's network values, and within 0.3 dB once the network is fitted to the board. The estimate starts from a CST run with the routed board's own copper: all four layers exported from KiCad with every track, pad, plane and via, plus the cell and holder, with the decoupling capacitors as lumped elements and the port across the pads of L21, the shunt inductor of the matching network. That run used the copper before the feed was moved to L21's pad; the 1.03 mm series track between L20 and L21 is added in the network calculation, not simulated.

Antenna modelRouted board (estimate)
Radiation efficiency, worst in band67 %64 %
Worst-case total efficiency, network for the antenna model (2.4 nH series, 7.0 nH shunt)-3.3 dB-4.0 dB
Worst-case total efficiency, network fitted to the board (2.6 nH series, 4.8 nH shunt)–-3.6 dB
With the 0.6 mm tongue, network fitted (1.5 nH series, 3.9 nH shunt on the board)−3.3 dBabout −3.4 dB

The board's tracks, parts and planes pull the resonance down about 20 MHz, and the tongue (the FR4 bridge across the slot) another 17 MHz. The board run was made before the tongue was added, so the tongue row is an estimate: the board run shifted by the change in resonance and radiation efficiency the tongue gave the antenna model, not a simulation of the board with the tongue. With the network fitted, the board with the tongue lands at about the same efficiency as without it. The network is fitted by hand on the first batch, so 1.5 nH and 3.9 nH (Murata LQW15AN) are the starting values for that measurement.

The board in 3D

Rendered with KiCad's command-line tool from the routed board. Passives, the 32 MHz crystal and the Murata buzzer use KiCad's library models, and the CR2032 holder uses Keystone's own STEP. The nRF54L05 QFN48, the 32.768 kHz crystal, the pressure sensor and the humidity sensor had no library model and were modelled by a FreeCAD script. The whole assembly is also exported as a STEP model.

Drag to rotate, scroll or pinch to zoom, right-drag or two-finger drag to pan. The model is KiCad's GLB export of the routed board, with copper, solder mask and silkscreen; the static renders below are for print.

Top side, angled: nRF54L05 in the middle, pressure sensor above its left corner, humidity sensor in the upper-right corner, Murata buzzer on the right, IFA and milled air slot along the upper-left arc
Top side, angled: nRF54L05 in the middle, pressure sensor above its left corner, humidity sensor in the upper-right corner, Murata buzzer on the right, IFA and milled air slot along the upper-left arc
Top side, straight down, with the ground stitching vias along the board edge
Top side, straight down, with the ground stitching vias along the board edge

The bottom side carries the programming pads (SWDIO, SWDCLK, nRESET and GND), 1.5 mm across, so the tag can be flashed from below in a pogo-pin jig. They sit in the four corners between the holder's solder tabs and its body, the only free copper on that side, with 0.3 mm to the holder's courtyard. GND gets its own pad because the holder metal is the positive terminal, and the negative pads are under the cell. The jig takes VBAT, and the programmer's VTref, from a pogo pin on the holder's metal plate, so the tag can be programmed and its current measured without a cell.

Ground stitching vias follow the CST model: along the ground edge in the antenna sector at 2 mm pitch and around the board edge, plus one via on each side of the IFA's shorting pad.

Bottom side: Keystone 3002 with CR2032, the four 1.5 mm programming pads beside the solder tabs
Bottom side: Keystone 3002 with CR2032, the four 1.5 mm programming pads beside the solder tabs

The assembly drawings, one per side and sent to JLCPCB with the other files, show reference designators only. Parts that are not fitted at the factory are crossed out: the antenna matching network L20–L22, which is fitted by hand after measuring the first boards, and the NFC tuning capacitors C17/C18. The bottom view is mirrored, as seen from below.

Assembly drawing, top side: reference designators, parts not fitted crossed out
Assembly drawing, top side: reference designators, parts not fitted crossed out
Assembly drawing, bottom side (mirrored): battery holder and the four programming pads
Assembly drawing, bottom side (mirrored): battery holder and the four programming pads

Manufacturing, panel and programming jig

Sixty assembled boards of revision A (date code 261119 on the silkscreen) were ordered from JLCPCB on 19 November 2026, with delivery expected in early December. The antenna matching network (L20–L22) and the NFC tuning capacitors (C17/C18) are not fitted at the factory. The network is measured and soldered by hand on the first boards. The board is frozen: any change goes into revision B.

Customer panel

JLCPCB declined to panelize the board because of its irregular outline, so the panel was designed for this project and sent to JLCPCB ready to build. A script builds it from the routed board through KiCad's Python interface and writes the Gerber and assembly files. The layout copies a panel that JLCPCB made for an earlier Lohmega board:

The 4 × 3 customer panel, top side: cells with milled gaps and mouse-bite tabs, V-cuts through the bars, fiducials and tooling holes on the rails
The 4 × 3 customer panel, top side: cells with milled gaps and mouse-bite tabs, V-cuts through the bars, fiducials and tooling holes on the rails
The panel at an angle, assembled
The panel at an angle, assembled

Impedance control

JLCPCB's engineering review recalculated the 50 Ω coplanar lines on layer 1 over the ground plane on layer 2 for the JLC04101H-7628 stackup. They proposed a width of 11.3 mil (0.287 mm) and a gap of 7.1 mil (0.18 mm) to the surrounding copper, instead of 0.35 mm and 0.15 mm. The difference most likely comes from the solder mask over the line, which lowers the impedance. Their figures were accepted for the RF lines only, not for the antenna copper. The lines between the parts are 0.76–2.45 mm long, at most about 1/27 of a wavelength at 2.45 GHz, so a few ohms either way costs hundredths of a dB. The matching network is trimmed on the first boards in any case.

Programming jig

A 3D-printed jig with five spring-loaded pogo pins programs the tag from below. A FreeCAD script builds it from the board's 3D model, so it follows the real outline and component heights. The jig has two parts:

Drag to rotate, scroll or pinch to zoom. Grey is the base, orange the lid, gold the pogo pins.

Programming jig: base (shown see-through) with the board in place, the five pogo pins from below and the lid lifted above
Programming jig: base (shown see-through) with the board in place, the five pogo pins from below and the lid lifted above

Prototype test plan

The figures above are calculated or simulated. The first boards are to check them, in roughly the order below. The pass limits are proposals, set from the budgets and datasheet limits used in the design; they are to be agreed before testing. Where a cell is replaced by a lab supply, a series resistor stands in for the cell's internal resistance. Energizer measures about 10 Ω for a fresh CR2032 at room temperature. At very low drain, as in this tag, it rises to about 100 Ω by the time 90 of the cell's 220 mAh are used, and cold raises it further: at 0 °C and 1 mA Energizer's cell runs 0.2 V lower than at 21 °C. No maker publishes a value at −20 °C. The tests therefore use 10 Ω (fresh), 100 Ω (half used) and 300 Ω (half used and cold, an estimate), and real cells at −20 °C.

TestBoards and conditionsPass if
1. Programming. The jig's pogo pins reach all five contacts; the tag is flashed and reset.All boards, room temperature.Flash, verify and reset succeed on the first or second seating; no marks on the test pads.
2. Oscillators. Both crystals start. With an NFC coil fitted, the 32.768 kHz oscillator is also checked for coupling from the NFC trace that passes under it.10 boards at −20, +25 and +60 °C, supply 2.0 V and 3.0 V, 10 power-ups each.Every power-up starts both oscillators; radio carrier within ±40 ppm over temperature (Bluetooth allows ±50).
3. Sensor supply. Voltage at the pressure and humidity sensors, after the 10 Ω resistor, while both measure and the I2C bus is busy. The humidity sensor's heater is never switched on.10 boards, 2.0 V through 100 Ω and through 300 Ω, at +25 and −20 °C, 100 power-ups each.Once start-up is complete, at least 1.8 V at the sensors during measurement and I2C traffic (the pressure sensor needs 1.71 V); both sensors answer and give plausible readings on every power-up. The power-up ramp is recorded separately and must rise without dips.
4. Current. Sleep current and the average over a full 60 s cycle in normal operation, which set the battery life.10 boards at 3.0 V and +25 °C; 3 of them also at −20 and +60 °C.Average at +25 °C at most 6 µA, the budget behind the battery-life figure; sleep current within the datasheet values for the parts.
5. Battery droop. Supply during radio transmission and while the buzzer sounds, at the same time if firmware allows. Expected: the buzzer is a piezo element, electrically a capacitor of about 9 nF (a distributor's figure; Murata gives none), driven in antiphase from two pins at 4 kHz. Each edge swings it by twice the supply voltage, so the average current is about 4·C·V·f: 0.43 mA at 3.0 V, 0.32 mA at 2.2 V. With the chip's clock and PWM running, about 1 mA in all (estimate), or about 0.3 V across 300 Ω. The short current peaks at each edge come from the decoupling and the 47 µF buffer, not from the cell. The radio's bursts of a few mA last about a millisecond and are also carried by the buffer.5 boards, 2.2 V through 100 Ω and through 300 Ω, and with real half-used cells at +25 and −20 °C.No brown-out reset; supply stays at or above 1.8 V. The buzzer's current and capacitance are measured and compared with the estimate.
6. Antenna efficiency. The matching network is measured and fitted with a coaxial pigtail, starting from 1.5 nH series and 3.9 nH shunt; then total efficiency is measured, for example in a Wheeler cap or an antenna chamber.3–5 boards, the cell in place, free space.|S11| at most −6 dB over 2400–2483.5 MHz; total efficiency no worse than about −4.4 dB, within 1 dB of the −3.4 dB estimate. Only this test confirms or refutes that figure.
7. Range in the final mounting. Tags on boxes in a shelf, with the planned listener spacing. This checks the whole system, not the antenna efficiency figure.5–10 boards on plastic boxes, and on metal boxes if they are in use.Packet loss and position error within limits agreed for the application.
8. Shock logging. Controlled drops from known heights, compared with a reference accelerometer, to choose the sampling rate and threshold.3 boards, several heights and orientations.Every drop above the threshold is logged; no false events during a day of normal handling. The error of the highest sampled acceleration against the reference, and any saturation at ±16 g, are reported; no limit is set for them yet.

Process

One Python geometry module feeds both the electromagnetic model and the PCB, so the board follows the simulated geometry. Two details of the ordered board were added or changed after the full simulations and are estimated rather than simulated: the 0.6 mm FR4 tongue across the antenna slot and JLCPCB's adjusted RF line widths.

One Python model drives simulation, matching and the PCBPython modelgeometry, netlistCSTS11, efficiencyOptennipi network, partsKiCadschematic, boardOwn routerA* + negotiationJLCPCB filesGerber, BOM, CPLsame geometry becomes the antenna footprintmeasured RF track lengths
Toolchain · 5 tools, 2 feedback paths

The layout feeds back into matching: Optenni was re-run with track lengths measured from the routed board.

  1. Tool setup. Claude Code skills, short instruction files on how to drive each tool on this computer, already existed for CST and Optenni. For KiCad, the open-source kicad-happy review plugin was installed and a skill was written for KiCad's command-line tool, stackup extraction and an RF layout checklist.
  2. Geometry. The outline was parsed from the earlier product's Gerber files into a Python geometry module, the single source for all dimensions. The battery holder (Keystone 3002) was modelled from its datasheet.
  3. Antenna simulation (CST). An inverted-F antenna along the r = 13 mm arc, with board, ground, cell and holder in the model. Sweeps cover arm length and width, dielectric loss, the air slot, board thickness, the tag on boxes and manufacturing spread.
  4. Matching (Optenni). A pi network built from Murata's S-parameter libraries, with the microstrip lengths and via inductance measured from the PCB.
  5. Schematic (KiCad). Written from a Python netlist: Nordic's reference circuit for the nRF54L05, accelerometer on SPI, pressure sensor on I2C, buzzer, LED, buffer capacitors and test pads. Custom symbols were made where the library had none or the wrong pinout.
  6. Board (KiCad). Generated from the same Python: outline and slot, ground zones with the antenna clearance, keep-outs, the antenna as a net-tie footprint, a collision-checking placer, and an explicitly placed RF chain.
  7. Checks. ERC and DRC with schematic parity after every change, plus a check that KiCad's exported netlist equals the Python netlist.
  8. Routing. The RF chain and its special grounds, a ground via for every ground pad, the supply vias and the ground stitching vias from the CST model are placed by script and locked. Inner layer 1 is a solid ground plane and carries no tracks. Inner layer 2 is a battery-voltage (VBAT) plane that also carries signals. The rest is routed by a grid router written for this board, with a 0.05 mm grid, A* search and negotiated congestion.
  9. Fabrication outputs. JLCPCB BOM and CPL, Gerbers with silkscreen clipped at pads and kept clear of the board edge and slot, and assembly drawings with reference designators on the Fab layers.

Tools and how they were used

Everything was driven by Python scripts from Claude Code, headless, so every step can be re-run and the results trace back to a script and a result file. No GUI was used for design work.

ToolRoleHow it was driven
Claude CodeWrote and ran all scripts, read datasheets, made design decisions with the engineerProject skills for CST, Optenni and KiCad describe the local setup and known pitfalls
CST Studio Suite 2026Full-wave antenna simulation of board, ground, cell and holder (time-domain solver)Python API, VBA via the history list, started hidden so no dialog can block a run; resume-safe sweeps, ~25 min per configuration
Optenni Lab 6.3Matching network synthesisOptenni has no scripting interface. It does take a command-line switch that runs one matching job, described in a small XML file. Everything else is in its settings file, which is also XML: a template saved once from the GUI is patched by script for each run (band, Murata S-parameter libraries LQW15AN and GJM15, a fixed pi topology with microstrip segments and via inductance from the actual layout), and the result is read back from Optenni's XML output.
KiCad 10.0.8Schematic and PCBGenerated from Python: the schematic from a netlist module, the board through KiCad's Python API. KiCad's command-line tool produces ERC, DRC, Gerber, drill, BOM, CPL, assembly PDFs, 3D renders and STEP.
Own grid routerAutorouterPython on KiCad's Python API, with a 0.05 mm grid, A* search and negotiated congestion. Nets with little room are drawn first in a fixed order.
FreeCAD 1.03D models and the programming jigPython scripts: 3D models of the parts KiCad's library lacks (nRF54L05 QFN48, 32.768 kHz crystal, pressure and humidity sensors), and the two-part programming jig built from the board's 3D model
Nordic reference layoutnRF54L QFN48 circuit and RF filter valuesPinout, DC/DC, decoupling and the 6-part RF filter copied from it
DatasheetsnRF54L datasheet v1.0, Keystone 3002, LIS2DH12, BMP581, PKMCS0909EPinouts, land patterns and reference BOM; part numbers and stock from JLC's parts search

Would Altium have done better than KiCad?

For this project, no, because the whole board was built and checked by scripts. On some points Altium would have helped:

KiCad was still the right choice for the way this board was made:

KiCad had weak points too: true arcs in polygon operations made KiCad 10 hang, a design-rule file without units is skipped silently, there is no autorouter, and the impedance had to be calculated by hand. The two most useful additions to the KiCad flow for revision B are an impedance check that includes the solder mask and a lifecycle check of every part.

Could openEMS have replaced CST?

openEMS is a free, open-source FDTD solver with a Python interface. To find out, the antenna as it was frozen before the tongue was added was rebuilt in openEMS from the same geometry script that feeds CST: the same board, slot, ground vias, cell and holder, the same FR4 losses and a port in the same place. It was run at three cell sizes. CST is the reference here because it has given results that held up in measurements in earlier projects; that is a reason for trust, not a verification of this antenna. The comparison is preliminary: only this one model was compared, and the openEMS results still move as the cells shrink.

SolverCellsRun timeResonanceRadiation efficiency, 2.40–2.48 GHzMatched with CST's network (2.4/7.0 nH), worst in bandBest network from the parts library
CST, time domain–32 min2463 MHz67–69 %-3.3 dB2.4/7.5 nH, -3.2 dB
openEMS, 0.20 mm cells1.1 M21 min2383 MHz62–69 % (built-in transform 28–31 %)-6.9 dB1.5/3.9 nH, -6.1 dB
openEMS, 0.15 mm cells1.8 M37 min2400 MHz60–67 % (built-in transform 28–31 %)-6.0 dB1.5/1.5 nH, -4.6 dB
openEMS, 0.10 mm cells3.7 M99 min2427 MHz59–64 % (built-in transform 28–30 %)-4.6 dB1.5/3.9 nH, -3.6 dB
Unmatched antenna impedance (|S11|) from CST and from openEMS at three cell sizes; the grey band is 2400–2483.5 MHz
Unmatched antenna impedance (|S11|) from CST and from openEMS at three cell sizes; the grey band is 2400–2483.5 MHz

Without CST to compare with, the efficiency discrepancy would probably not have been noticed at first: 29 % is low, but not absurd for a small antenna on lossy FR4. The lossless check would have exposed it, and a series of cell sizes would have shown that the resonance was still moving. With openEMS alone those checks have to be routine, together with an efficiency measurement on the first boards, for example in a Wheeler cap, before the efficiency figures are trusted. That is a day or two more of simulation, and more risk, but no licence cost.

Could Optenni have been replaced?

For the main job in this project, yes. A Python script cascades Murata's measured S-parameter files for each inductor with the microstrip segments and the via inductance of the layout, and tries every pair of parts. On CST's impedance it picks 2.4/7.5 nH, -3.22 dB worst in band. Optenni's choice, 2.4/7.0 nH, gives -3.29 dB in the same script. The open scikit-rf library can do the same. What Optenni does that the open alternatives do not:

What CST offered here that openEMS does not

CST's figures for this antenna also need the same checks: a convergence test of its own and the efficiency measurement on the first boards (see Prototype test plan).

56 hours from idea to order

From the first file on 17 November at 10:36 to the order on 19 November at 18:35 took 56 hours. The session log shows how they were spent, minute by minute: Claude working (21.1 h, including scripts it waited for), a simulation or routing run going in the background while Claude waited (12.8 h), or waiting for the engineer, day or night (22.2 h).

Where the 56 hours went, minute by minute, one row per day
Where the 56 hours went, minute by minute, one row per day

The first night was used for CST sweeps; the second was not, and that is where most time could be saved. The CST runs add up to about 24 hours of solver time on one licence, so without waiting for decisions the work would still have taken roughly a day and a half. Many of the waits were decisions only the engineer could make, such as adding the pressure and humidity sensors, the tongue across the slot and bringing out the NFC pins.

The same 56 hours as shares
The same 56 hours as shares

Background runs count only when Claude was not working at the same time. Ten background runs that were stopped without a completion message are not counted, so that share is slightly low.