I want to make a IR Remote Control....
I am just getting started on a little gadget and thought I would ask if someone has any resources or has already done something similar that might help speed this project up.
What I want to do is make a device that will duplicate three buttons being pressed on a remote control for a cable box using a SX28AC/DP chip. When I am done, this lil gadget will remain pointed at the box and every 24 hours this gadget will send "0", "5", and "2".
I have an Parallax USB O'Scope and I have captured the code from the remote control and tried a few different ways to duplicate it, but this is a little harder than it seems. Any shared code anyone has that might help will be much appreciated.
What I want to do is make a device that will duplicate three buttons being pressed on a remote control for a cable box using a SX28AC/DP chip. When I am done, this lil gadget will remain pointed at the box and every 24 hours this gadget will send "0", "5", and "2".
I have an Parallax USB O'Scope and I have captured the code from the remote control and tried a few different ways to duplicate it, but this is a little harder than it seems. Any shared code anyone has that might help will be much appreciated.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
When all else fails.....procrastinate!
So, I tried the SXB from JonnyMac and just can't seem to make that work either. Is there a simple way to take the OScope data that I have, program it into the SX28AC and make it spit out this pattern with the press of a button attached to an input? I am curious too, if I am going to continue having problems using the Internal Oscillator at 4MHZ? Will I need something faster to ever make this work....
I am sure this is simple for someone out there and I figure if I can ever grasp how to make this work with one pattern, I will be able to snow ball it from there... basically, I need something VERY simple.
Thanks a million!!!!!!!!!
Don't use the internal oscillator for time critical (e.g. serial communications such as IR remotes) application. Use an external clock or resonator instead.
Thanks,
PeterM
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
When all else fails.....procrastinate!
It has been a few years, so I may not have kept the code. But this is my experience.
I used an audio oscope software through my computer sound card to catch IR transmissions for decoding.
Though the 40Khz is a little bit high for audio, the actual baud rate is slow enough that one can clearly see the timing.
That may be helpful as most of the documentation on the web is not comprehensive about what each and every key is doing on one's own remote. Some transmissions are simply one-shot and other seem to automatically retransmit [noparse][[/noparse]like the up and down volume]. You have to provide a trap in software to ignore redundant transmissions while responding the first good one. A time delay of some sort is required, maybe 100ms or more. Don't worry about one-shots being missed as people intuitively repress a key if they don't get the response they expect.
I also have had a BasicStamp set up to create and send a capture file on my computer to compare to the oscope. Some transmission behavior is surprisingly sloppy and it is important to know what's up if you want to reliably capture.
The SXes internal oscillator wanders roughly 7% due to changes in temperature, where as a resonator or crystal will hold this figure way down to below 3%. Many of the new resonators are even tighter. So use an external to have better results.
Many of the software examples only partially parse the transmission and ignore the fuller length transmission in order to save time. That made it hard for me to get started. This is somewhat of a cheat as one cannot use certain features of the remote - like switching between a t.v., a stereo, and a v.c.r. If you want those functions - the full code must be captured and decyphered.
In other words, the full transmission code usually has two segments - a key code and a device address. Many example just capture the key code.
The point is that the devil is in the details if you really want to fully exploit each and every button.
I have a universal remote that transmits over 100 different formats, but i have mostly stayed with the Sony standards as they are popular on the web for examples.
My own feeling is that for indoor, single room remote control - there is nothing better than IR. The SX can easily do it all. But building a complete database for all the keys on your remote is a tedious and lengthy project. Even Parallax's example only use a few of the keys and ignores the rest.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Post Edited (Loopy Byteloose) : 6/25/2009 5:45:01 AM GMT
Usually there are three tasks in the program's reception - recognize a header, recognize a data stream including key identity [noparse][[/noparse]for further action] including device address being sent, and recognize end of transmission. Of course, if the device address is NOT validated by your SX, it can ignore the rest. In this way, you might use an empty selection on your T.V remote and have the SX respond only when you switch to another device [noparse][[/noparse]maybe you don't a VCR want to use that recognition code}. In many cases, merely the process of recognizing the header portion will exclude a lot of devices that have longer and shorter headers. So you have a reception loop with several tests and each one provides an exit to a state of waiting for another transmission.
Personally, I strongly suggest buying a Universal Remote for research and testing that is sold as a replacement device. This should be one that you have to configure yourself from a list of 100 or so devices rather than a 'smart' device that learns protocol from transmission from another device. By getting yourself a separate device, you can select a code that is ignored by all your home devices and you can have something to really build a home remote control system on.
Not all BasicStamps are useful as their speed may be too slow for proper capture and handling of IR sequences. A 50Mhz SX will offer you a lot more opportunity than a 4Mhz as you can tune the device to be more precise in recognition of code. It will also have more time to look up what the key code should do as there are more empty clock cycles between incoming IR. That does mean that the receiver will be more 'power thirsty', but that really is a non-issue as it is the transmitter that is battery dependent, not the receiver. The receiver will often tie into a wall wart and power something else, like a relay board or a robot.
I have also collected a few odd IR remote controls, like discarded Air Conditioning remotes. These can be decoded and recycled for hobby use. The IR remote is a wonderful device as it is well built for recycling and hobby use. It would take quite a bit of work for you to create your own IR remote and it would likely consume more batteries over the period of a year.
Good luck to you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Post Edited (Loopy Byteloose) : 6/25/2009 10:15:01 AM GMT
Take a look at this project using a BS2 and an external 38KHz oscillator.
http://www.parallax.com/tabid/321/Default.aspx
The code can be modified to support other IR protocols.
The 38 KHz oscillator can be purchased here: http://www.rentron.com/remote_control/TX-IR.htm· and the resonator: http://www.rentron.com/Products/PIC-Micro.htm.
As stated by others, google "IR protocol NEC" "IR protocol RCA". You will even find protocol information on the IR receivers manufacturers "Application Notes" web sights.
I have code for IR receivers and IR transmitters that I will poast at a later date.
Stephen Wagner
·
The remote that I am trying to duplicate a couple of button press's on is a "URC 7820". I have just learned that it transmits at 56KHZ to the Scientific Atlanta cable converter box. My project is to simply duplicate a couple of key presses ("3" and "0" to be exact). At the end of this project, I will place this box in a lobby type area and my device will tune this box back to the correct channel every XX hours or so (doesn't have to be exact, but will probably be every 3 hours).
Since the baud rates are actually in the audio frequency range, one still can use a audio oscope software and a sound card on a conventional PC for decoding. One doesn't have to buy a normal oscope with higher bandwidth.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Post Edited (Loopy Byteloose) : 6/29/2009 3:48:24 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thomas Talbot, MD
Gunpowder, MD, USA
http://forums.parallax.com/showthread.php?p=819481
I built a time-lapse controller for my Sony camera -- the only way to remotely trip the shutter is through an IR interface. I knew that the camera used the Sony protocol so that was easy, but I still had to look at it on a 'scope with a proper demodulator to determine the bits sent from the remote to the camera for a shutter release command.
Don't know if you're still in need, but if so I highly recommend this product:
http://store.homeseer.com/store/GC-IRL---Infrared-Learner-Global-Cache-P539C47.aspx
This IR Learner is available from Homeseer for about $78. It might be a bit pricey for just duplicating 3 button codes, but I have used it with great success to capture/duplicate IR codes. One of the cool things about it is you can capture your generated IR codes and quantitatively compare them with the originals. The IR Learner will give you output such as:
sendir,2:1,2,56000,1,1,23,345,23,158,23,94,23,158,23,158,23,94,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,345,23,158,23,94,23,158,23,158,23,94,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,345,23,158,23,94,23,158,23,158,23,94,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,345,23,158,23,94,23,158,23,158,23,94,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,158,23,345,23,1120
"56000" is the modulation frequency, the first "23" means 23 cycles of 56K carrier, then "345" means 345 cycles of no carrier, with further alternation of on/off carrier.
The IR Learner has a claimed carrier frequency range of 30 to 500 KHz. It is DB9 serial, but I have used it with no problem with an Airlink USB-Serial adapter.
An easy way to get started is generate a short on/off pulse train of carrier and capture it with the Learner. Be aware the the Learner probably does not see visible light LEDs (i.e. use IR LED), and needs to see light that looks like a modulated carrier before it will capture it. Also be aware it can be tricky to duplicate the range of IR remotes. Try your IR code up-close at first; once you get it working move back to find the usable range