Their goal was simple: let customers test a product—say, a perfume or a high-end moisturizer—but limit the interaction to 30 seconds. If someone walked away with the tester, the display needed to scream.
They came to us because they needed more than a prototype. They needed a production-ready unit, and they needed it fast. We acted as their embedded systems partner, handling everything from the initial KiCad schematic to the final firmware flash.
The Core Problem: Two Conflicting Needs
Retail testers are expensive. Brands want customers to interact with them, but they also want to prevent theft. The client had tried off-the-shelf solutions. They were either too bulky, too ugly, or they relied on cloud connectivity that failed when the store Wi-Fi was spotty.
We proposed a local-first architecture. The display would be self-contained. No cloud dependency for the core timer or alarm. We’d use an nRF52840 SoC for the main logic. It’s a solid chip for this—low power, has built-in NFC for potential future tap-to-learn features, and enough GPIOs to handle the sensor suite.
Hardware Design: The Anti-Theft Loop
The physical design was a custom 3D-printed base with a recessed cradle for the tester. We embedded a tactile switch under the cradle. When the tester is lifted, the switch breaks a circuit.
But a simple switch is too easy to defeat. So we added a secondary verification: a short-range inductive sensor that detects the metal cap of the tester. The firmware requires both the switch to be open and the inductive sensor to read "no metal" before the alarm triggers. This prevents false alarms from a customer just jostling the display.
The PCB was a four-layer board designed in KiCad. We kept the BOM tight: the nRF52, a small piezo buzzer (90 dB at 10 cm), a single RGB LED for status, and a CR2032 coin cell for backup. The main power comes from a 5V USB-C input, which also charges the coin cell. If someone cuts the USB cable, the backup keeps the alarm active for about 4 hours.
Firmware: The Timer & The Alert
The firmware was written in Zephyr RTOS. We chose Zephyr because it gives us a clean state machine framework, which is perfect for a project with distinct modes: Idle, Active, Alert, and Lockout.
- Idle: Display glows a soft white. System is listening for the switch.
- Active: Tester is lifted. A 30-second countdown begins. The RGB LED pulses green. The firmware starts a software timer. If the tester is placed back within 30 seconds, the timer resets and the display returns to Idle.
- Alert: Timer expires. The buzzer emits a 2 kHz tone in 500ms pulses. The LED flashes red. This continues until the tester is replaced or a physical reset button is pressed (hidden under the display base, accessible only to staff).
- Lockout: If the alarm triggers five times in one hour, the system enters a hard lockout. The LED stays solid red and the buzzer is silent. This prevents a noisy alarm from annoying customers if a theft has already occurred. A staff member must hold the reset button for 10 seconds to clear it.
We also added a BLE beacon. The display broadcasts its status every 5 seconds. A companion app (which we did not build, but we provided the GATT service specification for) can read the beacon to log events like "tester lifted 12 times today" or "alarm triggered at 14:32."
The Anti-Theft Logic in Detail
The critical part was the anti-theft alert. We didn't want a simple "lift = alarm" because that would trigger when a customer picks up the tester to smell it. The timer is the differentiator.
The firmware logic is:
1. Tester lifted. Start 30-second timer.
2. If timer expires, trigger alarm.
3. If tester is replaced before timer expires, reset timer and return to Idle.
This means a genuine customer gets a full 30 seconds of interaction. A thief who walks away with the tester triggers the alarm after 30 seconds, giving staff a window to react.
We also added a "tamper detect" on the USB power line. If the voltage drops below 4.5V (indicating the cable was cut), the system immediately enters Alert mode, bypassing the 30-second timer. The backup coin cell powers the buzzer directly.
Why the Client Hired an Arduino Programmer (and Why We Aren't One)
The client initially searched for an "
arduino programmer for hire." They had a prototype built on an Arduino Uno with a breadboard. It worked in a lab. It failed in a retail store because the wiring was loose and the Arduino had no power management.
We don't use Arduino for production hardware. We use dedicated microcontrollers and custom PCBs. But we understand why they looked for that. It's a common starting point.
What we delivered was a custom PCB that is smaller, more reliable, and uses 1/10th the power of the Arduino prototype. We also provided the full KiCad files, the Zephyr source code, and a step-by-step assembly guide. They now have a product they can manufacture in batches of 100 without worrying about loose jumper wires.
The Software Side: Smart Vending Integration
The client also wanted the display to feed data into their existing inventory system. This is where the "
Smart Vending Software" concept came in.
We didn't build a full vending platform, but we designed the BLE beacon to be compatible with standard retail analytics platforms. The beacon broadcasts a unique ID for each display, along with the current status (Idle, Active, Alert). A store's existing Smart Vending Software can listen for these beacons and log events.
For example, if a display goes into Alert mode, the software can trigger a notification to a staff member's phone. If the same display goes into Alert mode multiple times a day, the software can flag it for investigation (maybe the switch is faulty, or maybe a specific product is being targeted).
We also left a UART header on the PCB for future expansion. If the client wants to add a small e-paper display showing product info, or a QR code scanner for loyalty points, they can do it without redesigning the whole board.
Results & Shipping
We shipped 25 fully assembled prototypes to the client's warehouse in New Jersey. Each unit was tested for 24 hours in our lab, cycling through Idle, Active, and Alert modes 200 times. We also tested the battery backup by pulling the USB cable during an active countdown. The buzzer fired immediately, as designed.
The client is now running a pilot in three stores. Early feedback is positive. The timer prevents customers from hogging the tester, and the alarm has already foiled one attempted theft (the buzzer scared the person away).
What We Learned
- Don't rely on cloud for safety. The alarm must work even if the store Wi-Fi is down. Local logic is non-negotiable.
- False alarms kill trust. The dual-sensor verification (switch + inductive) reduced false triggers to near zero.
- A 30-second timer is the sweet spot. Long enough for a genuine test, short enough to deter loitering.
If you're building a retail display that needs to be smart, secure, and production-ready, skip the Arduino breadboard. Get in touch. We’ll do the board layout, the Zephyr firmware, and the 3D design. And we’ll ship you working units, not a pile of parts.
Discussion (0 commentaire(s))