Arduino IR switch

Hi, I am new to the arduino and in need of some advice/help.

My project is that i have a 10" tablet running Linux Ubuntu that will be mounted on my wall. Id like to have something where i wave in front of the screen and it turns the screen on, taking away the need of using the button on the top of the tablet so i am able to hide it (the button).

I have seen people's youtube videos where they have created a circuit where when they wave over the IR Receiver and emitter an LED flashes on. Is there some way of making it so it turns the screen on and then turns it off when i wave over it again?



One possibilty:

Use an arduino with a bluetooth module and proximity sensor (IR or ultrasound).
Then have the Arduino paired with the tablet over bluetooth.
You will also need to develop some application on the tablet or find an existing app that can be used.

A simple way to achieve that (for an Android tablet) without having to write a custom app for the tablet can be devices like bluetooth remotes:
search for "bluetooth remote android" on your favourite auction site!
You just need to tap into the switch on the remote => easy :slight_smile:

Of course it would be much easier to just use the bluetooth remote on its own, which would save you having to wave your hand and would work from anywhere in the room :slight_smile:

I am not sure if these devices support UBUNTU, but worth a search!
I am pretty sure you could use, re-purpose or hack a bluetooth keyboad or mouse to achieve the same thing on UBUNTU.

Hi AnalysIR

Thanks for the reply. The reason i need to be able to wave over the front is because im going to have the tablet mounted in a frame and mounted on the wall.

I am going to be having the JARVIS MVC System running so i can have "jarvis" do things around the house by voice but unfortunately "jarvis" cant search the internet yet so need to be able to turn the screen on and use this when needed. I can have "Jarvis" turn the screen on and off by voice command but for some reason he doesnt really like my wife's voice so every now and then doesnt listen to what she says lol. It is funny but not for her!

This is why i would like something simple like waving over the screen and it turn on and then waving back over the screen to turn the screen off again.

I found the code below to turn an LED on and off like this video

Can this be adapted to turn the screen on and off instead of an LED?


const int led1 = 13;
const int sensor = A0;

void setup() {
pinMode(led1, OUTPUT);

void loop() {
static boolean lastSensorHit = false;
static boolean LEDvalue = LOW;

int sensorValue = map(analogRead(sensor), 0, 1024, 0 , 200);
bool sensorHit = sensorValue > 50 && sensorValue <300;

if (sensorHit && !lastSensorHit) // Now true, was false
LEDvalue = !LEDvalue; // Toggle the LED
digitalWrite(led1, LEDvalue);
lastSensorHit = sensorHit;

Yes the sensor in the video looks like a sharp IR proximity sensor.

Its not too difficult to make your own, with Vishay proximity sensors.
TSSP77P38 (SMD = more discrete)

one of the above combined with a modulated IR LED/emiitter

(read datasheets)

Alternatively, if a high quality/pro finish is required you could get a commercial sensor used in WCs for water saving & auto flush mechanisms. There may be domestic version available also.

The finish is what would dictate the approach & if using IR you may need some physical shielding or recessed sensor to help limit the activation area.

Have you considered a mini PIR sensor. You can mask the inside of the lens to limit the area of activation - as long as your hand is not tooo cold :slight_smile:

another option would be to use a light touch switch or capacitive switch (could be hidden behind or integrated into a panel of some sort)

In summary, pick your preferred flavour and try it out.