Posts with «remote» label

IR Translator Makes Truly Universal Remote

Universal remotes are a handy tool to have around if you have many devices that would all otherwise have their own remote controls. Merging them all into a single device leads to less clutter and less frustration, but they are often not truly “universal” as some of them may not support every infrared device that has ever been built. If you’re in a situation like that it’s possible to build a truly universal remote instead, provided you have a microcontroller and a few infrared LEDs on hand.

This was the situation that [Matt] found himself in when his Amazon Fire TV equipment control feature didn’t support his model of speakers. To get around this he programmed an Arduino to essentially translate the IR codes from the remote and output a compatible set of codes to the speakers.This requires both an IR photodiode and an IR LED but little else other than the codes for the remote and the equipment in question. With that all set up and programmed into the Aruino, [Matt]’s remote is one step closer to being truly “universal”.

While [Matt] was able to make use of existing codes in the Arduino library, it is also possible to capture the codes required manually by pointing a remote at a photodiode and programming a microcontroller to capture the codes that you need. [Matt] used a Raspberry Pi to do this when debugging this project, but we’ve also seen this method used with a similar build which uses an ESP8266 to control an air conditioner via its infrared remote control capabilities.

Universal Remote a Grove Infrared project


 
 

Description

This project will convert an ordinary Keyes infra-red (IR) remote
into a programmable universal remote.

 
A single button press on the Keyes remote will be converted into precise Sony IR signal combinations using an Arduino UNO and an assortment of Seeedstudio Grove modules.
You can assign signal combinations from more than one remote if desired.
An example combination could be to:
  • Turn on the TV and then switch channels.
  • Turn on the TV, sound system, and air-conditioner.
  • Turn up the volume x 3.
With only one button press of the Keyes remote, the entire cascade of Sony signals ensues. This project can be customised for other IR methodologies, however, you may have to modify the Arduino code to accommodate them.

 
 

Parts Required

  1. Arduino Uno (or compatible board)
  2. Grove Base Shield (v2)
  3. Grove Infrared Receiver
  4. Grove Infrared Emitter
  5. Grove Button
  6. Grove 16x2 LCD (White on Blue)
  7. Grove Universal 4 pin buckled cable: one supplied with each module.
  8. KEYES IR Remote Control
  9. SONY IR remote control
  10. USB cable - to power and program the Arduino
  11. Battery pack / Power bank

 
 

More information about the Grove modules can be found here:

**Please Note: The Grove Base shield has 14 pins on the Analog side, and 18 pins on the digital side. Check the number of pins on your Arduino UNO (or compatible board) to ensure the shield will sit nicely on top. NOT compatible with Arduino boards that have the Arduino Duemilanove pin header layout.

 
 

Arduino IDE

While there are many Arduino IDE alternatives out there, I would recommend that you use the official Arduino IDE for this project. I used the official Arduino IDE app (v1.8.5) for Windows 10.
Make sure to get the most up-to-date version for your operating system here.


 
 

Libraries required

The following libraries will be used in the Arduino code:

  1. Wire Library
  2. IRLib2 Library
  3. rgb_lcd Library

Wire Library

The Wire library is used for I2C communication for the Grove LCD screen and is built into the Arduino IDE - no additional download required for this library.
 

IRLib2 Library

The IRLib2 Library is actually a "set" of IR libraries, which can be downloaded from GitHub - here. In this project, I will be transmitting and receiving NEC and Sony IR remote signals.
The required libraries (within the set) will be:
  • IRLibRecv.h
  • IRLibDecodeBase.h
  • IRLibSendBase.h
  • IRLib_P01_NEC.h
  • IRLib_P02_Sony.h
  • IRLibCombo.h
Please see the IRLib2 GitHub Page for installation instructions.
 

rgb_lcd Library

The rgb_lcd.h library simplifies the operation of the LCD screen.
Download the rgb_lcd.h library from GitHub. Install the rgb_lcd.h library ZIP file into the Arduino IDE:
  1. Load the Arduino IDE
  2. Navigate to Sketch >Include library > Add .ZIP library...
  3. Select the downloaded zip file from GitHub, and press the "Open" button
  4. Check that it installed correctly by navigating to File > Examples > Grove-LCD RGB Backlight

 
 
 
 

