Smart Zipper is a small wearable IoT device that detects the state of a clothing zipper (secured vs unzipped). A tiny magnet on the zipper slider is sensed by a Hall sensor inside the wearable. An nRF52820 sends the zipper state to an Android phone via Bluetooth Low Energy and the app can notify you discreetly if the zipper remains unzipped for too long.
Why this projectThis is a simple private solution to avoid an awkward moment. The system is local. It does not use cloud services. It does not collect data.
How it works- A small neodymium magnet is attached to the zipper pull
- A TI DRV5032 Hall sensor is placed in the wearable near the zipper path
- When the zipper moves the magnet gets closer or farther from the sensor
- The sensor output changes and the firmware decides the zipper state
- The wearable sends one byte over BLE when the zipper state changes
- The Android app shows the status and triggers an alert only when needed
• Discreet zipper status notifications
• Very small payload over BLE
• Background monitoring on Android using a foreground service
• Alert logic that avoids repeated alerts
• Interrupt based wake up on zipper state changes
• BLE notifications only when the state changes
HardwareMain parts:
- nRF52820 microcontroller with BLE
- TI DRV5032 Hall effect sensor
- Neodymium magnet attached to zipper pull
- CR2450 coin cell battery
Sensor logic used:
- GPIO reads LOW when magnet is detected so zipper is closed
- GPIO reads HIGH when magnet is not detected so zipper is openThis matches a pull up input design where the sensor pulls the line LOW when active
Placement note:Magnet to sensor distance depends on fabric thickness and mounting. A short distance helps stability.
The enclosure was created with the EasyEDA 3D Shell tool. It uses a simple push cover style so the PCB can be installed fast and the device stays compact. The design includes two mounting points for M2 screws. The holes are sized to accept heat set inserts, so the cover can be opened and closed many times without wearing the plastic. This keeps assembly simple and makes the case more durable. Images to include and how to describe them Place
Platform
• Zephyr based firmware
Sampling
• Uses a GPIO interrupt on the Hall sensor pin
• The main loop sleeps and only wakes up when the pin changes
• Adds a short 10 ms debounce before reading the state
BLE GATT service
• Service UUID 0xFF03
• Characteristic UUID 0xFF04
• Properties READ plus NOTIFY
• Payload is one character stored in a small static buffer
0 open 1 closed
Connection handling
• Uses connection callbacks to store a valid connection reference
• Stops sending notifications when not connected
Advertising
• Device name SmartZipper
Android app overviewTechnology
• Kotlin
• Jetpack Compose
• Bluetooth Low Energy
App structure
BleService.kt
• Keeps the device connected in the background
• Starts a timer when the zipper is open
• Sends the alert notification and vibration
BleManager.kt
• Finds the wearable and connects
• Receives the zipper status from BLE
MainActivity.kt
• Shows the zipper status
• Asks for permissions and starts the service
- When status becomes open the timer starts
- Every 5 seconds the app checks if it is still open
- After 6 minutes the app triggers one alert
- When status becomes closed the alert is dismissed
- One alert per open event
Two channels:
- Service channel:
- Low priority
- Silent
- Shows service is active
- Required for foreground service rules
2. Alert channel:
- High priority
- Heads up notification
- Visible on lock screen
- Discreet vibration pattern
Minimum requirements:
• Android 8 API 26 or newer
• Phone with BLE support
Prototype status and planned battery improvementsThis prototype already includes basic power optimizations. The Hall sensor input uses an interrupt so the CPU can sleep until a real state change happens. BLE notifications are sent only when the zipper state changes. Advertising uses a longer interval to reduce average current. A true system off deep sleep mode is not implemented yet.
Planned power improvements for a next revision:
• Tune BLE connection parameters for lower average current when connected
• Add a true system off deep sleep mode when the phone is not connected
• Add optional reporting like battery level without increasing radio activity too much
Measured currentCurrent was measured with a FNIRSI FNAC 28 USB Tester while the device was running from 5 V USB. The peak value observed in this setup was about 0.43 mA. The wearable version is powered by a CR2450 coin cell.
• No cloud connectivity
• No data collection
• No internet permission required
• Data stays between the wearable and the phone
• Notifications are private to the phone owner
How to use- Install the module behind the zipper line on the inner fabric layer
- Attach the magnet to the zipper pull
- Install the Android app
- Grant permissions
- Enable Bluetooth
- Connect to the device in the app
- Confirm live status updates
Thanks to OSHWLAB Stars to make this project possible!









Comments