Introduction: 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.
Where to buy
- PS2 jacks: http://amzn.to/2dPQ3lj
- Female USB jacks (instead of PS2): http://amzn.to/2dPQWu6
- HC-05: http://amzn.to/2dHlORJ
- Arduino Nano: http://amzn.to/2dHmB57
- NFC Tags: http://amzn.to/2cQGEIe
- Weller WES51 Analog Soldering Station: http://amzn.to/2dq7Q4m
- MG Chemicals Silver Solder: http://amzn.to/2dHj0nq
- Helping hand: http://amzn.to/2dc553O
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:
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:
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!
Paritosh_Sarker made it!
We have a be nice policy.
Please be positive and constructive.
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?