Bluetooth Keyboard Mouse Adapter

55K25535

Intro: Bluetooth Keyboard Mouse Adapter

Hey! This week's build is the Minion Bluetooth Keyboard Mouse Adapter!

Plug in a standard keyboard or mouse and we'll be able to use them as a Bluetooth keyboard or mouse.

It's also NFC enabled so we can directly tap to pair with a mobile device.

So whether you're looking to turn your mobile device into a workstation or simply want to dominate in mobile games, this project will bring you the gratification of using desktop peripherals in your mobile computing life.

STEP 1: Watch the Video!


Check out this quick video to see the device working and for a run-through of all the steps below from start to finish.

Click here to watch on YouTube

Where to buy

Soldering gear:

Testing gear:

STEP 2: What's Inside?

We'll be using an Arduino Nano to receive keyboard and mouse signals from a PS/2 port.

These signals then get translated to Bluetooth signals, which are sent to our Bluetooth HID module.

The Bluetooth module I'll be using is an HC-05 with RN-42 HID firmware (see my other Instructable on how to flash an HID firmware onto the HC-05).

Other HID modules like the RN-42 HID, BlueSMiRF HID, or BlueFruit EZKey can be used as well.

We'll also be writing to an NFC tag inside the toy to enable "tap to pair" with NFC enabled mobile devices.

---

STEP 3: Disassemble the Victim

Disassemble our minion toy, or your victim of choice!

STEP 4: Attach the PS/2 Port

We'll start with the PS/2 female port. We can salvage these from old motherboards.

To communicate with the keyboard and mouse, we need to access 8 pins of the port - 4 mouse pins and 4 keyboard pins (clock, data, Vcc, and ground pins).

Take a strip of ribbon cable and solder that to the 8 pins we need (refer to diagram above).

Trace out the shape of the PS/2 port on the toy and cut it out with our plastic cutting tool (an Xacto blade attached to a soldering iron).

Then hot glue the port firmly in place.

STEP 5: Attach Our Power Port

We'll be using the modular power cube to supply a regulated 5V through a USB jack to power the Arduino.

So take a female USB port, and attach wires to the positive and negative terminals.

Then trace and cut out the shape of the port on the bottom of our toy.

Hot glue the port firmly in place.

Alternatively, we can power the Arduino with batteries (for example, a single 9V or 4 AA batteries).

STEP 6: Configure the Bluetooth Module

The Bluetooth module I'm using is the HC-05, flashed with the firmware of the RN-42. So it will configure the way an RN-42 does.

We'll need to enter the command mode of the Bluetooth module using the Arduino.

Download and upload the following program to the Arduino:

https://github.com/evankale/RN42Config

This program establishes a software serial communication channel on digital pins D2 and D3 using a baud rate of 9600.

After the program has been uploaded, follow the schematic diagram to connect the Bluetooth module with the Arduino.

Then plug in the Arduino to the computer and enter the following commands into the serial monitor:

  • $$$ (puts the Bluetooth module in command mode; the status LED will blink rapidly in this mode)
  • SF,1 (factory settings reset)
  • S~,6 (set HID mode)
  • SN,<name> (sets the device name to <name>)
  • SH,0230 (sets the device type to keyboard/mouse combo device)
  • R,1 (reboot the Bluetooth module)

STEP 7: Upload the Program

After we have the Bluetooth module configured, we can overwrite the Arduino's program with the program that will take the PS/2 signals and send them out to the Bluetooth chip.

Plug in the Arduino by itself, then download the following program and upload it to the Arduino:

https://github.com/evankale/ArduinoBTPS2

STEP 8: Wire Up the Components

Follow the schematic diagram to connect the PS/2 port, Bluetooth module, and power port to the Arduino.

Plug in a keyboard and mouse to the PS/2 port and connect to the Bluetooth module with a Bluetooth enabled mobile device. Ensure that both the keyboard and mouse functions before we close up the device.

STEP 9: Close Up the Device

Now we have to fit all the components inside the toy. I removed some extra support pieces inside the toy to make room for the chips. I also removed the breakout legs on the Bluetooth chip so that the Bluetooth module can stack together with the Arduino.

Tape up the USB port of the Arduino Nano with electrical tape - this will prevent the port from shorting with the positive terminal of the power port.

Take an NFC writable tag and place it inside the head of the toy.

Close it up!

STEP 10: Power It Up

Plug in our power cube (or batteries), and turn it on!

The LEDs on the Arduino and Bluetooth chip will light up the toy with a satisfying (or eerie) glow.

STEP 11: Write to the NFC Tag

To enable the NFC "tap to pair" feature, we'll have to write data to the NFC tag we put inside the toy.

First connect to our Bluetooth device on a smartphone.

Then download and open an NFC tag writer app (like NFC TagWriter by NXP).

Select a new Bluetooth dataset, and select our Bluetooth device.

Hold the phone near the NFC tag to write the dataset to the tag.

When that's complete, we will be able to tap to connect and tap again to disconnect with the device.

STEP 12: Give It a Test!

Plug in a keyboard and mouse and give it a try!

With a standard keyboard and mouse we can turn any tablet into a somewhat productive workstation.

And with apps like AIDE (for Android), you can even comfortably do Android development inside an Android device.

---

That's all I have for you today!

If you liked this Instructable, then perhaps you'll like some of my other projects!

You can check them out over at my YouTube channel.

New projects every Thursday! See you next week!

23 Comments

the pinout in step 4 is incorrect, 5v should be directly across from ground, as it is in step 8 drawings.
Hi, i have digital tablet Gaomon1060pro. Can i connect it which that device to make it wireless
Hi to all

Some one can help me with this project , i make the circuit and i uploaded the program , but my keybord and mouse dont work at all, my phone is pair-ed with the bluetouth module , i check the circuit again and again and i dont find any isue, please help me!!!
TX
Hey!! I just want to make a simple switch which just change next song in androide mobile phone.. i have arduino and bluetooth hc05 or bluetooth hm10 module.. so how to i make this can u help me please. ??
very funny :) and amazing, thank you..
Hi I have a radio scanner that uses my serial 9pin D to control it. Would this work for me to have a wireless link to my radio scanner??
Thanks
hi evan kale!
How to do with Usb ports?
whey it is not works?
Think you need to add an usb shield to it because the Arduino nano doesn't support USB host protocol. I would like an USB version also but can't make it without help

TheHi, dear friend, I would like to connect a usb keyboard, to the bluetooth, is it possible?

Hey does anyone jnow how I could do this with a bluesmirf instead

Finally, a concise and easily understood method of converting wired mice to bluetooth! Thank you for posting this. I look forward to implementing it inside of a logitech trackball that I have wanted to have as bluetooth for some time now.

You To, I'm wondering if I can do this with my unifying receiver and gain back 1 out of 2 USB ports on my laptop.

so friend

u need only 5 pins to make it work

why not use attiny ??? its really little sized chip

attiny85 will be enough for this code

I was just thinking I should probably add a note on USB to PS2 compatibility.

a lot of devices still have code in them ( Because space is cheap these days ) that fallback to PS2 commands if they cannot negotiate USB communications. so it would be possible to use a usb to PS2 adapter. however it is unclear exactly how many devices still have this code in them, so that favorite keyboard or mouse may not work. However I don't see it being that hard theoretically ( I have never programmed more then basic AppleScript ) to code the difference for USB communications.

What a coooool project !!!
It's really awesome

More Comments