remote ashok
TRANSCRIPT
![Page 1: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/1.jpg)
Arduino based remote control
Its very simple method to control outputs by using remote control
Prepared by:
Ashokkumar SekarBE-EEE
![Page 2: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/2.jpg)
Requirements
• Arduino controller (atmeg328)• Tesop1738• Led • Resister• Remote
![Page 3: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/3.jpg)
Circuit diagram
10,11,12
13,14,15
16,17,18
19,20
![Page 4: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/4.jpg)
• There is Tsop output pin is connected to 9th pin of the micro controller, and led +ve pin is connected to 3rd pin of the micro controller
• Tsop 5v supply and gnd , and also led gnd are connected to micro controller supply pins
• After connection to upload program the program code given below slides
![Page 5: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/5.jpg)
Project explanation
• This projects tells about how to control load by using IR remote controller
• There is I preparing , when I press number “1” button led will glow after when press “1” led
will off
![Page 6: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/6.jpg)
Power Jack
Voltage regulator
Power Selection Jumper
USB
FTDI USB chip
Tx Rx leds Digital pins
Analog pinsPower pins
Microcontroller
ICSP Headers
Reset
Power LED
![Page 7: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/7.jpg)
Installing Software
![Page 8: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/8.jpg)
Understanding software
Verify
Upload NewOpen
Save Serial Monitor
![Page 9: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/9.jpg)
Detecting your Microcontroller
![Page 10: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/10.jpg)
SELECTING BOARD AND COM PORT
• TOOLS > BOARDS > ARDUINO DEUMILANOVE W/ATMEGA328
• TOOLS > SERIAL PORT > PORT NUMBER
![Page 11: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/11.jpg)
STRUCTURE OF PROGRAM
Any program should compulsorily have these two functions– void setup() {……. }– void loop() {…… }
NOTE: The common header files such as stdio.h etc., are included in default.
![Page 12: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/12.jpg)
Step1: Declaring Variables
Integer type variableint ledPin = 3;
This should be declared at the very beginning of the program (Even before void setup() and void loop()).
![Page 13: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/13.jpg)
Step2: Setting I/O pins
• You should set the i/o pins as either input or output using the following function
pinMode(pin number, INPUT/OUTPUT);
• You should declare it inside void setup()
![Page 14: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/14.jpg)
Step3: Writing an Output
To write a value to a pin:
digitalWrite(pin number, HIGH/LOW);
This and all the other functions should be written inside void loop()
![Page 15: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/15.jpg)
Step4: Delay function
• To specify a certain period of time for a set of functions to be executed:
delay(value);
Eg: delay(1000);
It is very important to include this function whenever you want to see an output, as the microcontroller works in micro-seconds speed
Time In milliseconds
![Page 16: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/16.jpg)
Getting input
Step 1: Declare a variable int buttonValue;
Step 2: inside void setup(), initialize pin as inputpinMode(A4,INPUT);
Step 3: inside void loop(), read and store the value.buttonValue = digitalRead(A4);
![Page 17: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/17.jpg)
if-else loop if(buttonValue == HIGH) { digitalWrite(ledPin,HIGH); } else { digitalWrite(ledPin,LOW); }
Since you are checking a condition, you have to use 2 equal-to.
![Page 18: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/18.jpg)
Program Code #include <SPIRremote.h>SPIRrecv remote(9);int ledpin = 3; int irValue;int i = 0;void setup(){ remote.enableIR(); pinMode(ledpin, OUTPUT);}void loop(){ int irValue = remote.getIRValue();
switch (irValue) { case 1: if(digitalRead(ledpin) == HIGH) { digitalWrite(ledpin,LOW); } else { digitalWrite(ledpin,HIGH); } break; } }
![Page 19: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/19.jpg)
![Page 20: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/20.jpg)
Project
![Page 21: Remote ashok](https://reader031.vdocuments.mx/reader031/viewer/2022021500/58ef5ad81a28ab807a8b4619/html5/thumbnails/21.jpg)
I attached my video here