AUTOMATING HOME LIGHTING

CHALLENGE

Create a contactless solution to flip on or off a bedroom light

OUTCOME

A clap-activated light switch for a bedroom environment

FOCUS AREA

Product design, home automation, mechatronics

MY ROLE

Ideation, Prototyping, Testing

COURSE

Oregon State University - Introduction to Measurement Systems

TIME FRAME

1 month (November 2020 - December 2020)

Revised case study coming soon

Mechatronic systems have been used to automate home systems in many capacities. My college bedroom was set up in a way that my bed was on one end and my light switch was on the other end. This meant I would need to walk across my room in the dark when turning off my lights before bed.

My goal for the project was to create a contactless lighting system that could be turned on or off from any location in a room.

Prototype of clap-activated switch setup in my bedroom.

After getting introduced to the world of mechatronics for the first time, we took a stab at creating some type of system for our home.

CHALLENGE

It would need to sense at least 3 inputs and output at least 2 behaviors to the motor. The project would need to use at least 1 sensor and the Arduino UNO.

SOLUTION

The clap activated light switch allowed me to control my bedroom lighting from anywhere in my room. With two claps, I could turn on my lights, and with one clap, I could turn them off.

There are often many way to solve a single problem. Considering as many these possibilities in the ideation phase allows you to make the best decisions moving forward.

IDEATION

There are many ways to attain the desired output for switching on or off my lights by a selection of different sensors. The options I considered were the ultrasonic sensor (detect when I was approaching or leaving my room), infrared motion sensor (detect when I was actively moving around), microphone sensor (detect a specific sound as a trigger).

For my design, I decided a microphone sensor would allow me to be in any location of the room to achieve my goal of turning on/off my lights. I determined that a servo motor would achieve the rotation I needed to physically flip my switch.

The system mechanics was as follows:
• Sound sensor detects 1 clap, 2 claps, or no claps
• Servo motor rotates counterclockwise when it detects 1 claps (turns switch on)
• Servo motor rotates clockwise when it detects 2 claps (turns switch off)

Setting up a physical system to test code with for mechatronics systems allows you to fiddle with the code and physical setup simultaneously rather than having one system work perfect only to realize it doesn't cooperate with the other.

PROTOTYPING

For the clap activated light switch, I built out the circuit with a microphone sensor and LED as an indicator of sound input. I smoothed the input data and determined the volume threshold. I replaced the LED with a servo motor that outputted the appropriate action. The servo was fitted onto an existing light switch with cardboard and craft stick extensions.

I modeled a switch cover that was adapted to fit the servo motor if this system was to be set up more cleanly.

Sensors are not perfect pieces of equipment.

KEY LEARNING

Sensors are noisy. In order to use the data that is read, it needs to be manipulated in a way that is useful by either creating running averages or thresholds, for example. Sensor data is meaningless until the designer or coder puts meaning to it by understanding what it can be used for.