Control PC Wirelessly With Eye Blinking ;)

11,514

102

36

Introduction: Control PC Wirelessly With Eye Blinking ;)

What about going beyond your habits?? What about trying something new??!!!!

What about controling your PC and doing anything that you want WITHOUT using your keyboard and mouse!

Hmm... But how is this possible???

With just a blink of your Eye!! Don't believe it???

Ok, so just keep reading and you will found out how can this happen!!;)

Step 1: Materials: What You Will Need

Step 2: Bluetooth AT Mode & Commands

For this process I am using an Arduino Uno board

1. Connect GND and Vcc of Bluetooth module to GND and 5V of Arduino board respectively.

2. Push the button on HC-05 Bluetooth and while you keep it pressed, plug the Arduino to your PC. You will see the led on Bluetooth module blinking with interval of 2 seconds which means that you have entered AT mode.

3.Open Arduino IDE and Upload an empty sketch to the Arduino Board.

4. Connect Rx and Tx of Bluetooth module to Rx(pin0) and Tx(pin1) of Arduino board respectively.

Important: When uploading a sketch, remove Rx and Tx connections and plug them back again to their positions after uploading is Done!

HC-05 -> Arduino

Vcc -> 5V

GND -> GND

Rx -> Rx (pin 0)

Tx -> Tx (pin1)

All the connections are shown in the image.

5. HC 05 Bluetooth module needs a Carriage Return & Line Feed after each command.

So open, Serial Monitor and select “Both NL & CR” and 38400 baud.

Type in: AT and then click Send.

Now you should get an OK as a response meaning that you have successfully entered in AT Commands!

Step 3: AT Commands for SLAVE Module

1. Type in AT+NAME? to see the name of the module.

You can change it as you like, by typing for example: AT+NAME=SLAVE

2. In order to see the password type in AT+PSWD? (default is: 1234)

3. Type in AT+ROLE=0 to make it slave

4. Type in AT+ADDR=? to get its address. You must know the address of this module in order to PAIR it with another.

Note that the address will look similar to that: :21:13:19E8

5. Unplug it from the PC to exit from AT mode.

Note: The address can also be found at Bluetooth devices, add device, right click on SLAVE (the name of Bluetooth),Properties, Bluetooth -> Unique Identifier.

Step 4: AT Commands for Master Module

1. Type in AT+NAME? to see the name of the module.

You can change it as you like, by typing for example: AT+NAME=MASTER

2. In order to see the password type in AT+PSWD? (default is: 1234)

3. Type in AT+ROLE=1 to make it master

4. Type in AT+CMODE=0 to make the module to connect to a specified Bluetooth address.

5. Type in AT+BIND= 0021,13,0109E8 (put here the address of your slave module) to pair it with the slave module.

Note: In AT Commands the colons should be replaced with commas and also that the full address of this

”:21:13:19E8 ” is “ 00:21:13:01:09:e8” because “0” are omitted at the beginnings.

Step 5: Arduino Micro Connections

Make the connections as shown in the image:

HC-05 -> Arduino

Vcc -> 5V

GND -> GND

Tx -> pin 11

Potentiometer -> Arduino

V -> 5V

GND -> GND

Input pin -> pin A2

Upload the following sketch:

Important: When uploading a sketch, remove Rx and Tx connections and plug them back again to their positions after uploading is Done!

Step 6: Arduino Nano Connections

Make the connections as shown in the image:

HC-05 -> Arduino

Vcc -> 5V

GND -> GND

Tx -> pin 10

Rx -> pin 11

QRE1113 -> Arduino

VCC -> 5V

GND -> GND

OUT -> pin A0

Battery -> Arduino

9V -> Toggle switch

GND -> GND

Toggle Switch -> Arduino

V -> Vin

Upload the following sketch:

Step 7: Adjustments

Congratulations! You have completed the most demanding part! ;) :)

Now time for adjustmentsssss!

1.Connect Arduino Micro to your Pc. You will see the led on Bluetooth module blinking repeatedly.

2.Turn οn the switch on the Arduino Nano to power it up. After some seconds you will see both bluetooth modules flashing in the same way (one blink after 2 sec). This means that your Arduino boards are paired and can communicate to each other.

3.Open Arduino IDE. Select your board (Arduino Micro) and the appropriate COM port and open the Serial Plotter. You will see a plot with the measurements of the sensor and the value of potentiometer. With the blue color are the values from potentiometer (threshold) and with red the values from the sensor.

4. Remove the lens from the glasses so as to have only the frame.

5. Attach the Spark Fun line sensor to the frame in a position similar to the photos.

6.Put on the glasses and adjust the sensor to be next to your eye. By making some blinks with your eye you will notice some peaks in the graph of Serial Plotter. Adjust the value of potentiometer to be above the peaks and below the other values as shown in the image. Now you have successfully set your threshold!

Note: From the threshold adjustment you can also choose which kind of blinks ( intentional or unintentional ) you will accept. In this way you can fully control when the 'ENTER' command will be sent.


