Project tutorial
Raise the Volume with Remote Controller

Raise the Volume with Remote Controller

Use a remote controller to adjust the volume of the radio.

  • 439 views
  • 0 comments
  • 0 respects

Components and supplies

Apps and online services

About this project

About this project

The purpose of this project is to lower or decrease the volume of a radio through a remote control with Arduino and to visualize the value on an LCD display.

If is a button is pressed on an Arduino remote controller, the signal is received by an IR sensor and elaborated with Arduino Uno.

When vol+ or vol- is held down, the Arduino will turn a servo on clockwise or counter-clockwise, which will turn volume knob of my stereo. The LCD display will show the volume percent and when the volume is more then 80% will reveal, "too high!”

The circuit

Arduino checks the servo motor through the pin11, the IR receiver with 10 and the LCD display through the pins from 2 to 7. Every component needs 5V except the pin 15 of the display, which uses maximun 4.2V and needs a resistence. The pin v0 (n°3) of the display connects to a potentiometer that regulates the brightness of the screen. The following scheme is made in Tinkercad.

The LCD display pins are connected with Arduino how in the code.

Code

CodeArduino
The libraries are in arduino except the <Irremote.h>, you need to download it for use on arduino.
#include <IRremote.h>
#include <Servo.h>
#include <LiquidCrystal.h>


Servo myservo;
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
int receiver = 10;
IRrecv irrecv(receiver);
decode_results results;
int code=0;
int x;
int cont=0;
int volume=0;
int y=0;

void setup()
{
  Serial.begin(9600); 
  irrecv.enableIRIn();
  myservo.attach(11); 
  lcd.begin(16, 2); 
  lcd.clear();
}
void loop()
{
  if (irrecv.decode(&results))
  {
    code=results.value;
    Serial.println(code, HEX);
    irrecv.resume();
    switch(code)
    { 
      case(0xFFFFA857):
      cont=1;
      x=x+3;
      break;
      case(0xFFFFE01F):
      cont=0;
      x=x-3;
      break;
      case(0xFFFFFFFF):
      if(cont==1)x=x+4;
      if(cont==0)x=x-4;
      break; 
      default;
      cont=2;
      break;

    }
    x=constrain(x,3,180);
    Serial.println(x);
    myservo.write(x);
    volume=map(x,3,180,0,100);
  }
  lcd.setCursor(8, 0);
  lcd.print("VOLUME:");
  lcd.setCursor(4, 1);
  lcd.print("%");
  lcd.setCursor(0, 1);
  lcd.print(volume);
  if(volume>80)
  {
    lcd.setCursor(7, 1);
    lcd.print("too high!");
  }
  delay(50);
  lcd.clear();
}

Schematics

Circuit
Circuito 9a9tgmopl3

Comments

Similar projects you might like

Remote Controlled Pet Feeder

Project tutorial by Amal Mathew

  • 4,880 views
  • 1 comment
  • 29 respects

Ardunori RC - Arduino based Tenori-On Remote Controller

Video tutorial by artphrases

  • 2,505 views
  • 2 comments
  • 9 respects

Remote Controlled Bulb With Arduino

Project tutorial by muhammed shameel k.v

  • 2,534 views
  • 0 comments
  • 12 respects

Using Android Smart Phone to Remote Controller

Project tutorial by Team Makewith

  • 1,723 views
  • 1 comment
  • 6 respects

Nero: A Smart Glove That Controls Remote Devices

Project tutorial by Team Nero

  • 2,987 views
  • 4 comments
  • 77 respects

A Remote Controlled Stereo Volume Control

Project showcase by Keith Walker

  • 2,662 views
  • 0 comments
  • 9 respects
Add projectSign up / Login