• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

IR Remote Control Fun

Visitor

Well-Known Member
I'm still hiding out in Mexico. Warmth, sunlight and many places to eat outdoors is a nice change from a dark, dizzily Seattle winter ;)

I did bring my laptop and a Seeed Xiao "Seeeduino" board with me and recently went to a couple electronics stores here*. Among other things I bought a couple IR remotes (one from each store). These two controls, obviously from the same Chinese factory, have different overlays and one has 4 less buttons.

* see below

remotes.jpg

The first order of business was mapping out the button codes. Surprise, surprise, surprise. Both controls have the same address (device) code, and the command codes are the same for the physical button locations. The chart below shows the screwy arrangement of the command codes.

What this means is that pressing "1" on the two remotes gives different results, since the number keys are on the top of one remote and the bottom of the other. Fun, fun, fun. This probably explains why the IR remotes for LED bulbs and strips have strange results when used with different units.

remote codes.jpg

* Electronics stores in Merida, Mx on the Yucatan Peninsula:

The population of Merida is nearly 900,000. It's about 30 miles inland, and is a smart college town. As far as we have determined, it's impossible to get a bad meal here. Steren Electronics is a chain electronics store, with a number of locations in Merida. It's kind of a consumer electronics store, but with a huge component and maker selection, with deep stock levels and good prices. Nothing like Radio Shack of recent years, with 5 values of half-watt resistors, with at most two packages of 2, hanging on a peg for a buck each. Steren has many custom products, as well as a range of modules and parts from China. Few cities in the US have electronics stores that come close to this anymore.

Electrónica 60 Norte is more focused on makers, and is a family run business. Many different parts, components and tools of interest to makers. Good stock levels, knowledgeable, friendly people. Again, few cities in the US have anything comparable. Both stores have comprehensive websites showing most of what they have.

As far as maker-spaces, I got excited when I saw a big sign on building not far from where we're staying that said it was a maker space. After coming up empty with a number of searches, I finally found a listing on Facebook. Permanently closed 2 years ago.
 

Visitor

Well-Known Member
I guess COVID hit them early...
Just beating the rush!


They were doing pretty well with Covid here when we came in November, but recently the numbers have gone way up.

They take Covid very seriously here - everyone wears masks outdoors and if you go into a business or restaurant, you will have your temperature taken and be given a shot of hand sanitizer. Mask compliance is virtually 100%.

They have recently been enforcing the 11pm Covid curfew. When I was having stomach trouble, and we determined it was giardia after all else had failed, my partner agreed to go to the farmacia at midnight to get the needed mediation. He came back much later, having found it at the 6th all-night pharmacy he went to....and being stopped at 4 Covid checkpoints along the way! Husband of the year!

Interestingly, most farmacias are open all night here. Also, giardia has a one dose, 3 pill anti-parasites cure now. I seem to recall that "beaver fever" was something to be avoided at all costs; it was something you had to live with if you got it.
 

Mike - K8LH

Well-Known Member
Merida sounds heavenly...

The key codes for one of your IR remotes matches the key codes for one of the Chinese IR remotes I purchased several years ago (see below). I also purchased some 24-key IR remotes for something like $1.12 each IIRC. All of the IR remotes seem to use an NEC IR protocol.

Stay safe. Cheerful regards, Mike

NEC Remote.jpg 24-Key IR Remote.png
NEC Protocol.png
 

Visitor

Well-Known Member
All of these remotes must come out of the same factory. It would be nice if they would use some different device codes.

Merida is a nice place. One thing I don't know if I could ever adjust to.... sunrise is about 6am year round, and sunset 6pm, with virtually no twilight. It's almost like a switch is flipped to turn the sun on or off.
 

granddad

Well-Known Member
The 'black' IR TX is / was avaiable here in UK , with a receiver LED module , works well with a 'fast' PIC24

Edit 2.99 GBP on Amazon
 

Mike - K8LH

Well-Known Member
Just found these 44-key units and ordered a couple to play with. Dimensions are approximately 4.9" by 2.2".

It might be kind of fun to design and print a calculator key overlay and hook everything up to an 8-pin PIC using 1 pin for an IR Receiver and 2 pins for a little I2C OLED display.

44-Key IR Remote.png
 
Last edited:

Visitor

Well-Known Member
Today, I worked on an idea for one of these remotes in earnest. While we're in Mexico, we're using a Chromecast with Google TV and a VPN router to watch TV from home, but AT&T TV won't work on it, and the app won't cast recorded programs. To get around this, we use HDMI from the laptop to the TV, which works ok, but controlling playback from the computer is awkward.

To make this a little easier (and as a good excuse to spend some time learning Arduino code mostly), I had an idea. I'm using a Seeed Xiao (Seeeduino), which uses a SAMD21G18 microcontroller featuring a full USB interface. That means it can act as a USB HID keyboard to the laptop. I can decode IR remote signals, and feed them into the laptop as if keys were pressed on the keyboard. I have control over media keys (volume, mute, forward and rewind, pause/play, and the all-important F11 key to go to full screen display).

I took kind of a generic approach to decoding the IR remotes. Since these all seem to have the same device and keycodes, I decode them as keys 1 - 21, with adjustable delay to prevent triggering multiple times on a single button press, and set the key actions in a separate section. The desired keys send out the HID keycode for the desired actions.

This is one of my first major Arduino programs and a good learning experience. Lots of little syntax problems along the way and other problems, but nothing a little head scratching (or banging!), lots of Googling and some perseverance solved all the issues and I'm pretty happy with the results. I have a couple more keycodes to figure out and maybe some more buttons to add once I have a chance to test out the functionality.

The Seeed Xiao is an interesting platform for $5, but I'm not sure I can recommend it at this time. It has a few quirks and some reliability issues, like losing its bootloader, requiring a JTAG programmer to fix. One of the two I have here starting having problems being recognized by the USB port, but I'm hoping it's a temporary thing.
 

JimB

Super Moderator
Most Helpful Member
One thing I don't know if I could ever adjust to.... sunrise is about 6am year round, and sunset 6pm, with virtually no twilight. It's almost like a switch is flipped to turn the sun on or off.
That is something which was very noticeable to me on my trips to equatorial places like Malaysia and Singapore, the day/night transition is very quick compared with northern Scotland.

JimB

Thread_Drift=OFF;
 

Nigel Goodwin

Super Moderator
Most Helpful Member
That is something which was very noticeable to me on my trips to equatorial places like Malaysia and Singapore, the day/night transition is very quick compared with northern Scotland.

JimB

Thread_Drift=OFF;
Do you get daylight in Northern Scotland? :D

I've only been to Scotland once, in January - and the weather was absolutely lovely - while we were there for work, we did a bit of sight seeing, and went to visit the Kelpies, it was a beautiful sunny day. Mind you, in the same few days we did have heavy snow over night.
 

Visitor

Well-Known Member
I'm starting to envision a lot of possibilities for the Seeed Xiao as an HID keyboard device.

I can add shortcuts to launch apps remotely, so the IR remote could enable full media player functionality. If you use the remote to launch the various media apps, you could then customize what pressing each button sends to match the app in use.

Using a keypad instead, it could be used to launch design apps and send a series of keystrokes for some of those operations you have to do all the time. Say, create a new schematic, set the desired page size, place some standard text and set some custom parameters.

Nothing earth-shattering or new, but pretty awesome for less than ten bucks of hardware.
 

Visitor

Well-Known Member
I went to the one other electronics store in Merida today that I hadn't visited yet. Unlike the other two, this store doesn't have their entire inventory listed on their web page, so I just went to look with nothing particular in mind. They had many things in a display case, and much more to ask for if language wasn't a barrier.

One thing I did get was a remote control for an LED strip; the remote is in the identical package to the other two I got and I wanted to see if the IR codes were the same. Remember, this was in a display case, in an antistatic bag, so I didn't notice all the important details.

CM210217-213241002.jpg

I loaded the IR reader program and verified it was working with one of the original remotes. But pressing the button on the new control did nothing. Maybe the battery was dead I thought, so I swapped the pullout battery trays between controls (identically the same part, supporting the conclusion they come out of one factory). Still nothing.

I used the camera on my phone to see the IR pulses from the first control; yep, I could see pale blue flashes. Pointed the new remote at the camera....and the LED is RED. Yes, it's an RF remote, not IR. Oops. It did come with a control module for an LED strip, so it will find some use.

And yes, you probably noticed the "RF Remote" label on the control ;)
 

billybob

Active Member
This reminds me off a time when I created a little infrared jammer to mess with my brothers remote controlled LED multicolor lamp. It was hilarious! The look of pure frustration!
 

Visitor

Well-Known Member
Way before your time, the movie "Grumpy Old Men" was about two curmudgeonly next door neighbor frienemies. Whenever the one saw his neighbor turn on the TV, he'd rush to the window with his remote and mess with the TV.
 

billybob

Active Member
Way before your time, the movie "Grumpy Old Men" was about two curmudgeonly next door neighbor frienemies. Whenever the one saw his neighbor turn on the TV, he'd rush to the window with his remote and mess with the TV.
I love that movie! XD
 

gophert

Well-Known Member
Most Helpful Member
Re-branding ?
Grumpy-Electro-Tech-Old-Men-Online.com

( Can I be president )
I can't imagine any of the other grumpy old men just letting you call dibs on president. As Chairman of the Board, I'll advise you to hold a vote on the president role.
 

Musicmanager

Active Member
On a slightly different note .. .. .. .

Some years ago, early 80s I think, my best friend at the time, having inherited a significant sum from an elderly relative, had decided on a new car. He was not married and still lived with his parents, so having little commitments he splashed out on one of the first Renault 5 Turbo's, which I think was the car for any self-respecting hip to be seen in at the time. He went the whole hog with leather upholstery, Mother of Pearl white paintwork, a worthy sound system and a top of the range alarm security system.
He had made a prior arrangement to come to us for his dinner, which not surprisingly was on the day he collected the vehicle, having waited some months for delivery, so that he could show off his new toy.
His dismay was profound, boisterous in fact, when he discovered that the number '3' button on our TV remote activated or de-activated his new car alarm .. ..

MM
 

gophert

Well-Known Member
Most Helpful Member
Renault... and....
the number '3' button on our TV remote activated or de-activated his new car alarm .. ..
And yet another example why the world's "Silicon Valley" and cradle of innovation is so far from the Loire Valley.
 

Latest threads

EE World Online Articles

Loading
Top