And...... Finally :D

The only thing you have to do now is just BLINK (close and open your eye) ;)

An "Enter" will be sent to your PC!!

Yes, but is there any way to write and do anything that I want without touching my PC???

Yeeaaahhh... Continue to the last part to see for yourself!! ;)

Step 8: 3D Printing Time!!! :D

This step is an optional step to give a more compact and portable feeling to this project!! ;)

You can experiment with yourself and create your own enclosures with any design that you like! Below you can find my designs, too!

For this project I used FDM process with PLA as material. PLA is a great option for low-cost and fast prototyping and comes in a large range of colors.

After 3D printing is completed you can use sand papers to make them smooth and nice and also you can paint them any color that you want!

That's all !!!! :D:D

Enjoy your new device and use LESS keyboard and mouse and MORE Eye Blinking ! ;)

Step 9: Control Your PC ;)

Now it's time to see it working!!!!

Please feel free to share with me any comments or suggestions that you have!!!

And don't forget......!!

DO MORE WITH EYE BLINKING !!! ;)

If you liked that project please vote it for the competitions! Thank you!

PS. For the video I used the On-Screen keyboard from windows that supports automatic scanning and scanbuddy software from ahf.

Remote Control Contest 2017

First Prize in the
Remote Control Contest 2017

Epilog Challenge 9

Participated in the
Epilog Challenge 9

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Be the First to Share

    Recommendations

    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    36 Discussions

    0
    kushs2022
    kushs2022

    10 months ago

    Is there any Substitute sensor of QRE1113 line sensor Which I can use For doing same work...?

    0
    AndreasLeve
    AndreasLeve

    Reply 10 months ago

    Hello! Yes there is! If you google " line sensor arduino ", you will find enough of them. ;)
    I chose the QRE1113 due to its very small size.

    0
    asadk44
    asadk44

    1 year ago

    wonderful project you have made, thanks for sharing, I want to know that how you control left click of mouse from eye blink ? it can't be done in setting of scanbuddy. I am making this project all things are fine , but I am struck in this part ?

    1
    AndreasLeve
    AndreasLeve

    Reply 11 months ago

    Hello, thank you very much for your comment! The left click is a little trickier.
    Maybe you can combine a second Bluetooth and sensor to control that.

    0
    asadk44
    asadk44

    Reply 11 months ago

    Is there anyway to control let click with one sensor only? and can we send left-click only instead of enter ? Can I make some changes in code to send left click instead of enter ? If yes, please let me know where to change in coding?

    0
    AndreasLeve
    AndreasLeve

    1 year ago

    Thanks for your comment!!!

    I used a software called scanbuddy from ahf.

    0
    asadk44
    asadk44

    Reply 1 year ago

    wonderful project you have made, thanks for sharing, I want to know that how you control left click of mouse from eye blink ? it can't be done in setting of scanbuddy. I am making this project all things are fine , but I am struck in this part ?

    0
    PreetamS8
    PreetamS8

    Reply 1 year ago

    Can i use Arduino Uno instad of Arduino micro

    0
    AndreasLeve
    AndreasLeve

    Reply 1 year ago

    Hello,

    No, because Micro is based on the ATmega32U4 microcontroller featuring a built-in USB which makes the Micro recognisable as a mouse or keyboard, whereas Uno doesn't have that.

    0
    PreetamS8
    PreetamS8

    Reply 1 year ago

    How we connect to one Bluetooth module to another Bluetooth module

    0
    PreetamS8
    PreetamS8

    Question 1 year ago

    How we connect one Bluetooth module to another Bluetooth module

    0
    windoz
    windoz

    2 years ago

    Honestly, I feel stupid when I see just how brilliant so many of the contrubutors are on here!!

    0
    NathanR124
    NathanR124

    Question 2 years ago

    Should've made a kickstarter
    ;)

    0
    AshishT62
    AshishT62

    Tip 2 years ago

    Amazing project and concept and very nice explaination!!! Since you are using very less pins of arduino you can replace arduino with ATTiny85 or other small micro-controller as arduino is an overkill for this project with small pin requirements. You may also use printed PCB or the one with copper dots to make the project compact instead of mini breadboards :)

    0
    AndreasLeve
    AndreasLeve

    Tip 2 years ago

    Dear Jfieldcap, thanks for your comment! It has been fixed!

    0
    Jfieldcap
    Jfieldcap

    Tip 2 years ago on Step 1

    Just a note: You mixed up the names for the Arduino Nano and Micro in your parts picture tags.

    0
    jared1883
    jared1883

    Question 2 years ago

    This project is awesome! What software did you use to draw the selection boxes on the computer screen? I see the arduino sketches but I don't see any software to cycle through the selections. Am I just missing it?

    0
    AndreasLeve
    AndreasLeve

    Answer 2 years ago

    Thank you very much for your comment!!! I am glad that you like it!
    I used a software called scanbuddy from ahf.