In this project, you will learn to design a motion-controlled colour changer using Arduino.
Hardware Components - Motion Controlled Colour Changer
1. Arduino Uno:
#ArduinoUno board is used for interfacing the input-output elements to construct a project. It is an open-source microcontroller board that can be programmed according to user requirements.
2. Passive Infrared Sensor(PIR):
PIR sensor detects and measures the infrared radiation emitting from the objects present in its range of application. #PIRsensor is commonly used in motion detection applications.
3. RGB LED:
In RGB LEDs, the three primary colours Red, Green, and Blue are added together in different combinations to get different arrays of colours.
The buzzer produces an alarm tone. The piezoelectric material in the buzzer when subjected to alternating current expands and contracts rhythmically following the current thus, emitting an alarm tone.
The resistor is a passive electronic component that offers resistance to the current flowing through it. In this project, we use a 220Ω resistor to reduce the current flowing through the LED.
A breadboard is a simple rectangular board that has many holes shorted in a specific manner. It is the construction base for implementing electronic projects. The holes are used to connect circuit components like ICs, capacitors, potentiometers.
7. Jumper wires:
Jumper wires have connectors and pins that are used to connect different components on a breadboard.
Connect the power pin of the PIR sensor to the 5V of the Arduino.
Connect the ground pin of the PIR sensor to the ground of the Arduino.
Connect the signal pin of the PIR sensor to the D7 of the Arduino.
Connect the negative terminal of the buzzer to the ground of the Arduino.
Connect the positive terminal of the buzzer to the D3 of the Arduino.
Connect the cathode pins of all the RGB LEDs to the ground of the Arduino.
Connect the Green terminal of each RGB LED to 220Ω resistors. Connect the other arm of these resistors to D11 of the Arduino.
Connect the Blue terminal of each RGB LED to 220Ω resistors. Connect the other arm of these resistors to D10 of the Arduino.
Connect the Red terminal of each RGB LED to 220Ω resistors. Connect the other arm of these resistors to D9 of the Arduino.
Declare and initialize the pins used on the Arduino board.
In void setup(), set the pin modes for the PIR sensor pin, buzzer pin, and LED pins connected to the Arduino board.
Using the digitalWrite() function set the above mentioned to LOW state.
In RGB_color() function, assign a variable to every colour pin of the RGB LEDs.
In void loop(), using the if-else condition, set the RGB LED to glow in blue colour when the PIR sensor reads the high value. Set the LED to glow in magenta colour, otherwise.
When the PIR sensor senses any movement in its range, then the high sensor value sets the buzzer to ON state and, the LED will glow in blue colour. When there is no object in the range of the PIR sensor, the buzzer stops buzzing and, the LED will glow in magenta colour.
The following images show the working of a motion-controlled colour changer.
Check the Project working video here - Motion Controlled Colour Changer
Video by- Sowmya G
Name- Nagashree R Nadig
Portfolio Link- https://www.learnelectronicsindia.com/team/nagashree-r-nadig
Follow us -
Please do follow us i.e #learnelectronicsindia to get daily updates about new blogs, videos, courses, quizzes, and contests.
Want us to help you with the projects, write your inquiry here - Order Projects
Check out our Free Arduino Projects Playlist - Arduino Projects
Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects
Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects
Check out our Free IoT Projects Playlist - IoT Projects
Check out our Free Home Automation Projects Playlist - Home Automation Projects
Check out our Free NodeMCu Projects Playlist - NodeMCu Projects