Author Topic: EEVblog #505 - IR Learning Remote Control Hack  (Read 20494 times)

0 Members and 1 Guest are viewing this topic.

Offline adcurtin

  • Contributor
  • Posts: 26
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #25 on: August 09, 2013, 04:37:21 am »
When I automated an xbox 360 controller, I found out the board I had was one of the matrix style ones (as opposed to other designs of the pcb that were common cathode or common anode). I ended up using 74HC4066 cmos switches, which worked out great.

However, in your case, this arduino library would be much simpler: http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html

that allows the arduino to learn the commands itself (using a basic ir reciever), as well as transmitting them (via ir led). 4 parts: arduino, led, resistor, and ir demodulator. Maybe a mosfet if you want more power. I used this to control my air conditioner over the internet: ssh to a computer, connect to the arduino serial port (with gnu screen), and I could send any command from the A/C remote. Then I could turn off the A/C during the day when I wasn't there, and turn it back on long enough before I went home that it was cool when I got there.
 

Offline PeteInTexas

  • Frequent Contributor
  • **
  • Posts: 344
  • Country: us
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #26 on: August 09, 2013, 05:44:28 am »
Weird timing.  I started this week to mess about with lirc on Raspberry Pi to control a cd changer.  Naturally, I'm ripping my hair out and its still not working right.  This video was helpful about about the common ground issue as my next try would have been to simply drive the key matrix lines directly.  Thanks, cause I like to keep my hair  ;D :phew:
 

Offline jnissen

  • Regular Contributor
  • *
  • Posts: 61
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #27 on: August 09, 2013, 01:35:26 pm »
For the hack to work as intended you really need to emulate a switch as you indicated. What I am not clear on is why you still went ahead and attempted to do it half assed. That Arduino clone had a proto area on it for a few simple CMOS switches so why not do it so that the thing will be reliable and easy to power? I guess your still stuck in the bailing wire and duct tape mode! Over the years I've learned that if your spending the time to do a task at least do it in a manner that doesn't require you to constantly come back to it. You spend twice as much time using a hack as doing it well to begin with.  Then again the recommendations where you properly learn the codes and let the Arduino spit them out is likely the best solution overall. You already have to interface to the LED sign and countdown timer so why not make it a real integrated solution?

Yeah you did invite us to comment on the project!
 

Offline sonic

  • Contributor
  • Posts: 37
  • Country: de
    • Homepage
Solid state relays
« Reply #28 on: August 09, 2013, 01:43:48 pm »
Nice video!
The way I did it (to let my linux box wake me up):

Unfortunately, the range of the ISM transmitter and/or receivers is terrible ???
« Last Edit: August 09, 2013, 02:00:32 pm by sonic »
 

Offline synapsis

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
    • Blackcow
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #29 on: August 09, 2013, 05:21:39 pm »
Even if it seems like people are saying "You should've done this!", it's nice to have a lot of solutions in one forum post. If I need to do some quick project at 2AM and Google it, I click on the EEVBlog links first because they usually have a number of solutions.

I'd like to know more about the LED matrix. It looks like the housing is 3D printed?
 

Offline Mikey

  • Regular Contributor
  • *
  • Posts: 77
  • Country: dk
  • Just hit 3rd!
    • captain-slow.dk
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #30 on: August 09, 2013, 05:27:52 pm »
Sometimes I don't think people actually listen to my videos...
I mentioned IR direct with a library, I mentioned cmos switches, optos, relays, and external transistors, yet people will still comment on those as if I missed the obvious  ::)

LANC is not an option, I want wireless. And before someone tells me, yes I know you can do LANC wirelessly too if you really want, but that would be silly when IR is available.
Yup, not fun when people question the one normally questioning and ranting about how others did what they did. ;)
captain-slow.dk | 3D printing | CNC machining | Mechanical designs | Simple electronics
 

Online SeanB

  • Super Contributor
  • ***
  • Posts: 15162
  • Country: za
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #31 on: August 09, 2013, 05:34:36 pm »
I have dealt with a few remotes, and you really need a scope to see which is driven, column or row. Then you can use a signal FET to do the switching  of row to column very easily. The connection used by Dave looks like he has the common pin of the 3 pins being the driven one, so when the Arduino is unpowered the ESD diodes in the unit become forward biased and conduct slightly, enough to lock up the other micro with 4 inputs pressed. With power applied the pins are pulled up enough so they appear open circuit.

 

Offline RupertGo

  • Regular Contributor
  • *
  • Posts: 77
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #32 on: August 09, 2013, 09:13:52 pm »
The one trouble with the quick and dirty hack that just works is when you start building stuff on top of it and you end up spending more time working around the problems it brings than going back and doing it properly.

That bit me on the backside thirty years ago, and it bit me last week. The only thing that experience has won me is that I spotted it early this time, and only ditched two days of work instead of six months. Also, my backside is scarred and hardened, so it didn't hurt quite so much...

 

Offline crisr

  • Contributor
  • Posts: 45
  • Country: br
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #33 on: August 09, 2013, 09:26:48 pm »
Quote
This one will of course bring out the "you should have done this", "you could have done this", "why didn't you do this" crowd.
You are definitely right about that! I guess I am a little bit disappointed with Dave on this solution... an Arduino AND an Universal Learning Remote Control for sending a couple of IR signals? As someone said in a previous post, just sample the commands with a DSO (using a TSOP4838 or similar IR receiver IC -- heck, using a DSO with decent memory, even a conventional IR phototransistor if the emitter is held close enough), take note of the pulse timing (usualy 2 start pulse lengths, plus one "1" length and one "0" length), there will probably be around 32 or so bits max, and hardcode them in a program on an 8-pin ATTiny or 12F pic running on the internal RC oscillator and connected to an IR LED (timing the carrier on an ISR) - part count: 3 (uC, resistor, LED), no need for even a crystal. Writing such a program takes less time than it is needed to open an universal remote, trace the matrix and connect everything together, and edit a whole video about that  ;). Of course, you might need the Arduino for other purposes, but I think there is absolutely no need for the universal remote.

Nevertheless, a good video showing a possible solution to interfacing maybe some other type of device in which you must do it through a button matrix - avoiding the common ground is a neat hack which I would probably not remember if I had to do such thing. The issue that happens when the Arduino is powered off is probably due to everything being at 0V potential (as if it had a 0V power supply) when off, and all the outputs are as if the were connected to ground, or in the case in the video, as if the buttons are shorted or always pressed. Such type of issue always gets me, as I usually forget to consider the internal protection diodes on the uCs. As someone else said in this topic, this can be avoided, even in a common ground setup, by using either PNP or NPN bipolar transistors whether the matrix scanning is active high or active low.

A great resource on IR protocols: http://www.sbprojects.com/knowledge/ir/ - check the specific protocols on the left hand menu.
« Last Edit: August 09, 2013, 09:49:46 pm by crisr »
 

Offline crisr

  • Contributor
  • Posts: 45
  • Country: br
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #34 on: August 09, 2013, 09:44:38 pm »
Quote
Say i have a dev. Board connected to the USB port, and a second board is connected to the floating voltage.How can both? boards communicate without having common GND reference? So logic '1' of the dev Doard wouldn't be logic '1' for the other...or am i wrong somewhere?
To communicate between boards with independent floating voltages, if you don't want to use optoisolators or similar techniques, you need a common reference indeed. That reference doesn't need to be GND, even though it is used in the great majority of circuits. It can be VCC, for instance, or any through which current can flow, on levels that each circuit can understand. In the case of Dave's video, it it the scanning signal from the remote control microcontroller. A little more difficult to follow and understand (and prone to "bugs"), but a common reference nonetheless.
 

Offline Pilot3514

  • Contributor
  • Posts: 28
  • Country: us
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #35 on: August 10, 2013, 03:34:22 am »
I love ya Dave, but this was not up to your usual high standards.

I was expecting scopes and logic analyzers.  I was expecting to see signal levels and modulation frequencies.

When I saw the Arduino I half expected what others have said about the Arduino learning then sending the IR signals.  But I was hoping to see the Arduino used as a logic analyzer to read the pins as the keyboard was scanned.  Collect the data as each key on the remote is pressed.  Then teach the Arduino to watch the signals as the rows were scanned and then put the proper signals on the columns when it need to be there.

Anyone can solder in place a bunch of reed relays.  But who other than the great "Aussie Bloke" could completely simulate the entire keyboard with just a couple of MPU ports? :(
I'm not cheap, I'm frugal
unlike those wasteful Scotch.
 

Offline ju1ce

  • Regular Contributor
  • *
  • Posts: 94
  • Country: fi
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #36 on: August 10, 2013, 05:16:28 pm »
I didn't mind the approach at all, I think it was nice to see something different.

On another note, finding such a hackable remote by a chance is quite unbelievable. The display at the end was nice too. I'm looking forward to getting to know more about it...
 

Offline raymond2000

  • Contributor
  • Posts: 23
  • Country: gb
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #37 on: August 10, 2013, 05:22:55 pm »
very interesting video as always, at 5 min watch "the matrix reloaded"  :-/O  :-DMM

Flexible as the JP1 universal remotes   

http://www.hifi-remote.com/jp1/help/

http://www.hifi-remote.com/forums/

good stuff  :-+
 

Offline tonyp12

  • Newbie
  • Posts: 2
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #38 on: August 10, 2013, 05:38:01 pm »
Is the key matrix a Positive check?
X side is step by step provided with Vdd on each pin
and each pin on Y is checked for a Vdd result.

Could you not then use P-channel mosfet as a "Key-button" press so you
can have 4 simultaneous simulated button presses.

Or the other option is that the Arduino reads the X side to see the scanning in action
and only output a 1 to the Y-side at appropriate times slots.
e.g a software and-gate, but don't set pin as output=0 but instead change it to
input  to turn it off as not to create a short if actual buttons is still there.




« Last Edit: August 10, 2013, 05:50:33 pm by tonyp12 »
 

Offline bitwelder

  • Frequent Contributor
  • **
  • Posts: 822
  • Country: fi
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #39 on: August 10, 2013, 09:14:20 pm »
If anybody in central/northern Europe is interested in such a IR learning remote, Lidl (German-based discount supermarket chain) sells a similar device.
When I watched the video, I noticed the shape of the arrow keys, and the display that were similar to a SilverCrest URC 101 remote that I bought in Lidl about a year ago.
I "pried the sucker open" and I found the same construction scheme, with a small PCB containing all the active parts, soldered to a long PCB that contains just the pads for the keyboard (and a ATMLH848 at the bottom).
 

Offline Electro Fan

  • Super Contributor
  • ***
  • Posts: 1917
Decoding Capability
« Reply #40 on: August 13, 2013, 03:45:33 am »
Some don't even bother with the description text. :D

Yeah, description test is almost pointless it seems, just for SEO  ;D

Dave, A little bit off topic, but you seemed to enjoy using the decoding capability on the Rigol (and the Saleae); have you had any reason to try the decoding capability on one of the Agilents?  If so, let us know if you see any notable differences in terms of functionality, ease of use, etc.  Please/Thx.  EF
 

Offline greatal

  • Contributor
  • Posts: 6
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #41 on: November 24, 2013, 02:34:43 pm »
Hi Dave and all other perfect forum users
When I watch this video it just remind me some old Ethernet cable testers which use bunch of resistor with deferent values that anyway you sum them together it show you which resistors are used for example some think like this 1ohm  10ohm 56 ohm 75 ohm 100 ohm 120  and … so if you some two value none of them equal to each others  value 100+1 1+10  ... so if Dave’s universal  remote controller Carbone traces have deferent resistances actually it may coded by restores values to do more keys and its seams to identical because that pins that look 2*10 or 2*12 and that’s way more less than numbers of those keys on that remote control so if you use same value restores  hook to your pins it should do the job and that’s my opinion
All EEVblogers sincerely
GreatAL
 

Offline MrAureliusR

  • Supporter
  • ****
  • Posts: 366
  • Country: ca
  • frozenelectronics.ca
    • Frozen Electronics
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #42 on: November 26, 2013, 02:11:22 am »
Here's an excellent App Note from Microchip on this very subject: Decoding an Infrared Remote using a PIC16C5X Microcontroller

Yes, it's for the PIC16C5X which is a bit outdated, but all the theory is there and it's easy to convert to your favourite microcontroller code.

Here's the source code they provide:

AN657 Source Code

Microchip has an amazing number of really great App Notes, check them out here:

Microchip - Browse Application Notes

I don't even use PICs that often, but I find Microchip has a great database of information. To those out there who haven't read App Notes, almost every company (TI, Atmel, Lattice, Xilinx, Microchip, Maxim, NXP) have Application Notes for their products. They are usually chock full of really valuable information on how to use their chips in a particular setting. Recently I read an App Note from Microchip on how to directly interface a micro to AC line voltage, to detect the zero crossing for switching a triac on and off. Almost like PWM for AC. Extremely interesting App Note.

Seriously -- check out your favourite manufacturer's app notes -- you will always find something interesting. Best of all, they're freely available!
--------------------------------------
Amateur Radio operator VA3XMR
-.-. --.-  -.. .  ...- .- ...-- -..- -- .-.
 

Online Kjelt

  • Super Contributor
  • ***
  • Posts: 5736
  • Country: nl
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #43 on: November 26, 2013, 09:21:57 am »
Here's an excellent App Note from Microchip on this very subject: Decoding an Infrared Remote using a PIC16C5X Microcontroller
Yes, it's for the PIC16C5X which is a bit outdated, but all the theory is there and it's easy to convert to your favourite microcontroller code.
Nice find, but pretty outdated since the IR codes now run upto 500kHz modulation according to Global Cache (www.globalcache.com see GC-IRL ), probably they mean IrDa. This would require about 2MS/s sampling rate, an arm micro would be a better choice these days  :)
I don't see how one can easily convert microchip assembly to another companies microcontroller code  ??? , ansi C would have done a much better job.
« Last Edit: November 26, 2013, 09:25:07 am by Kjelt »
 

Offline Six_Shooter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ca
Re: EEVblog #505 - IR Learning Remote Control Hack
« Reply #44 on: November 26, 2013, 08:18:41 pm »
Even if it seems like people are saying "You should've done this!", it's nice to have a lot of solutions in one forum post. If I need to do some quick project at 2AM and Google it, I click on the EEVBlog links first because they usually have a number of solutions.

I'd like to know more about the LED matrix. It looks like the housing is 3D printed?

I agree, I like seeing several solutions to the same problem. This allows for using the the best approach when some other part or idea is introduced to the problem.

there have been a number of times where the best approach that was taken was perfect until one other parameter was added to the design which needed a different set of solutions for the previous tasks.
 

Offline callipso

  • Regular Contributor
  • *
  • Posts: 87
  • Country: cz
Re: Solid state relays
« Reply #45 on: February 15, 2015, 11:21:18 am »
Nice video!
The way I did it (to let my linux box wake me up):

Unfortunately, the range of the ISM transmitter and/or receivers is terrible ???

Try rtcwake
I wonder... **BOOM
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf