Introduction: Home Automation With a Smartphone (TV, Arduino, Light, Security, Projector, DVD Player...)

These days the home automation devices and the home controlling systems are very popular. Even in the community of DIY-ers. So decided to make my own home control device using Arduino. The device can be controlled with a cellphone, and here I used a very odd/wierd mode to transmit the commands from the phone. I used an INFRARED blaster to control my household items, like the TV, music amplifier, light switch, motion sensor alarm system. But this technology is also able to control almost any infrared gadgets gratitude for the ZaZa Remote app. Lot of smarphones have infrared blaster, but my one hasn't, so I needed to make one that can be attached to the audio jack. This was very simple and doesn't costs more than 0.5 bucks.

And yes, you could ask now that why am I using IR (infrared) and no Bluetooth or Wifi?

The answer is easy: -Usually the remote controlled household items can be controlled by an infrared transmitters, like music amplifiers, TVs, air conditioneers, digital photo frames, R/C toys, DVD players, switches, camera triggers and more. Now imagine that you can connect to these with your phone and control with only one device.

-It's easier to write the code on the Arduino, and it's cheaper than Bluetooth. You'll need some experience in Arduino, but I think that even a beginner can make.

Step 1: What Is IR Light?

Infrared (IR) is invisible radiant energy, electromagnetic radiation with longerwavelengths than those of visible light, extending from the nominal red edge of thevisible spectrum at 700 nanometers (frequency 430 THz) to 1 mm (300 GHz)(although people can see infrared up to at least 1050 nm in experiments. Most of the thermal radiation emitted by objects near room temperature is infrared. Thank you Wikipedia...

Step 2: Build the Blaster

This is the easiest part of the project. You'll need 2 pieces of IR LEDs, a 3.5mm audio jack and some electrical tape. You can find these parts in the local Hobby-Shop. See the circuit diagram on the last picture and solder the LED pins to the left and right chanell. The GND isn't needed. If we solder the LEDs good we will have a very cool 38kHz infrared transmitter.

Step 3: App Tutorial

First Download the ZaZa Remote app on your phone or tablet (of course the project works even with other apps). Connect your new IR blaster, and you can see that here are a lot of possibilities, but we now will use the TV option. In the next step you will need to find the coding of your TV, this may take some minutes. After you found it you can use the phone to control the TV. I can't take a good photo about it but works. Now I'll show you how to send these commands to the Arduino.

Step 4: Decoding the Signals

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}

void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}

Step 5: Decoding

Load up this code on your Arduino board and open the Serial Monitor and write every important codes. I wrote numbers, volume and chanell buttons and the power button.

Step 6: Parts and Materials for the Arduino Circuit

First of all your CREATIVITY!

  • an Arduino Board
  • a smartphone
  • a plastic box
  • a PIR sensor
  • 2x 220 ohms resistors
  • a buzzer
  • a breadboard
  • a 38kHz IR reciever
  • an LED
  • a 5v relay
  • and some wires

I haven't time now to build a better circuit, that can control more things, because the Phone Contest closes soon, But if you use your creativity you can build anything (RC toys, drones, robots...)

Step 7: Test the PIR

I tested my PIR sensor because if has problems can damage the 3rd pin on my Arduino, but worked perfect. I just used a 9 volt battery and an LED.

Step 8: Build the Circuit

I use an extension board because it's easier to build the curcuit with it.

  1. Connect the relay to the pin 6 and to the VCC and to the GND
  2. Connect the IR sensor to the GND, VCC and to the pin 11.
  3. Connect the PIR sensor also to the GND, VCC and to the pin 3.
  4. The LED is connected to pin 13.
  5. And lastly connect the buzzer through a 220 ohm resistor to the pin 9.

Yes, I said the Arduino part is easy. This is to inspire to make you to make something mindblowing device.

Step 9: Write the Code!

Download the Arduino file, load up and now you can try it out. If you have any question about the code feel free to ask. Replace the IR signal decoding with yours, example 0x0E0E005A.

Step 10: Testing

I programmed the PIR on/off switch to the 1 and 2 pins. Well actually it's not a switch, only sets the pin 3 as an INPUT, and reads the signals (HIGH or LOW), and turns on the buzzer for 15 seconds. This is a very basic motion sensor alarm. The relay can be switched ON and OFF with the up and down arrows.