Arduino Code

It is always best to upload the Arduino code to the board before you make any of the connections. This way you prevent the Arduino from sending current to a component accidentally. The code is available on my GitHub repository. Or you can have a look below. This code was written for an Arduino UNO, and may need to be modified if you are using a different board.

 
 
 
 

Connection instructions

If you are using the Grove Base Shield (v2). The connections are extremely simple. Use the following table as a guide. Please note that the code above assumes the following connections.
 

 

As per the table above, you would use a Grove universal 4-pin buckled cable and connect one side to D2 on the Grove base shield, and the other side would connect to the Grove Infrared Emitter.
D3 on the base shield would connect to the Grove Infrared Receiver, and so on.
You can connect the 16x2 LCD module to ANY of the four I2C connectors on the Grove base shield.

If you do not have a Grove Base shield, you have the option to use female-to-male jumper wires (together with a breadboard). But it is easier just to get the base shield and use the universal connectors.

 
 
 
 
 
 

Project Explained

When you apply power to the Arduino, the first thing that appears on the LCD screen is:
 


 
After pressing the Grove button (connected to D5), it displays the following message:
 

 
This is the cue to press and send a signal from the Keyes remote to the Infrared receiver (which is connected to D2). The Arduino will decode the Keyes remote signal, store the value in an array, and display the signal briefly on the LCD. The LCD should now show a message:
 

 
This message is a cue to press and send the FIRST signal from the Sony remote to the Infrared receiver. The Arduino will decode and store the Sony remote signal in a different array, and display it briefly on the LCD. You have the option to send a maximum of THREE Sony signal combinations to the Infrared receiver at this step in the process. The minimum number of Sony signals you can send is zero. The way to tell the Arduino that you do not want to send any further Sony signals to the receiver in this step, is by pressing the Grove Button (connected to D5).
 
The Arduino is programmed to receive a total of 5 Keyes signals, and each signal can be paired with a maximum of 3 Sony signal combinations. Once you have recorded all of the signal combinations, you will get a message:
 

 
The Arduino will now enter the final "Universal remote mode". In this mode, it will listen out for ANY of the 5 Keyes IR remote signals recorded previously, and will send the associated Sony signal combination in return. For example, if you press the number 1 on the Keyes remote, you could potentially have it so that the Arduino will transmit a Sony signal combination to turn on the TV and jump to a specific channnel.
 
The LCD will display each of the signals being transmitted. You will know you are in "Universal remote" mode because the LCD will display:
 

 
While you may be tempted to throw your Sony remote away at this stage (because you no longer have a use for it)... I would hold on to it just in case. The signals are not stored permanently. They disappear when the Arduino is powered off. But it doesn't have to be that way. You can easily modify the code to store it in eeprom memory or something.
 
That is not the only thing you can change.Technically, you could record the signal for any remote, however, you may need to include additional libraries or code to accommodate the alternate remote symbology. You can also modify the text messages on the LCD screen to make more sense to you. The LCD can only display 16 characters per row. So keep that it mind, when you come up with creative captions.
 
I would also like to mention the reason I chose not to use Seeedstudio's IR library, was because it took up too much memory. Their library probably accommodates for a wide range of symbologies. I chose the IRLib2 Library because I could select only the symbologies that I used (Sony and NEC). Thereby reducing the total amount of memory necessary to run the project. In fact, I have been finding that many of Seeedstudio's libraries to be very memory hungry. I originally wanted to create a gesture controlled remote. But the library combinations eliminated that possibility due to the cumulative memory requirements.
 
 
 
 

Conclusion

The IRLib2 library is the key to the success of this project. Without that library, this project would have been ten times harder. I was quite amazed by the effectiveness of this record / playback technique. It felt very weird to be operating my SONY TV with a cheap and nasty Keyes remote. It was quite surreal. While I chose to control my TV in this way, I could have just as easily recorded signals from one of my other remotes that use infrared signals. As more and more devices become controllable by remotes, the more I will consider turning this project into a permanent fixture in my house. A gesture controlled remote would have been nice, however, it looks like I will have to find some other use for that module now.

