Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] IR Remote Control using Microcontrolller

Status
Not open for further replies.

DasPreetam

Advanced Member level 4
Full Member level 1
Joined
Jan 5, 2014
Messages
100
Helped
2
Reputation
4
Reaction score
2
Trophy points
18
Activity points
755
Hello everyone,

First of all, I'm a complete newbie in the field of microcontrollers. So please bear with me as I get familiar with the terms.

I'm trying to make a IR transmitter that will send a BCD code modulated at 38Khz carrier frequency.

eg :
When I press switch 1, 0001 is transmitted
When I press switch 2, 0002 is transmitted and so on.

I know that in order to send the signal, the carrier frequency needs to be modulated. I heard that microcontrollers are perfect for the job, but since I don't know anything about them. It's a daunting task for me, so it'll really help if you guys guide me.

Also, I saw that there are microcontrollers with 40 pins and then there are 16 pin also, for this circuit, I guess small microcontroller is needed (Because TV remotes are generally small). So which one should I use ?
 

Hi,

1) Choose a microcontroller that has hardware pwm;
2) Configure the pwm for 38khz, 50% duty cycle.
3) Output your data serially on another pin
4) Connect your IR LED (with 330 ohm resistor in series, lower this for incresed range) between the above two.

Best Regards.
 
Microcontrollers comes with different architectures. Each architecture has different kind of programming. To use a microcontroller you need to know about its architecture details, any specific programming language, a programmer circuit to load the program and few other components. 8051 family controllers are easy to use and are suitable for these easy jobs. But do you have any 8051 programmer???
 
I would recommend a Microchip PIC.
Their development software is free.
There are lots of inexpensive demo boards.
There is lots information on their website.
 
How many switches in total?

You do not mention anything about a receiver. I assume you will need to make one?

Would a standard TV remote do the job? - then you could make a custom receiver to perform whatever task you want done.
 
Thank you all for your quick replies.

I'm confused between 8051 and PIC MCUs. Does they come in small size ? because I saw that 8051 is quite big, I need something small for my remote. Also, which one is easy to work with ?

How many switches in total?

You do not mention anything about a receiver. I assume you will need to make one?

Would a standard TV remote do the job? - then you could make a custom receiver to perform whatever task you want done.

Actually I'm trying to make my own remote control. There is a receiver section, but that comes later. The remote will contain around 8 switches.
 

This is how I would do the job:

I would use PIC18F1320, which has 18 pins.
The trial version of mikroC pro for PIC compiler should be enough to write your code for free.
You would need a MikroElekronika programmer, costing about $100
You would need IR LED(s) and driver transistor, plus a couple of resistors.

There are many other ways to do the job, many better, but this just suits my amateur experience and tools I already use.

This would make a poor remote, as power consumption would be high, and either an on/off switch would need to be provided to prevent using power when not in use, or a more complicated design would be needed, using 8 diodes to power up the PIC whenever one of the switches is pressed.

I am not experienced in programming for low-power operation, so you would be on your own with that.

It is for the above reasons that I usually use an existing remote control, where all the above problems were solved by the remote manufacturer.

There are cheaper PIC programmers around, but again, I cannot help with those.

I can help with PIC programming for IR, but only at amateur level.

Buying a hobby kit would be cheaper, since the chips come ready programmed.

My favourite site for explaining IR protocols is here: http://www.sbprojects.com/knowledge/ir/index.php

Sony protocol is the simplest.

Some of my complete IR Tx/Rx projects are here:http://www.libstock.com/projects/view/43/infrared-tx-rx-samsung-sharp-nec-sony-rc5-rc6-mce-toshiba-ir-easypic7-pic12-mmb18-mmb33-arm
You will find 4 button transmitter and receiver using Sony protocol and 8 pin PICs
 
Last edited:

If you want the controller to be very small, you can use TinyAVR or PIC. They come in minimum of 8/6 pins I guess. 8051s in common are available in minimum of 20 pin (AT89C2051)...
 

The part that is worrying me is the coding part. I don't know how to code (C will be OK, but Assembler is frightening !), and I guess without the code the MCU will not be able to do anything.
 

Does it have to use IR and a microcontroller? If so, why?

If you can use radio, there are several possibilities. One is to use cheap RF modules and H12E/H12D encoders/decoders. Here is a link to one such provider. There are several. The second link is to a thread on EDA Board. It is quite easy to get a one-to-one correspondence between a button pressed on the transmitter and an action by the receiver.

**broken link removed**

https://www.edaboard.com/threads/252208/

John
 

Encoder & decoder are good examples. If you can find HT12A, it has inbuilt 38KHz carrier output. You can directly connect IR LED to it. And in receiver side, TSOP1738 does the demodulation job and HT12D will decode it. You can avoid microcontrollers.
 

Okkay !! Now that sounds interesting!! I know I posted this in the microcontrollers section but after few replies I think I've to gain some more knowledge in order to deal with µCs... The Encoder Decoder pair seems less tough than µCs...

If you can use radio, there are several possibilities.
Actually, I have this idea of sending instructions through Bluetooth. It uses RF medium right ? So can HT12D, paired with a bluetooth receiver, be able to decode the signal ?
 

What happened guys ? Is it possible or not ?
 

Hi Preetam,

Any particular reason to use bluetooth?

You wont be able to use bluetooth with the dedicated encoder/decoder pair, but you could use RF and IR as said before.

Bluetooth modules typically require a serial input, and give out a serial output as well. Using bluetooth would make sense if, for example, you intend to use your Android as a transmitter. Then, you would still need a micro at the receiver end to decode the data received by the bluetooth module. As also, you would need to write your own app for the smartphone.

If you *absolutely* cannot use a microcontroller, the the Holtek chips are your best option, IMHO.

Best reagrds,

Anand Dhuru
 
Thanks, I was just curious... Because bluetooth applications are larger compared to IR... I will definitely try them for future projects... But for this, I think HT12A/HT12D chips should do the trick...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top