Inspiration

Our first few efforts to create a gamified mundane task revolved around making fitness more fun. We bounced around from idea similar to Wii Fit, FitBit, and Apple Watch Rings. As these technologies already exist and our desire to innovate a new product was high, we ventured in a different direction. After much debate, we really dove deep into the early days of our elementary school playground, and our idea was born. We introduce, The Magic Carpet.

What it does

The Magic Carpet is a fun way to control the lighting in any room while saving the environment. First, it keeps track of the number of people entering and exiting a room. Once a person enters the room they have the choice of playing The Magic Carpet game where they have the creative freedom to choose the blend of colors which best aligns with their mood. There are six different pads: three color choices, two intensity control pads, and an ON/OFF pad. As the user taps the different color pads, the room lighting changes in real-time. The person count is used to help conserve energy by automatically turning all the lights off when everyone leaves the room. This is the best way to save the environment while reminding us of the simplicity of our childhood game, hopscotch reinvented as The Magic Carpet.

How we built it

On the software aspect, the project is divided into three sub-components: An Arduino Nano Microcontroller is responsible for processing all of the user's inputs. This includes pressure sensing on the mat that prompts the user to move physically to alter the colors of the lighting in their room. The Nano also supports the Breakbeam IR sensor that tracks whether a room is occupied and if someone is entering or exiting the room. This allows the device to enter energy saving mode when the user is away. The Nano compiles all of this information and arbitrates what color LED to display (RGB), the relative brightness, and so on.

An ESP-32 directly communicates with the Nano via UART. It is essentially used as a Bluetooth Module buffer that is responsible for sending data wirelessly to the LED light controller.

The LED light controller is also an ESP-32 module. It directly interfaces with the LED ring's hardware by decoding the message sent from the original Nano through the other ESP32's Bluetooth functionality and translating that to specific R, G, and B values to be displayed on each pixel of the LED ring.

Challenges we ran into

We ran into many challenges throughout the development of this project.

One major challenge is the limitation on hardware parts and components. Because we didn't have access to a standalone HC-05 Bluetooth sensor, we opted to use an ESP32 microcontroller instead which has built in BLE connectivity. However, the GPIO pins on our device happened to be unreliable so we chose to complement the ESP32's bluetooth module with an Arduino Nano.

Another challenge is navigating the Arduino IDE and language. Although a lot of useful features are provided such as interrupts, built-in serial, and so on, there are lots of limitations on the software, such as the lack of a string class. We ended up writing our own methods to process character arrays when it comes to storing and transmitting information.

Accomplishments that we're proud of

We are proud of putting together a substantial project that to a great extent incorporates everyone's fields of interest on our team (mechanical engineering, electrical engineering, and computer science) in only one and a half days.

What we learned

We learned the importance of deciding on a good architecture prior to developing our solution, because it provides a general guideline that everyone agrees on and works toward. It is important to stay organized so that issues like bugs and edge cases can be sorted out efficiently and systematically. We also learned the importance of communication to understand the trade-offs of engineering decisions. Team members from different backgrounds have different perspectives so it is important to make life easier for both oneself and their whole team when choosing between designs.

What's next for The Magic Carpet

There are some bugs that we hope to fix. A couple examples of them involve adding finer control / UI of LED options, and improve sense performance of pressure sensors to detect a jump / tap. There is a lot more testing for edge cases to do, to make the code reliable. As this testing happens, this would influence our decision for hardware choices - new sensors, optimized performers, etc.

Built With

Share this project:

Updates