Step 11: Drilling Holes for the Cables

Use a rotary tool or a drill, and make 2 holes for the USB cable and for light's cable.

Step 12: Prepare the Cables

Clean the plastic cover then remove the cover from one of the wires. Then fix it with electrical tape. Just like on the pictures. For the power supply I'll use a a 5v 1A phone charger.

Step 13: Connecting the Cables

Use a screwdriver and connect your light's cable to the relay module. Of course can connect other devices. :)

Step 14: Search a Good Place for It!

If you found the best place for the box connect power up the device and test it agian.

Step 15: The Last Test

Test your settings, buttons... everything... Thank you very much for watching, I hope it was helpful and useful for you. If you liked support me with a kindly vote on the phone contest. Share it, and follow me for more intresting projects! Thank you agian and #rethinkphone !

Comments

author
pmalyadri (author)2015-12-15

without auduino can i control tv,cd player, home theater, and taprecords

by using zazaremote application

author
kazim72 (author)2015-09-29

yes that is awesome project for beginners. but here i have little bit confusion friend?? what is the role of PIR sensor? why you use the PIR sensor?

author
sartha (author)2015-09-23

how it possible without extended bread broad ?? can you explain

author
sartha (author)2015-09-23

how it possible with extended bread broad. ??
and the IR not working in Samsung S3
it work in iPhone 6 only for my LG home theater
how it work for all devices ?

author
intelroger (author)2015-09-20

Obrigado, estava procurando isso.

author
brashnav (author)2015-09-20

nice. thank you

author
thebrophet (author)2015-09-19

could you please mention all the required items in one place

i am a beginner and its hard to unerstand. please

author
FitriantoH (author)2015-09-17

Your description about audio jack isn't clear,because commonly smartphones use 4rings for audio jack,and there are 2kinds with difference for mic and ground position.

author
aghosh15 (author)2015-09-16

the ir led are not glowing. i tried with different apps but no result. i saw with another phone but nthin. tried with battry thn they were glowing. i think we need to make a circuit that is powered by battry n takes output from phone

author
azeem88 (author)2015-09-10

Ir Blaster not working. I'm using samsung galaxy S3. checked with camera too not glowing. :(

author
suyashbansal26 made it! (author)azeem882015-09-16

Same here. I tried it on 2 mobiles, Moto G and Yu Yuphoria. Tested it with my sony cybershot. None of the LEDs were glowing.

Also, when I connected it to my laptop and max the volume and then played any song, I was able to see the lights glow through camera.

But why not on mobile?

Please help.

IMG_20150916_222333.jpgIMG_20150916_222435.jpg
author
jkatila (author)azeem882015-09-14

Same here. Didn't work with S3. Used another phones camera to test, not glowing.

author
Imetomi (author)azeem882015-09-10

check the LED with a battery, or maybe the polarity is wrong...

author
DanaS10 (author)2015-09-12

Can I be safe not be hackt from any dives from any peple but I like only my friends to see ..
Please.

author
Imetomi (author)DanaS102015-09-13

Sorry I don't understand... Would you like to show this to your freinds?

author
JakobBouchard (author)Imetomi2015-09-15

Translation: Can it be hacked from any device of anyone? I want only my friends to have access.
Answer: Yes and no. It can be accessed by anyone with an IR Blaster but they need to know that this is in your house. It is not connected to any network so it cannot be detected. So basically, only you and the people you tell about it will know that it is in your house ;)

author
RedaC1 (author)2015-09-14

Thanks mate, it was simple and inspiring!

author
DaniFoldi (author)2015-09-11

Szia Tamás!

iPhone-ra is van app?

Hol szerezted be a dolgokat?

Tök jó lett a projekt!

author
Imetomi (author)DaniFoldi2015-09-11

ja, és igen, iPhone-on is van app, ZaZa Remote és AnyRemote is letölthető az AppStore-ból.

author
DaniFoldi (author)DaniFoldi2015-09-11

Ja és persze ment a vote!

author
Imetomi (author)DaniFoldi2015-09-11

Köszi szépen! Az Arduino Board-ot eBayen rendeltem minden más kiegészítővel együtt. A mozgásérzékelő szenzort szintén... Az infravörös LEDeket pedig egy helyi szaküzletben vettem az 3,5 audio jackel együtt, nem lehet több 200 forintnál.

author
FuzzyBearGeek (author)2015-09-11

Keep up the great work! Keep learning! Very nice!

author
zsbiro (author)2015-09-11

Tetszik, vótoltam! :)

author
Imetomi (author)zsbiro2015-09-11

Köszönöm! :)

author
BhaskerR (author)2015-09-10

Imetomi,
Very useful and interesting project.
Thanks for the detailed information, easy for beginners to try.
A. S. Bhasker Raj
Bangalore
India

author
manoelrangel (author)2015-09-10

This blaster works with iOS devices? There is an app for use it?

author
Imetomi (author)manoelrangel2015-09-10

Yes the blaster works even on iOS, and the ZaZa remote app is available on AppStore. :)

author
manoelrangel (author)Imetomi2015-09-10

Awesome man, tks! Nice project!

author
aghosh15 (author)2015-09-10

dude the app isnt recognising the ir blaster

author
samalert (author)2015-09-08

Dude the ible was great very intriguing, would you please add an video on the final product. Eagerly waiting for the same.

author
samalert (author)samalert2015-09-08

More on that i just had 2 spare remotes and i removed the IR LED's connected as shown in above on Audio 3.5mm jack. But when i run the app and put my tablet camera to test the IR i see no blinking. Ideally if IR's are sending data/signal they give a purple glow on Digital cameras, but its not happening i tried connecting in reverse and all but still not working. IR's are working good on other remote controls( i hooked them in parallel to test temporarily)

author
matstermind (author)samalert2015-09-09

Not all IR LEDs give off visible light. Looking through a digital camera is the best way to detect if it is really emitting anything. If you don't know the polarity of the LEDS, use a coin (CR2032) battery to test it.

author
ИгорьА1 (author)2015-09-07

Nice work! Why use 2 IR Led? In all remote only one.

author
Imetomi (author)ИгорьА12015-09-07

Thank you! The two LEDs are needed to create the 38kHz signal.

author
diy_bloke (author)Imetomi2015-09-07

in what way do two leds create the 38kHz signal where one led would not?? isnt that created by the app?

author
Imetomi (author)diy_bloke2015-09-07

Nope, the left and right chanell can generate 19kHz, and that's why we connect two LEDs with reversed polarity.

author
diy_bloke (author)Imetomi2015-09-08

ok clear. tnx

author
ИгорьА1 (author)Imetomi2015-09-07

I'm understood, thank you. I wish you new and interesting ideas.

author
Motoralbi. (author)2015-09-07

Hi. Can i use two IR LEDs taken from two TV remote controls,to make the IR blaster?

author
Imetomi (author)Motoralbi.2015-09-07

Yes if you have remote controllers that you don't use.

author
Motoralbi. (author)Imetomi2015-09-08

What range does this IR blaster have? 10 meters? more?

author
Imetomi (author)Motoralbi.2015-09-08

No, this is depending on the phone, for me is 4 meters, but if your phones jack can put out more current the distance will be bigger.

author
Imetomi (author)Motoralbi.2015-09-07

Aand are you Hungarian? I think from your name... :))

author
Motoralbi. (author)Imetomi2015-09-07

Nope,that's my nickname,i'm italian. I just saw that and was curios if i could use these two IR leds(yes i have two unused remote controls ?). So thanks for the reply ?

author
Saiyam (author)2015-09-08

This is really a very nice project! :) I suggest to solder everything to prevent loose connections.

author
Imetomi (author)Saiyam2015-09-08

Thank you!

author
jpatel32 (author)2015-09-07

its possible without andurino....

author
Imetomi (author)jpatel322015-09-07

yes,of course

author
Kerekes Tamás (author)2015-09-06

jó lett!

author
Imetomi (author)Kerekes Tamás2015-09-06

Köszönöm! Thank you!

About This Instructable

60,108views

794favorites

License:

Bio: Hi, I'm Tamas (Thomas), a 17 years old Hungarian guy. My hobby started more than 10 years ago. I learn electronics, physics, programming, IoT ... More »
More by Imetomi:DIY Cheap VR FPV System for Drones, Planes, CarsUltimate Intelligent Fully Automatic Drone Robot (w/ RPi, Arduino) Jedi Force Gestures Based Home Automation (with Smartwatch)
Add instructable to: