Notifications
Clear all

Create an IR remote

43 Posts
10 Users
1 Likes
7,267 Views
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@a-wal16

The link I gave on universal remotes did not have too much detail, but there are others you can google them if interested.  But here is a better link to a programmable transmitter found at random

https://remotesource.net/simple-programmable-ir-remote-control/

but as said there are many others.   And as @casey remarks if your IRC has a learn mode your already home and dry, though I think I have a similar one that does not (or equally likely I did not read the instructions ?)

And a final though on using an Arduino as a IR transmitter.   One would typically use the Arduino and a breadboard circuit to prototype your remote, but then transfer your design onto a nice little circuit board you design using just the IC chip from the Arduino and the electronic components of your design.  But as there are many very small microcontroller boards these days it is getting more common to plonk the whole microcontroller board in your finished design. A 3d printed case with some buttons will finish off your project very nicely?    This may not be the road you want to go down and there would be a lot to lean, but it is recommended as a challenging hobby if thats what you seek.


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 
Posted by: @a-wal16
Posted by: @byron

@a-wal16

Yes I think it is possible to create your own IR remote to transmit your desired IR signal.

The following link to an Adafruit tutorial may give you the information you seek

https://learn.adafruit.com/using-an-infrared-library/sending-ir-codes?view=all

A great tutorial, but still missing the last part. They use the Arduino as a remote. Thats not what I want. I hope I can picture it.

Afstandsbediening

In all honesty, I don't think it is possible to achieve the transfer of IR codes from one remote to another.

Most, if not all, cheap Chinese IR remotes have the codes hardcoded in the device. And if your original remote is defective, it will be hard to determine the code set it uses. In earlier posts in this thread, a number of workarounds have been suggested using an Arduino, but if you don't want to buy or use an Arduino, you may as well trash the old remote and buy another from the original manufacturer!

This is called "the path of least resistance"!


   
ReplyQuote
(@a-wal16)
Member
Joined: 4 years ago
Posts: 10
Topic starter  

In all honesty, I don't think it is possible to achieve the transfer of IR codes from one remote to another.

Most, if not all, cheap Chinese IR remotes have the codes hardcoded in the device. And if your original remote is defective, it will be hard to determine the code set it uses. In earlier posts in this thread, a number of workarounds have been suggested using an Arduino, but if you don't want to buy or use an Arduino, you may as well trash the old remote and buy another from the original manufacturer!

This is called "the path of least resistance"!

I know I can't transfer from one device to another. I skipped the step of the Arduino in the middle. It should be like this:

Afstandsbediening

   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@a-wal16

Sadly if your remote is not programable then whether you stick an arduino or an IBM mainframe in the middle the answer will still be no, you cannot change the IR codes sent by your remote.  As said there are programmable remotes, but not the cheapie remote you picture.


   
ReplyQuote
VE1DX
(@ve1dx)
Member
Joined: 5 years ago
Posts: 143
 
Posted by: @a-wal16

In all honesty, I don't think it is possible to achieve the transfer of IR codes from one remote to another.

Most, if not all, cheap Chinese IR remotes have the codes hardcoded in the device. And if your original remote is defective, it will be hard to determine the code set it uses. In earlier posts in this thread, a number of workarounds have been suggested using an Arduino, but if you don't want to buy or use an Arduino, you may as well trash the old remote and buy another from the original manufacturer!

This is called "the path of least resistance"!

I know I can't transfer from one device to another. I skipped the step of the Arduino in the middle. It should be like this:

Afstandsbediening

@a-wal16 I agree with @pugwash and @byron that you are probably unlikely to achieve what you want. I think the best you can do is program an Arduino to act as if it were your remote control. I'm working on an Arduino project right now that will have a "learn" and "operate" mode.

If I can get it to work, it will allow you to put it in "learn" mode, and it will memorize 6-7 keys from ANY IR remote control. Then you can flip the Arduino to "operate" mode to duplicate the remote you have.

This isn't exactly what you want, I understand. However, it removes having to determine the codes and hardwire them into the Arduino code for any given remote. Essentially it will make an Arduino behave as any IR remote one has lying around. It will store the codes it learns even you reset or power off the Arduino, and you can change remotes by reprogramming the Arduino just once per device. It probably will be a couple of days before I get this working, and when I do, I'll post the circuit diagram and code here.

Paul VE1DX


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@ve1dx

I'm looking forward to your project post, its way more sophisticated than anything I have dabbled with for IR stuff.   This could be a nice project to use for my first go with KiCad to produce a PCB.  But maybe this is also on your project to do list, if so, then I can learn from you about this too ?  (and maybe we could sell a finished one to @a-wal16 for a big fat fee ? )


   
ReplyQuote
VE1DX
(@ve1dx)
Member
Joined: 5 years ago
Posts: 143
 
Posted by: @byron

I'm looking forward to your project post, its way more sophisticated than anything I have dabbled with for IR stuff.

@byron don't mortgage your house and liquidate all of your retirement savings to invest in this quite yet! ? BUT, I have it working in 3 separate sketches. I need to combine them into one piece of software and fix any conflicts that might occur.

That said, all the hardware is working on a single breadboard. By that, I mean the "toggle between modes", "read and store the codes in non-volatile EEPROM memory from any remote", and "regurgitate them after a power-off" works without any conflict.  In other words, 3 sketches driving different portions of the circuit without changing a wire or component.

I need to figure out what to do with it as well. Now it just toggles 6 LEDs. However, experts and those who think out of the box can expand it to drive relays, power transistors or whatever.

I'll need to lean on you for KiCAD expertise if we ever get that far! I went through @robo-pi 's videos, and instead of going to the PCB module, I played with the schematic generating module. They seem similar, and James' videos are beneficial, but the learning curve is steep! I can do simple stuff, but I'll never be able to generate a PCB layout. I fear we might be veering off what @a-wal16 is looking for, but it's fun to fool with this stuff, and I'm learning a ton from you guys.

I'm hoping that at a minimum we can inspire @a-wal16 to see a solution to his request, even if it takes a different path than he initially thought.

Paul VE1DX


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

@pakabol

It seems to me that you could do this with an arduino, a couple of nerfs (nrf24whatever, I call them nerfs) and just have the servo hit the light switch, and never even have to bother with mains electricity


   
ReplyQuote
VE1DX
(@ve1dx)
Member
Joined: 5 years ago
Posts: 143
 
Posted by: @ve1dx

I need to figure out what to do with it as well. Now it just toggles 6 LEDs. However, experts and those who think out of the box can expand it to drive relays, power transistors or whatever.

Just a note to @a-wal16 et. al.  I haven't forgotten this project, and it's coming along fine.  Slower than I thought, but it shall be completed soon.  Writing to, and reading from, the EEPROM in a DS3231 is simple.  But I kept running into gotcha's storing and retrieving the IR keypad codes properly.  Basic Arduino/C programming stuff that I've finally sorted out.  wire.h having a maximum buffer length of 32 bytes was one.  Anyhow, that in the checked off list, so onward and upward.

Paul VE1DX


   
ReplyQuote
VE1DX
(@ve1dx)
Member
Joined: 5 years ago
Posts: 143
 
Posted by: @spyder

It seems to me that you could do this with an arduino, a couple of nerfs (nrf24whatever, I call them nerfs) and just have the servo hit the light switch, and never even have to bother with mains electricity

NRF24s look interesting, but I'm sort of going down the general-purpose road of repurposing any surplus IR remote.  What the end-user does with the signal(s) when a keypad button is pressed is up to them, be it NRF24 driven, involving mains, or just flipping LEDs is up to them.  If nothing else I'm forcing myself to learn a lot of new stuff.  Probably my end product won't be of much use, but this is a hobby and I can't sit still! 😀 

Paul VE1DX


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 
Posted by: @ve1dx

Probably my end product won't be of much use,

Au contraire, I can see quite a few good uses.  I have serval remotes by my TV chair, but normally use just a few buttons on each, so I could make a master remote to put in a nice 3d printed case.  One could also put some extra buttons in the IR transmitter unit to send wifi messages etc.  One control to rule them all, and in its carcass bind them 😎.    It looks like you are getting on well, keep up the good work!


   
ReplyQuote
(@chucketn)
Member
Joined: 5 years ago
Posts: 25
 

Please continue this thread. I wish to develop a controller for lights, fans, or other AC powered devices that I can program to use input from any IR remote.

I am confident I can decode the remote, I have that part working. I need the other end, the receiver for the remote and ideas how to use it to control stuff.  Or, point me to that type of thread.


   
ReplyQuote
VE1DX
(@ve1dx)
Member
Joined: 5 years ago
Posts: 143
 
Posted by: @chucketn

Please continue this thread. I wish to develop a controller for lights, fans, or other AC powered devices that I can program to use input from any IR remote.

I don't know that there's much more I can offer.  I created the prototype on a breadboard, and I've added a video of it being programmed and flipping 5 relays on the other site:

https://create.arduino.cc/projecthub/VE1DX/repurpose-old-remote-controls-92139f

All that needs to be done is to create a PCB (if one wants to go that far) and modify the sketch as desired.  I've pretty much exhausted my hardware and programming expertise on this one, fellows.  Taking it one step farther to a production "unit" is beyond my ability.

I'm moving on to playing with a "blue pill", specifically an STM32F103C8.  I'm more than willing to fix defects in either the hardware or the IR Remote sketch provided, so I agree this thread is worth keeping alive . . . but I think the hardware engineer types are more likely to provide guidance from here on!

Paul VE1DX


   
ReplyQuote
Page 3 / 3