If you found this tutorial helpful, please consider supporting me by buying me a virtual coffee/beer.

$3.00 AUD only
 

Social Media

You can find me on various social networks:

Follow me on Twitter: ScottC @ArduinoBasics.
I can also be found on Instagram, Pinterest, and YouTube.
And if all else fails, I have a server on Discord.



             

High-Effort Streaming Remote for Low-Effort Bingeing

There’s no limit to the amount of work some people will put into avoiding work. For instance, why bother to get up from your YouTube-induced vegetative state to adjust the volume when you can design and build a remote to do it for you?

Loath to interrupt his PC streaming binge sessions, [miroslavus] decided to take matters into his own hands. When a commercially available wireless keyboard proved simultaneously overkill for the job and comically non-ergonomic, he decided to build a custom streaming remote. His recent microswitch encoder is prominently featured and provides scrolling control for volume and menu functions, and dedicated buttons are provided for play controls. The device reconfigures at the click of a switch to support Netflix, which like YouTube is controlled by sending keystrokes to the PC through a matching receiver. It’s a really thoughtful design, and we’re sure the effort [miroslavus] put into this will be well worth the dozens of calories it’ll save in the coming years.

A 3D-printed DIY remote is neat, but don’t forget that printing can also save a dog-chewed remote and win the Repairs You Can Print contest.

Hackaday Prize Entry: Safety Glasses Are Also Hands-Free Multimeter

It seems like the multimeter is never easy to see during a project. Whether it’s troubleshooting a vehicle’s electrical system and awkwardly balancing the meter on some vacuum lines and the intake manifold, or installing a new solar panel and hoping the meter doesn’t fall on the ground while the leads are in both hands, it seems like there’s never a good way to see the meter while actually using it. Some meters have a small magnet and strap that can be used to hang them temporarily, but this will only get you so far.

[Alain Mauer]’s entry into the Hackaday Prize looks to solve this glaring problem. Using a heads-up Bluetooth display mounted to a pair of safety glasses, a multimeter can be connected to the device in order to display its information directly to its user. Based on his original idea which used a normal pair of prescription glasses as its foundation, [Alain]’s goal is to reduce safety hazards that might arise when using a multimeter in an awkward or dangerous manner that might not otherwise be possible.

The device uses an Arduino Pro Micro to connect to the multimeter and drive the display. [Alain] notes that the real challenge is with the optical system, however. Either way though, this would be a welcome addition to any lab, workspace, or electrician’s toolbox. Be sure to check out the video of it in action after the break.


Filed under: The Hackaday Prize, tool hacks

Arduino Lighting Controller With Remote Twist

The time for putting up festive lights all around your house is nigh, and this is a very popular time for those of us who use the holiday season as an excuse to buy a few WiFi chips and Arduinos to automate all of our decorations. The latest in this great tradition is [Real Time Logic]’s cloud-based Christmas light setup.

In order to give public access to the Christmas light setup, a ESP8266 WiFi Four Relay board was configured with NodeMCU. This allows for four channels for lights, which are controlled through the Light Controller Server software. Once this is setup through a domain, all anyone has to do to change the lighting display is open up a web browser and head to the website. The creators had homeowners, restaurants, and church displays in mind, but it’s not too big of a leap to see how this could get some non-holiday use as well.

The holidays are a great time to get into the hacking spirit. From laser-projected lighting displays to drunk, animatronic Santas, there’s almost no end to the holiday fun, and you’ve still got a week! (Or 53!)


Filed under: Holiday Hacks
Hack a Day 16 Dec 03:00

raspberry + arduino / webiopi + firmata (python)

Im buildin internet controlled rc car with arduino, arduino motor shield and raspberry.
So how to use firmata and webiopi at the same time.

read more

Hack Your Cat’s Brain to Hunt For Food

This cat feeder project by [Ben Millam] is fascinating. It all started when he read about a possible explanation for why house cats seem to needlessly explore the same areas around the home. One possibility is that the cat is practicing its mobile hunting skills. The cat is sniffing around, hoping to startle its prey and catch something for dinner. Unfortunately, house cats don’t often get to fulfill this primal desire. [Ben] thought about this problem and came up with a very interesting solution. One that involves hacking an electronic cat feeder, and also hacking his cat’s brain.

