Inspiration

SmartSpace was inspired by the idea that the environment around us can affect how comfortable and productive we are while studying or working. I wanted to build something that could monitor a workspace in real time while also giving useful feedback to the person using it. Since ShellHacks was my first hackathon, I also wanted to challenge myself to build a complete project that combined hardware, software, databases, and AI while making sure I actually understood what I was creating.

What it does

SmartSpace is a smart desk monitoring system that tracks whether a desk is occupied and measures the lighting conditions around the workspace.

An ultrasonic sensor measures distance to determine whether someone is sitting at the desk, while a photoresistor measures the surrounding light level. The system uses this information to determine whether the workspace is occupied and whether the lighting is bright or dim.

The data is displayed locally on an OLED screen and is also sent to a live web dashboard. The dashboard shows the current desk status, lighting conditions, live sensor readings, workspace suggestions, and recent activity.

SmartSpace also uses Gemini to provide smarter recommendations based on the user's workspace conditions and activity. Instead of only displaying raw sensor values, the system can turn that data into feedback that can help the user improve their workspace.

Sensor readings are stored using Tiger Data, allowing SmartSpace to keep a history of workspace conditions and analyze changes over time.

How I built it

I built the hardware portion of SmartSpace using an Arduino connected to an HC-SR04 ultrasonic sensor, a photoresistor, an SSD1306 OLED display, and a separate breadboard power supply module.

The Arduino reads data from the sensors and sends the information to my computer through serial communication. I used Python and PySerial to read and process the incoming data.

I then used Flask to create the web application and API that powers the SmartSpace dashboard. HTML, CSS, and JavaScript are used to display the information, create the live chart, and update the dashboard automatically without requiring a manual refresh.

I connected SmartSpace to Tiger Data to store time-series sensor readings, including lighting, occupancy, distance, and the time each reading was recorded. This allowed the dashboard to show recent activity instead of only the current sensor reading.

I also integrated Gemini into SmartSpace so the project could use AI alongside the sensor data to provide more useful and personalized workspace recommendations.

Challenges I ran into

One of the biggest challenges was getting every part of SmartSpace to communicate and operate reliably once everything was connected.

A major hardware problem I ran into involved power consumption. When I connected all of the components to the Arduino at the same time, the system stopped working properly. The Arduino was trying to power the sensors and display along with the rest of the circuit, and the setup was no longer stable.

To solve this, I added a separate breadboard power supply module to provide power to the components instead of relying entirely on the Arduino. This helped stabilize the system and allowed all of the hardware to work together.

I also had to troubleshoot problems involving the Arduino code, sensor readings, OLED display, serial communication, Python environment, Flask application, Tiger Data database connection, and Gemini integration.

Another challenge was working with real sensor data. The ultrasonic sensor and photoresistor readings could fluctuate depending on the environment, so I had to test different values and create thresholds that made sense for determining whether the desk was occupied and whether the room was bright or dim.

Connecting the hardware, software, database, and AI into one complete system was challenging, but it was also one of the most valuable parts of the project.

Accomplishments that I'm proud of

I am proud that I was able to build SmartSpace independently during my first hackathon.

Before ShellHacks, I had experience working with Arduino and basic electronics, but SmartSpace pushed me to combine several different technologies into one complete system.

I was especially proud when I could see real sensor readings travel from the Arduino through Python, appear live on the Flask dashboard, get stored in Tiger Data, and then be used alongside Gemini to provide useful feedback.

I am also proud that I was able to troubleshoot the power issue instead of removing components from the project. Adding the power supply module allowed me to keep the full hardware setup working and taught me more about the importance of power management in electronics.

Seeing the hardware, web application, database, and AI all work together made SmartSpace feel like much more than just an Arduino circuit.

What I learned

SmartSpace taught me a lot about hardware and software integration.

I gained more experience working with Arduino sensors, serial communication, Python, Flask, HTML, CSS, JavaScript, APIs, databases, time-series data, Tiger Data, and Gemini.

I also learned an important hardware lesson about power. A circuit can work when components are tested individually but fail once everything is connected if the power source cannot support the complete system. Solving that problem with an external power supply module helped me better understand power distribution and why it matters when building larger electronic systems.

I also learned that debugging a complete system is very different from debugging one piece of code. If something appeared wrong on the dashboard, the problem could come from the Arduino, sensors, power system, serial connection, Python application, database, AI integration, or browser.

Most importantly, I learned how different technologies can work together to take information from the physical world, process and store it, and turn it into something useful for the user.

What's next for SmartSpace

The next step for SmartSpace is to make the system more intelligent and personalized.

I would like to improve the occupancy and lighting detection, add more environmental sensors, and use the historical data stored in Tiger Data to create more detailed workspace analytics.

I also want to expand the Gemini integration so SmartSpace can use a user's workspace history, current sensor readings, and selected activity to generate increasingly personalized recommendations.

Future versions could include temperature monitoring, improved session tracking, longer-term productivity insights, better power management, additional sensors, and a more polished dashboard.

My long-term goal is to continue developing SmartSpace into a system that does more than monitor a desk, it understands the workspace and helps the user improve it.

Built With

Share this project:

Updates

Submission history