CompletednRF52820 Smart Zipper
License
:CERN Open Hardware License
Description
Overview
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 project
This 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

Smart Zipper wearable mounted on clothing near the zipper, while the Android app displays the live status (secured / unzipped).
Key features
• 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
Hardware
Main 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 open
This 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.

PCB assembled
Mechanical case design
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

EasyEDA 3D Shell view of the push cover case designed around the PCB

Preliminary printed case prototype showing the real size and fit around the PCB

Final 3D printed prototype: perfectly aligned with the EasyEDA 3D model.
Firmware summary
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 overview
Technology
• 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

App interface
Alert logic
- 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

Alert notification
Notification design
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
Compatibility notes
Minimum requirements:
• Android 8 API 26 or newer
• Phone with BLE support
Prototype status and planned battery improvements
This 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 current
Current 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.

FNIRSI FNAC 28 software showing the live current measurement during operation
Privacy
• 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
Video demo
Design Drawing
The preview image was not generated, please save it again in the editor.BOM
Bom empty
CloneProject Members
Intellectual Property Statement & Reproduction Instructions
This is an open-source hardware project. All intellectual property rights belong to the creator. The project is shared on the platform for learning, communication, and research only; any commercial use is prohibited. If your intellectual property rights are infringed on EasyEDA, please notify us by submitting relevant materials in accordance with the Rules for Complaints and Appeals of IPR Infringement.
Users must independently verify the circuit design and suitability when replicating this project. All risks and consequences are borne by the user, and the platform assumes no liability.
Empty


Comment