Final Project

Project Description:

Project Overview:

The Smart Entry Organizer is an interactive device designed to help users keep track of essential everyday items such as keys, phone, and wallet. Placed near the home entrance, it combines physical organization with embedded intelligence to support daily routines.

Interaction:

When the user enters home, the device detects their arrival through wireless communication with their phone. Embedded sensors check each compartment and provide immediate feedback:
  • Green light indicates the item is in place.
  • Red light reminds the user of missing belongings.

Project Build Process:

Slot Sampling :

  • Design Process:

    To ensure I pick the correct sensor for my final project, I designed a sample slot with the specific dimensions I want so I could test the sensors on it.

    Here is the design process using Fusion 360:

    💡 Note: To upload the model in Sketchfab, I had to export the file as .stl, then import it in the Meshmixer software to remove the arrange part so it doesn't show in the Sketchfab model. Then I exported it again as .stl and uploaded it to Sketchfab. Also, remove it from the .stl you will upload, so don't forget to arrange the part if you want to cut it.

    Here is the Fusion 360 file to download.

    And here is the 3D design:

    which you can download from here.

  • Cutting Process:

    I cut the slot sample using the laser cutter, and here is the cutting process:

    And here is the part after cutting:

    slot after cutting

    And here is the final result:

    slot final result

Choose Sensors:

During week9 I tested multiple sensors and hose ultrasonic sensors. you could see the full tests and results from week9 page.


Choose Output devices:

During week10 I tested multiple output devices and chose neopixels for the light indication and and OLED screen to display the status. you could see the full tests and results from week10 page.


Integrated Circuit:

Connection:

To connect the OLED display with the ultrasonic sensor and neopixel LEDs, I used the following connections:

final integration connection diagram

Here is the connection diagram using Wokwi.

final integration connection diagram
Code:

#include  <Wire.h>
#include  <Adafruit_GFX.h>
#include  <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

#define TRIG_PIN 3
#define ECHO_PIN 4

long duration;
float cm, inches;
#include  <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include  <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif

// Which pin on the Arduino is connected to the NeoPixels?
#define PIN        2 // On Trinket or Gemma, suggest changing this to 1

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 3 // Popular NeoPixel ring size

// When setting up the NeoPixel library, we tell it how many pixels,
// and which pin to use to send signals. Note that for older NeoPixel
// strips you might need to change the third parameter -- see the
// strandtest example for more information on possible values.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels

void setup() {
  Serial.begin(115200); // ESP32 usually uses higher baud

  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif

    Wire.begin(6, 7);

  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
}

void loop() {
  // Clean trigger
  digitalWrite(TRIG_PIN, LOW);
  delayMicroseconds(5);

  // Send pulse
  digitalWrite(TRIG_PIN, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG_PIN, LOW);

  // Read echo
  duration = pulseIn(ECHO_PIN, HIGH);

  // Convert to distance
  cm = (duration / 2.0) / 29.1;
  inches = (duration / 2.0) / 74.0;
pixels.clear();
  display.clearDisplay();
  display.setTextColor(SSD1306_WHITE);

  display.setTextSize(3);
  display.setCursor(0, 0);

  // LED control
  if (cm < 18) {
     pixels.setPixelColor(0, pixels.Color(0,255, 0));
      display.println("Item detected");
  } else {
         pixels.setPixelColor(0, pixels.Color(255,0, 0));
          display.println("No item detected");
  }
    pixels.show(); 
  display.display();
  // Print
  Serial.print(inches);
  Serial.print(" in, ");
  Serial.print(cm);
  Serial.print(" cm");
  Serial.println();

  delay(50);
}
                        

And here is the testing process: