No Distra: Smart Study Enhancement System

by ZeinedinAbdela in Circuits > Raspberry Pi

3 Views, 0 Favorites, 0 Comments

No Distra: Smart Study Enhancement System

IMG-20250616-WA0069.jpg

What is NoDISTRA?

NoDISTRA is a smart, sensor-powered productivity assistant. It's a physical lockbox that helps students or focus- seekers stay distraction-free by:

  1. Locking away your phone during focus sessions.
  2. Showing live sensor data (light, weight, temperature, distance, etc.) on OLED screens.
  3. Tracking real-time data via a FastAPI dashboard with WebSockets.
  4. Unlocking only after meeting study conditions

Features

  1. Automatic locking/unlocking via servo and time/session management.
  2. Live OLED displays for user feedback.
  3. Live Web Dashboard built with FastAPI + SocketIO + HTML/CSS/JS.
  4. Sensors:
  5. Ultrasonic sensor (distance detection).
  6. Load cell (phone weight).
  7. LDR (light detection).
  8. Reed switch (door status).
  9. Temperature sensor.
  10. Rotary encoder (manual control).

Supplies

61KBroLidQL._UF894,1000_QL80_.jpg
rpi5_3_1.png
download.jpg
download.jpg
download.jpg
download.jpg
download.jpg
LDRPhotoresistor-1200x1200.jpg
images.jpg
download.jpg
download.jpg
61nsH7H6XUL.jpg
download.jpg
download.jpg
images.jpg
download.jpg
download.jpg
images.jpg
51It+uyNL-L._SX342_SY445_QL70_ML2_.jpg

Item Quantity

Raspberry Pi 5 1

OLED Display (SSD1309, SPI) 1

Servo Motor (SG90 or MG90S) 1

Reed Switches 2

Ultrasonic Sensor (HC-SR04) 1

LDR + MCP3008 ADC 1

Load Cell + HX711 Module 1

Rotary Encoder 1

Jumper Wires Lots

Breadboard / PCB 1

5V Power Supply 1

Breakoutboard 1

Dallas Temprature Sensor 1

Wireless charger 5W 1

Double Sided Tape 1

Assembly Base

IMG-20250619-WA0024.jpg
IMG-20250619-WA0023.jpg
IMG-20250618-WA0034.jpg
IMG-20250618-WA0041.jpg
IMG-20250618-WA0060.jpg
IMG-20250619-WA0011.jpg
IMG-20250619-WA0012.jpg
IMG-20250618-WA0066.jpg

First print the case (you can find the case on the github repo => 3D file)

Use hot glue or M2 screws for the reed sensors and secure it on the base.

Ensure reed switches trigger at correct position.

Assembly Drawer

Afbeelding van WhatsApp op 2025-06-15 om 20.34.29_60f73c76.jpg
IMG-20250618-WA0027.jpg
IMG-20250618-WA0028.jpg
IMG-20250618-WA0026.jpg
IMG-20250618-WA0029.jpg
IMG-20250618-WA0024.jpg
IMG-20250618-WA0038.jpg
IMG-20250618-WA0037.jpg
IMG-20250619-WA0010.jpg
IMG-20250619-WA0014.jpg
IMG-20250619-WA0015.jpg
IMG-20250619-WA0029.jpg
IMG-20250619-WA0052.jpg
IMG-20250619-WA0058.jpg
IMG-20250619-WA0057.jpg

Mount servo securely on the drawer.

Drill a hole on the drawer to secure the magnet for the reed sensors.

On the bottom side of the phone holder secure the coil of the wireless charger on its place and the control board to the side with a double sided tape. Add the load cell and secure the phone holder with screws.

Assembly Middle Part

IMG-20250618-WA0018.jpg
IMG-20250619-WA0035.jpg

Slide the middle part on top of the bottom part.

Secure the Raspberry pi on its place.

Secure ultrasonic, ldr, rotary encoder and the tempreature sensor with double sided tape on the base.

Secure the base with the middle part with a screw.


Wiring Diagram

BreadBoardV4_bb.jpg

Assembly Top Part

Afbeelding van WhatsApp op 2025-06-17 om 13.16.03_9dc367b0.jpg
IMG-20250618-WA0023.jpg
IMG-20250619-WA0055.jpg
IMG-20250619-WA0060.jpg
IMG-20250619-WA0059.jpg
IMG-20250619-WA0061.jpg
IMG-20250619-WA0062.jpg
IMG-20250619-WA0065.jpg
IMG-20250616-WA0068.jpg
IMG-20250618-WA0016.jpg
IMG-20250618-WA0014.jpg

Secure the Oled screen with double sided tape and connect it to the pi.

Secure the top part with the middle part with screws.


Software Setup

1. Clone the Repo

bash
git clone https://github.com/howest-mct/2024-2025-projectone-mct-zeinedin.git
cd 2024-2025-projectone-mct-zeinedin

2. Create a Virtual Environment

bash
python -m venv venv
source venv/bin/activate

3. Install Dependencies

bash
pip install -r requirements.txt

4. Run the Backend

bash
python backend/app.py


How It Works

Locking Mechanism


  1. Servo closes the lid.
  2. Reed switches detect if the lid is fully closed/open.
  3. Safety timeout ensures the servo doesn’t overdrive.

Sensors


  1. LDR measures ambient light.
  2. Ultrasonic sensor detects objects near the box.
  3. HX711 + Load Cell measures weight to check if the phone is inside.
  4. Temperature sensor logs the surrounding environment.

OLED Display


  1. Rotary encoder navigates through menus.
  2. Emergency unlock feature with timeout.

Menu Navigation


Action Description

Rotate CW Move down

Rotate CCW Move up

Click Select item

Show IP Displays device IP

Emergency Unlock Opens box temporarily