First thing’s first. Click past the break to take a look at the demo video and watch [Ben’s] cat hunt for prey. Then watch in amazement as the cat carries its bounty back to the cat feeder to exchange it for some real food.

[Ben] first thought about hiding bowls of food around the house for his cat to find, but he quickly dismissed this idea after imagining the future trails of ants he would have to deal with. He instead thought it would be better to hide some other object. An object that wouldn’t attract pests and also wouldn’t turn rancid over time. The problem is his cat would have to know to first retrieve the object, then return it to a specific place in order to receive food as a reward. That’s where the cat hacking comes in.

[Ben] started out by training his cat using the clicker method. After all, if the cat couldn’t be trained there was no use in building an elaborate feeding mechanism. He trained the cat to perform two separate behaviors, one tiny bit at a time. The first behavior was to teach the cat to pick up the ball. This behavior was broken down into six micro behaviors that would slowly be chained together.

  • Look at the ball
  • Approach the ball
  • Sniff the ball
  • Bite the ball
  • Pick up the ball
  • Pick up the ball and hold it for a few seconds

[Ben] would press on the clicker and reward his cat immediately upon seeing the desired step of each behavior. Once the cat would perform that step regularly, the reward was removed and only given to the cat if the next step in the chain was performed. Eventually, the cat learned the entire chain of steps, leading to the desired behavior.

Next, [Ben] had to teach his cat about the target area. This was a separately trained behavior that was broken down into the following three steps.

  • Look at the target area
  • Approach the target area
  • Sniff the target area

Once the cat learned both of these behaviors, [Ben] had to somehow link them together. This part took a little bit of luck and a lot of persistence. [Ben] would place the ball near the target area, but not too close. Then, he would reward his cat only when the cat picked up the ball and started moving closer to the target area. There is some risk here that if the cat doesn’t move toward the target area at all, you risk extinguishing the old behaviors and they will have to be learned all over again. Luckily, [Ben’s] cat was smart enough to figure it out.

With the cat properly trained, it was time to build the cat feeder. [Ben] used an off-the-shelf electronic feeder called Super Feeder as the base for his project. The feeder is controlled by a relay that is hooked up to an Arduino. The Arduino is also connected to an RFID reader. Each plastic ball has an RFID tag inside it. When the cat places the ball into the target area, the reader detects the presence of the ball and triggers the relay for a few seconds. The system also includes a 315MHz wireless receiver and remote control. This allows [Ben] to manually dispense some cat food should the need arise.

Now whenever the cat is hungry, it can use those primal instincts to hunt for food instead of just having it freely handed over.

[Thanks Dan]


Filed under: home hacks
Hack a Day 08 Aug 18:00
315mhz  arduino  ball  behavior  brain  cat  clicker  control  feeder  food  home  home hacks  hunt  kitten  learn  psychology  remote  rfid  tag  teach  training  

Arduino And IR Remote Turn Off Raspberry Pi

With all of the cool features on the Raspberry Pi, it is somewhat notable that it lacks a power button. In a simple setup, the only way to cut power to the tiny computer is to physically remove the power cord. [Dalton63841] found that this was below his wife’s tolerance level for electronics, and built a simple remote control for his Raspberry Pi.

[Dalton63841] started this project by trying to use the UART TX pin, but this turned out to be a dead-end. He decided instead to use an Arduino to monitor the 3.3V power rail on the Pi. When the Pi is shut down in software, the Arduino can sense that the Pi isn’t on any more and disconnect the power. The remote control is used to turn the Pi on. The Arduino reads the IR code from a remote and simply powers up the Pi. This is a very simple and elegant solution that requires absolutely no software to be installed on the Raspberry Pi.

We know that this isn’t the most technically complex project we’ve ever featured, but it is a good beginner project for anyone just getting started with a Pi, Arduino, or using IR. Plus, this could be the perfect thing to pair up with a battery-backup Raspberry Pi shutdown device that allows it to power itself down in a controlled way when a power outage is sensed.


Filed under: Arduino Hacks

Controlling a Quadcopter with Gestures

