INTRODUCTION
This is a simple project that is designed to introduce key components to a new Arduino user. Real-world applications could include users who have difficulty using remote controls or are in food preparation areas etc.
HARDWARE REQUIRED
- REES52 Uno with USB Cable - 1
- Ultrasonic Sensor HC-SR04 - 1
- Breadboard 400 Points - 1
- RGB Led - 1
- IR Led - 1
- Single Strand Wire 2 Mtr - 1
- Resistor 220 Ohm - 3
- Male to Male Jumper Wire - 40
- male to Female Jumper Wire - 40
SOFTWARE REQUIRED
Arduino IDE 1.8.5 (Programmable Platform for Arduino Boards)
Click to download the software: https://www.arduino.cc/en/Main/Software
PIN DESCRIPTION
RGB LED:
Ultrasonic Sensor Module:
CIRCUIT CONNECTION
- Connect the IR LED to pin 3 via an appropriate resistor, and then connect the cathode to GND.
- Connect the (HC-SR04) Ultrasonic sensor to 5V and GND where the pins specify. Connect the trigger pin to pin 8 and the echo pin to 7. You can configure these pins in the sketch.
- Connect the RGB LED to GND and pins 11 (red), 10 (green), and 9 (blue). These pins are also configurable.
Note: Make sure your LED module has built-in resistors or you will damage the LED.
LIBRARY REQUIRED
Click on the link for Required Library:
https://github.com/z3t0/Arduino-IRremote
CODE
Click to see the code and copy the link:
https://drive.google.com/file/d/1zgu_BTbgCzaSqHQe0o0rDVSx10Y3XdPv/view?usp=sharing
WORKING AND OUTPUT
Welcome to the Arduino Based Gesture controlled TV Remote controller Project which mainly consists of HC-SR04 Ultrasonic Sensor, RGB LED and IR LED. The basic working principle depends upon the Ultrasonic Sensor Module which is being described here.
Power:
Swiping over the sensor within 3 inches will cause the LED to flash purple. This is the confirmation that a 'turn on / off' signal is ready to be sent. To prevent it from accidentally turning the TV off I have made the sketch wait for a second swipe within 5 seconds of the first to confirm. At this point, the signal is sent to the TV to turn on or off.
Channel:
Swiping within 10 inches of the sensor (but not within 3) will cause the channel to change. Swiping between 10 and 20 inches will cause the channel to change.
Volume:
Holding your hand within 10 inches of the sensor (but not within 3) will cause the volume to change. Holding between 10 and 20 inches will cause the volume to change. The volume will continue to change (up or down) until your hand is removed.
TROUBLESHOOTING
- The sensor provides pretty accurate measurements for hard obstacles at a distance of 3-4m. Unfortunately, the sensor returned erroneous results. These erroneous results can be treated in one way or another.
- Repair faulty HC-SR04 ultrasonic sensor (solve erratic no-readings problems):
Sometimes these cheap sensors erratically give errors, then work again, then stop again, and so on. In this tutorial, you’ll learn how to fix them by adding a 10K resistor to the trigger pin. - Making a better HC-SR04 Echo Locator:
When the HC-SR04 sensor doesn’t have obstacles in front or when the obstacles are soft, it returns 0 or erroneous results. - Improve Ultrasonic Range Sensor Accuracy:
The accuracy of an ultrasonic sensor depends on the environmental temperature. So if you need accuracy, you have to apply the principle that the sound moves through the air at different speeds depending on the temperature. - Ultrasonic sensor comparison: HC-SR04, PING, Maxbotix:
The HC-SR04 sensor is not the most accurate ultrasonic sensor on the market. Well, it’s very far from that. But in this article, the author compares it with two other ultrasonic sensors and gives a brief overview of the differences and how to write the program that reads values for the sensors. - Long-Range Ultrasonic Distance Sensor:
The HC-SR04 sensor provides a 2cm to 400cm non-contact measurement function. You have at least one option to increase the measurement range of the sensors. The method that increases the range is using a parabolic dash to reduce the ‘field of view’ (FOV) of the basic sensor. In this experiment, a measured distance of 9.24 meters.