Inspiration

Waking up in the middle of the night realizing you forgot to submit your ESE post lab? Save time fumbling for the light switch and turn the lights on with just your voice! Have you been studying too long and becoming less efficient? Get up and dance! The system will detect your motion and automatically change to disco mode with colorful lights! Taking breaks are important to maintain your top study performance! DormLightz… a light system designed to fit college students’ needs.

What it does

Our project, DormLightz, makes use of bluetooth technology, an accelerometer, a microphone alongside MatLab to create voice and motion controlled LED lights. A user can turn the lights on and off by simply speaking or change the color of the lights by creating movements in a certain range. The goal of the product was to help save time in finding the lights switch and also force students to take a break from studying and get some exercise in by moving around. The first step we took in building this product was planning how we were going to make it. This included brainstorming the equipment we needed (both hardware and software). We decided on using an LED strip for the lights, an accelerometer, bluetooth and a microphone. Since the LED strip required 12V of power, we also needed a power supply in addition to the arduino. In terms of software, we decided on using Matlab for the voice recognition and through research, we realized that we needed to download additional add ons (SIMULINK and Arduino Hardware) to enable its connection with Arduino. After the planning and research phase, we moved on to creating a prototype of the product. The prototype consisted of one LED and one accelerometer on a breadboard. We made the LED light up when the movement fell between a certain range. Once we figured out how to make the movement detection aspect of the product work, we then incorporated bluetooth into the project in order to separate the two modules so that the user would not have to hold the LED strip while dancing. Then, we implemented the voice control function by incorporating matlab. The next step was to create the actual product. We built on the prototype but this time, using an LED strip instead of the one LED instead. Through research, we realized the LED strip required 3 mosfets. Even though we got our product working, we noticed that it was quite impractical for the accelerometer module to be connected to a laptop in order to power an arduino. Therefore, we decided to replace the laptop with a portable battery, making it more convenient for users to dance around with it.

After testing the product again, we noticed that while the user was moving around with the accelerometer module, the wires often fell out of place. To fix this, we created a box (using laser-cutted acrylic) to hold and wrap around the accelerometer module. The last change we made to product was combining the functions of voice control and movement detection. Initially, when using the voice control function, moving the accelerometer around would not change the colors of the lights and vice versa. So, we decided to combine the two functions into one. We did so by making the arduino do all the writing to the LED strip. Matlab would just send a signal to arduino whether the lights should be on or off. The arduino then contains the code of turning on the lights and also changing the colors. The arduino turns the lights/off based on the signal sent through Matlab.

Challenges we ran into

One of the biggest challenges we faced was our incorporating MATLAB and arduino systems. We had our code working for both features individually while trying to make them working autonomously, we faced a few difficulties. Firstly, our arduino was not being recognized by MATLAB, however we realized we had to download additional libraries on MATLAB to allow this to happen and so we installed “Simulink” and “Arduino Hardware Support”. Once we had done this and our Arduino was being recognized by MATLAB, we still needed to figure out how both of our codes would run simultaneously as our LED strip was not turning on with voice control. We realized this is because the arduino was not receiving signals from MATLAB and decided we would have to debug our code for the voice control feature. After looking at the MATLAB documentation we decided to prototype to understand MATLAB syntax for arduino and once we successfully got a regular LED to light up through MATLAB signals, we went back to our original code and were able to spot our syntax errors.

Accomplishments that we're proud of

It works!

What we learned

Through this project we learnt a lot of new skills in terms of circuits and coding. We can now successfully pair bluetooth modules, and re-pair them when needed, code in both MATLAB and Arduino and also use MOSFETS to light up an LED light strip. But the most important lesson we learnt was how to accommodating while working in a team, there were many times when one of us were busier than the other but we learnt to split up our work efficiently and still finish the project on time!

What's next for DormLightz

Due to the versatile nature of our project, there are a lot of ways it could be extended. We can add new features such as changing color at speeds depending on motion or even depending on the rhythm of music.

Share this project:

Updates