[grassjelly] has been hard at work building a wearable device that uses gestures to control quadcopter motion. The goal of the project is to design a controller that allows the user to intuitively control the motion of a quadcopter. Based on the demonstration video below, we’d say they hit the nail on the head. The controller runs off an Arduino Pro Mini-5v powered by two small coin cell batteries. It contains an accelerometer and an ultrasonic distance sensor.

The controller allows the quadcopter to mimic the orientation of the user’s hand. The user holds their hand out in front of them, parallel to the floor. When the hand is tilted in any direction, the quadcopter copies the motion and will tilt the same way. The amount of pitch and roll is limited by software, likely preventing the user from over-correcting and crashing the machine. The user can also raise or lower their hand to control the altitude of the copter.

[grassjelly] has made all of the code and schematics available via github.


Filed under: Arduino Hacks, drone hacks

Arduino Selfie


 

My attention is drawn towards the noise behind me....
I cannot believe it.
There it is.

  The Arduino is taking a SELFIE !!


 

How did this happen?
 
Well actually, it is not that difficult for an Arduino.
 
I found out that my Canon Powershot SX50 HS camera has a port on the side for a remote switch. In the "Optional Accessories" section of the camera brochure, it identifies the remote switch model as RS-60E3. I then looked up the model number on this website to find out the size of the jack (3 core, 2.5mm), and the pinout (Ground, focus and shutter) required to emulate the remote switch. Once I had this information, I was able to solder some really long wires to the jack and connect up the circuit (as described below).
 

And before I knew it, the Arduino was taking Selfies !!!


 
Warning : Any circuit you build for your camera (including this one) is at your own risk. I will not take responsibility for any damage caused to any of your equipment.
 

Parts Required:


 

Fritzing Sketch


 


 
 

Connection Table


 


 
 

Three core, 2.5 mm jack


 


 
 

Camera Connection to Relays


 


 
 

Jack pinout


 


 
 

Completed Circuit


 


 
 

Arduino Sketch


 
  1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

/* ===============================================================
      Project: Arduino Selfie
       Author: Scott C
      Created: 14th Sept 2014
  Arduino IDE: 1.0.5
      Website: http://arduinobasics.blogspot.com/p/arduino-basics-projects-page.html
  Description: Arduino takes selfie every 30 seconds
================================================================== */

 /*
  Connect 5V on Arduino to VCC on Relay Module
  Connect GND on Arduino to GND on Relay Module */
 
 #define CH1 8   // Connect Digital Pin 8 on Arduino to CH1 on Relay Module
 #define CH3 7   // Connect Digital Pin 7 on Arduino to CH3 on Relay Module
 
 void setup(){
   //Setup all the Arduino Pins
   pinMode(CH1, OUTPUT);
   pinMode(CH3, OUTPUT);
   
   //Turn OFF any power to the Relay channels
   digitalWrite(CH1,LOW);
   digitalWrite(CH3,LOW);
   delay(2000); //Wait 2 seconds before starting sequence
 }
 
 void loop(){
   digitalWrite(CH1, HIGH); //Focus camera by switching Relay 1
   delay(2000);
   digitalWrite(CH1, LOW); //Stop focus
   delay(100);
   digitalWrite(CH3, HIGH); //Press shutter button for 0.5 seconds
   delay(500);
   digitalWrite(CH3,LOW); //Release shutter button
   delay(30000); //Wait 30 seconds before next selfie
 }


 

By connecting up the camera to an Arduino, the camera just got smarter !!
The Arduino connects to 2 different channels on the relay board in order to control the focus and the shutter of the camera. The relays are used to isolate the camera circuit from that of the Arduino. I have also included a couple of diodes and resistors in the circuit as an extra precaution, however they may not be needed.

Warning : Any circuit you build for your camera (including this one) is at your own risk. I will not take responsibility for any damage caused to any of your equipment. Do your research, and take any precautions you see fit.


 
 

The Video


 


 


 
 

If you like this page, please do me a favour and show your appreciation :

  Visit my ArduinoBasics Google + page.
Follow me on Twitter by looking for ScottC @ArduinoBasics.
Have a look at my videos on my YouTube channel.


 
 

 
 
 



However, if you do not have a google profile...
Feel free to share this page with your friends in any way you see fit.