Project tutorial

A Pocket-Sized Touch Keyboard © GPL3+

A small, Arduino-based physical device that can perform different keyboard operations through capacitive touch sensing.

  • 3,259 views
  • 3 comments
  • 12 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

It is a small, Arduino-based physical device that can be used to simplify your various keyboard operations. You plug it into your computer's USB port and touch on the capacitive touch sensor. The touch sensor is completely made from scratch, and you can use any metallic objects such as foil, coins, etc. (This works based on the Arduino capacitive sensing library.)

The brain of this project is an Arduino Micro.

Arduino Micro is the smallest board of the family, easy to integrate it in everyday objects to make them interactive. The Micro is based on the ATmega32U4 microcontroller featuring a built-in USB which makes the Micro recognizable as a mouse or keyboard.

The Micro is a microcontroller board based on the ATmega32U4. It has 20 digital input/output pins (of which 7 can be used as PWM outputs and 12 as analog inputs), a 16 MHz crystal oscillator, a micro USB connection, an ICSP header, and a reset button. It contains everything needed to support the micro controller; simply connect it to a computer with a micro USB cable to get started. It has a form factor that enables it to be easily placed on a breadboard.

Follow the link below to learn more about the board.

Arduino Micro

Note:

you can use only the boards which use ATmega32U4 such as Arduino Leonardo, Leonardo ETH etc.

Circuit diagram:

Soldering:

Solder the components as per the circuit diagram.

Working:

The Micro is based on the ATmega32U4 microcontroller featuring a built-in USB which makes the Micro recognisable as a mouse or keyboard.

Instead of switches/buttons I decided to add some cool feature to my project, So I used arduino capacitive sensing library to use any metalic object as touch sensor.

The capacitiveSensor library turns two or more Arduino pins into a capacitive sensor, which can sense the electrical capacitance of the human body. All the sensor setup requires is a medium to high value resistor and a piece of wire and a small (to large) piece of aluminum foil on the end.

To know more about how capacitive touch works follow the below link: Capacitive sensing

Pre-requirements:

You need to install capacitive sensing library if you have not installed yet.

You can download this library from here.

Uploading code:

  • Launch Arduino IDE
  • Select board
  • Select port
  • Upload your code

What else you can do with it:

The code which I have given in the description(to simplify your sign in) is an example that you can do with it.

You can do more keyboard functions with small modification in the code.

Refer below links to add more keyboard functions

     Keyboard.write(ASCII character);

For example to perform space bar operation use following code

Keyboard.write(32); //performs space bar operation

Thank youso much for reading if you need any more information feel free to ask in comments,and I'll do my best answer you.

Code

capacitive touch login device -arduino codeArduino
it is an example that shows what you can do with it.This code can be used to simplify your login process.
Every keyboard function can be added to the board.
#include <CapacitiveSensor.h>
#include <Keyboard.h>

CapacitiveSensor   cs_2_4 = CapacitiveSensor(2,4); // 1M resistor between pins 2 & 4, pin 4 is sensor pin, add any metallic object such as foil ,coin etc..


void setup()                    
{
   cs_2_4.set_CS_AutocaL_Millis(0xFFFFFFFF);// turn off autocalibrate on channel 1 - just as an example
   Serial.begin(9600);
    Keyboard.begin();
   
}

void loop()                    
  {
 long sensor1 =  cs_2_4.capacitiveSensor(50);
 
   if(sensor1 >= 1000)
   {
  
  Keyboard.print("p@ssW0rD");      //Enter your password here
    Keyboard.press(KEY_RETURN); //Enter key
    delay(150);
    Keyboard.releaseAll();
    }
  }

Schematics

Circuit diagram
A pocket sized logon device bb r2nq9oqttc

Comments

Similar projects you might like

CPU and RAM Usage Monitor (Windows & Linux)

Project showcase by thesahilsaluja

  • 4,881 views
  • 17 comments
  • 14 respects

TFT Graphing: Live History Graphs

Project tutorial by Andrei Florian

  • 942 views
  • 3 comments
  • 12 respects

AWS - Arduino Weather Station

Project tutorial by GilettaStefano

  • 7,339 views
  • 11 comments
  • 27 respects

Arduino Sunflower: An Electronic Sun-Dancer

Project tutorial by SURYATEJA

  • 3,831 views
  • 2 comments
  • 12 respects

Backpack Alarm

Project tutorial by Tomi Chen

  • 3,182 views
  • 12 comments
  • 31 respects

HUD Alarm Clock

Project in progress by Chukwuemeka Ike

  • 200 views
  • 0 comments
  • 1 respect
Add projectSign up / Login