BoxTag at a glance
Lohmega BoxTag: Bluetooth tag that finds boxes and logs shipments
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.
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 | |
| Radio | Nordic nRF54L05, Bluetooth Low Energy 2.4 GHz |
| Antenna | Built into the circuit board, along its edge |
| Efficiency | About −3.6 dB (44 %) in free space, worst channel2 |
| Mounting | Plastic and wood have little effect. Keep at least 20 mm from metal.2 |
| Ranging | The radio supports Channel Sounding (Bluetooth 6.0) |
| NFC | Option: 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 | |
| Temperature | Sensirion SHT40, ±0.2 °C typical |
| Humidity | Sensirion SHT40, ±1.8 %RH typical, 0–100 %RH non-condensing |
| Air pressure | Bosch BMP581, noise < 0.1 Pa (about 1 cm of height) |
| Acceleration | ST LIS2DH12, ±2/4/8/16 g, with wake on motion, shock threshold and free-fall detection |
| Logging | |
| Interval | Configurable, for example every 10 minutes |
| Events | Shock above threshold, drop and motion, all time-stamped4 |
| Memory | Internal, on the order of tens of thousands of records3 |
| Signalling | |
| Buzzer | Piezo, at least 65 dB at 10 cm |
| LED | Red |
| Power | |
| Battery | CR2032, 3 V, 220 mAh, replaced without tools |
| Battery life | About 4 years when locating. About 1.5 years in shipment mode, with the accelerometer at 100 Hz for shocks.1 |
| Mechanical and environment | |
| Size | 26 × 26 × about 7 mm, about 6 g with battery |
| Form | Assembled circuit board. Enclosure to the customer's needs. |
| Operating temperature | −20 to +60 °C, limited by the battery |
| Programming | Test 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).
- Schematic: complete, ERC clean, netlist verified against the Python source.
- Board: fully routed, 0 DRC errors and 0 unconnected items, JLCPCB rule check clean. All parts sit on the top side except the battery holder.
- Fabrication files for JLCPCB are generated by script: Gerber, drill, a BOM with an LCSC number on every line, CPL, assembly drawings and a STEP model. The script refuses to export unless DRC, connectivity, schematic parity and via tenting all pass.
- Ordered: 60 assembled boards from JLCPCB on 19 November 2026, on a panel of 4 × 3 boards designed for this project, plus a 3D-printed pogo-pin jig for programming.
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.
- Form factor: the board outline of an earlier Lohmega product (Cranberry, 2017), read directly from its Gerber files: a 26 × 26 mm square with two r = 4 mm corners and two r = 13 mm arcs.
- Electronics: Nordic nRF54L05 (QFN48), LIS2DH12 accelerometer, Bosch BMP581 barometric pressure sensor for shelf height, Sensirion SHT40 humidity and temperature sensor, passive piezo buzzer, LED, a CR2032 directly on the supply rail, and SWD test pads.
- Antenna: a printed antenna along the r = 13 mm edge, where the battery holder has no metal.
- Manufacturing: JLCPCB assembly, 4-layer impedance-controlled stackup, through-hole vias only (0.3 mm drill, 0.45 mm pad), 0.15 mm track and clearance (0.1 mm on seven nets next to the radio chip).
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 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:
| Mode | What the tag does | Hardware on this board |
|---|---|---|
| Rest | One BLE advertising event per day (extended advertising) | Radio, 32.768 kHz crystal for the low-power timer |
| Wake-up listening | Scans for about 25 ms on one channel every 60 s for a listener's command | Radio |
| Dense advertising | Connectable advertising every few seconds for a few minutes, after a wake-up or a move | Radio, 2 × 47 µF buffer |
| Beep | Drives the piezo in antiphase from two GPIOs and blinks the LED | BZ_A (P1.04), BZ_B (P1.12), LED (P1.07) |
| Move | The accelerometer's wake-up interrupt wakes the MCU, and the server resets that box's position history | LIS2DH12 on SPI, INT1 on P1.06 |
| Climate | Powers up the humidity sensor with the pressure sensor and logs temperature and relative humidity, for example during a shipment | SHT40 on the same I2C bus and switched supply |
| Height | Powers 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 level | BMP581 on its own I2C bus, powered from a GPIO |
| Channel Sounding | Reflector role, for distance from anchors or phones | Radio; 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) | Resonance | Radiation efficiency | Matched, worst in band |
|---|---|---|---|
| Without slot | 2440 MHz | 45–48 % | −4.8 dB |
| Without slot, FR4 made lossless (diagnosis only) | 2444 MHz | 86–89 % | −3.4 dB |
| With slot, 1.6 mm board | 2465 MHz | 65–67 % | −3.4 dB |
| With slot, 1.0 mm board | 2463 MHz | 67–69 % | −3.4 dB |
| With slot and 0.6 mm tongue (this design) | 2446 MHz | 66–68 % | −3.3 dB (network refitted; −3.2 dB without the tongue, same method) |
- FR4 loss dominates. Removing dielectric loss raised radiation efficiency from 46 % to 87 %. Making the coin cell and holder perfect conductors changed nothing.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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).
- 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).
- 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:
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.
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.
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.
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 band | vs 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 |
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 model | Routed board (estimate) | |
|---|---|---|
| Radiation efficiency, worst in band | 67 % | 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 dB | about −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.
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.
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.
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:
- 4 × 3 boards on a 145 × 110 mm panel; five panels give the 60 boards.
- Each board sits in its own 30 × 30 mm cell, with a 2 mm milled gap all round. Mouse-bite tabs (0.6 mm holes) hold it in place. The tabs are only on the straight parts of the edge, outside the antenna's keep-out area.
- V-cuts run only through the 5 mm bars between the cells, never along the board edge. The antenna is 0.35 mm from the edge, JLCPCB needs 0.4 mm from copper to a V-cut, and a V-cut cannot follow the r = 13 mm arcs.
- 5 mm rails with three fiducials on each side and four 2.05 mm tooling holes, placed as in JLCPCB's own panels.
- The panel passes DRC with 0 errors. The pick-and-place file is supplied both for all 12 positions and for one position.
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:
- Base (36 × 36 × 23 mm with legs). The board rests bottom-down in its outline with 0.15 mm clearance. A pocket takes the battery holder, and the cell can stay in. Four pogo pins meet the four programming pads (GND and the SWD signals SWDCLK, SWDIO and nRESET). A fifth meets the holder's solder tab, which carries the battery voltage (VBAT), and gives the programmer its reference voltage (VTref).
- Lid. Pockets clear every part on the top side by 0.5 mm, so the lid presses only on the solder mask. Two guide pins in the wall key it to the base.
- Pogo pins. P75 series, 1.02 mm barrel and 16.5 mm long. The tips stand 1.3 mm above the seating plane at the pads, about half the 2.65 mm travel.
- Connection. The pins are wired to a 10-pin Cortex Debug connector, for example the nRF54L15 DK's Debug out or a J-Link. Without a cell, 3.0 V on the VBAT pin powers the tag, so its current can be measured in the jig.
Drag to rotate, scroll or pinch to zoom. Grey is the base, orange the lid, gold the pogo pins.
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.
| Test | Boards and conditions | Pass 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.
The layout feeds back into matching: Optenni was re-run with track lengths measured from the routed board.
- 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.
- 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.
- 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.
- Matching (Optenni). A pi network built from Murata's S-parameter libraries, with the microstrip lengths and via inductance measured from the PCB.
- 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.
- 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.
- Checks. ERC and DRC with schematic parity after every change, plus a check that KiCad's exported netlist equals the Python netlist.
- 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.
- 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.
| Tool | Role | How it was driven |
|---|---|---|
| Claude Code | Wrote and ran all scripts, read datasheets, made design decisions with the engineer | Project skills for CST, Optenni and KiCad describe the local setup and known pitfalls |
| CST Studio Suite 2026 | Full-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.3 | Matching network synthesis | Optenni 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.8 | Schematic and PCB | Generated 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 router | Autorouter | Python 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.0 | 3D models and the programming jig | Python 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 layout | nRF54L QFN48 circuit and RF filter values | Pinout, DC/DC, decoupling and the 6-part RF filter copied from it |
| Datasheets | nRF54L datasheet v1.0, Keystone 3002, LIS2DH12, BMP581, PKMCS0909E | Pinouts, 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:
- Impedance in the stackup. Altium's layer stack manager has a field solver that includes the solder mask, so it would probably have given about the same narrower RF line that JLCPCB proposed, already at design time. Here the line width was calculated by hand without the mask.
- Panels. Altium can step a board into a panel. It does not decide where a V-cut may run, but it would have saved most of the panel scripting.
- Part supply. Altium shows stock and lifecycle status in the BOM. The buzzer's last-time-buy date would have shown up at once, instead of in a separate distributor check.
- Variants and assembly drawings. Fitted and not-fitted variants and finished assembly drawings are built in; here they took flags in the netlist and some scripting.
- Manual routing. Altium's interactive router is very good. An experienced designer would have routed a 26 mm board in a few hours, without the custom router and its tuning of the routing order.
KiCad was still the right choice for the way this board was made:
- Everything was driven from Python without a GUI. The schematic was generated from a netlist, the board was built and changed through KiCad's Python API, and KiCad's command-line tool ran ERC, DRC, Gerber export and renders. Altium's scripting runs inside the application; there is no command-line mode to build and check a board from outside it.
- Open text formats that could be read, checked and changed directly, for example the design rules and the comparison of the KiCad netlist with the Python netlist.
- No licence cost. Altium costs a few thousand dollars per seat and year.
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.
| Solver | Cells | Run time | Resonance | Radiation efficiency, 2.40–2.48 GHz | Matched with CST's network (2.4/7.0 nH), worst in band | Best network from the parts library |
|---|---|---|---|---|---|---|
| CST, time domain | – | 32 min | 2463 MHz | 67–69 % | -3.3 dB | 2.4/7.5 nH, -3.2 dB |
| openEMS, 0.20 mm cells | 1.1 M | 21 min | 2383 MHz | 62–69 % (built-in transform 28–31 %) | -6.9 dB | 1.5/3.9 nH, -6.1 dB |
| openEMS, 0.15 mm cells | 1.8 M | 37 min | 2400 MHz | 60–67 % (built-in transform 28–31 %) | -6.0 dB | 1.5/1.5 nH, -4.6 dB |
| openEMS, 0.10 mm cells | 3.7 M | 99 min | 2427 MHz | 59–64 % (built-in transform 28–30 %) | -4.6 dB | 1.5/3.9 nH, -3.6 dB |
- The impedance has the same shape, but the resonance is lower by 36–80 MHz. It moves up as the cells shrink and has not settled at 0.10 mm, which took 99 min against CST's 32 min. openEMS puts the copper on a rectangular grid in steps, while CST's mesh follows edges and arcs inside the cells. With a 1 mm arm along an arc next to a 1 mm slot, that difference shows.
- The matched figure is sensitive to that shift. The network chosen on CST's results gives -3.3 dB on CST's impedance but -4.6 to -6.9 dB on openEMS's. The network is fitted on the first boards anyway, so the shift would not have changed the board, only the predicted figure.
- In our runs, openEMS's built-in far-field transform gave a radiation efficiency about 2.2 times lower than the power flowing out through the same box around the antenna (28–30 % against 59–64 % at 0.10 mm, and 60–67 % at 0.15 mm; CST gives 67–69 %). For a half-wave dipole in free space the two agree. A check run with lossless copper and lossless FR4 gives 89–99 % by power flow but 41–45 % by the built-in transform. A lossless antenna cannot lose half its power, so the two results cannot both be right, and the power-flow figure is the plausible one. The cause is not yet established: it may lie in the transform, in how it was set up here, in the normalisation, or in the implementation.
- The directivity from the built-in transform, 3.0–3.4 dBi, is higher than from an independent transform of the same near-field data, 1.8 dBi, which is close to CST's 1.6 dBi.
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:
- Bandwidth potential. From the antenna impedance, Optenni estimates the obtainable impedance bandwidth using an ideal two-component matching network, at each possible centre frequency. It shows quickly whether an antenna variant is worth matching before any parts are chosen. It was not used for the final network here, and the open tools have no ready-made equivalent.
- Topology search with real parts. Optenni tries all two- and three-element topologies and picks parts from manufacturers' libraries, losses included. That is how the pi network was chosen early in the project; the Python search covers only the one topology it is given.
- Multi-band and multi-port matching and tolerance analysis, which this tag did not need.
What CST offered here that openEMS does not
- A mesh that follows the geometry inside each cell, so thin arcs and slots need far fewer cells and the answer depends less on the cell size.
- Several solvers and adaptive mesh refinement, to cross-check one result with another method.
- GPU acceleration, parameter sweeps and an optimiser built in. openEMS ran on the CPU at about 37 million cell updates per second.
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).
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.
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.