Introduction: Engineers Buddy Bluetooth Kbd and Mouse.
This USB keyboard and mouse emulator gives your Android device control over all HID compliant devices* even before the OS loads at boot level. No more carrying a USB keyboard on site for work with kiosk systems, tills etc.
Just carry this handy little device, with it's blue-tooth connection to your Android phone/tablet (running the Engineers Buddy Kbd/Mouse app), and you always have your own keyboard and track-pad type mouse with you. At just 10cm long and under 1.7oz (45g), it clips on to your keyring, belt loop, or just tucks neatly into a pocket.
! This device would also make an excellent macro player. Your app or any micro system can send keyboard commands without having to install anything on the client system. For instance, visitors to a venue or establishment could use an app to control systems there with dedicated buttons that performed specific tasks, thus limiting that users functionality to the app they have been provided with and providing a simple OS/system independent programming capability. :-)
* Should work with PC, MAC, Linux, some games consoles and Android devices (dependant upon power to the USB port) .
Step 1: Decide How to Build Your Engineers Buddy
There are several ways in which you may construct this device, based upon board types and encapsulation. The recommended method for general field use is the Engineers Buddy OEM board and reinforced USB stick shuttle pouch. This is based on the Teensy2 micro-controller and SPP-C BTM (Blue-Tooth Module). Alternative methods include Teensy2++, HC-06 BTM, and the use of LED lighting profile as the housing.
WHAT YOU WILL NEED
For all builds:-
The Arduino IDE installed on your PC. It is available for a variety of OS's here https://www.arduino.cc/en/Main/Software .
After installing the Arduino IDE you will also need to install the Teensyduino IDE, available here https://www.pjrc.com/teensy/td_download.html .
For all board work a soldering iron and some link wire will be required.
All builds will require a USB cable, 20cm long overall is the optimum length if using the shuttle pouch. The Teensy boards usually come with a suitable length USB A to Mini B cable.
To use the Engineers Buddy you will also need the Engineers Buddy Kbd/Mouse app installed on your Android phone/tablet, available from playstore using the following link
. It is not free so build your hardware before purchasing.
Required parts for the Engineers Buddy OEM board:-
1 micro-controller. Teensy2 . (The Teensy2++ is too long for use with the Shuttle pouch).
1 BTM. SPP_C or HC-06.
1 Double-Side Prototype FR-4 PCB Circuit Board 8 Size (30x70mm)
A small piece of insulating tape.
Required parts for the Engineers Buddy reinforced shuttle pouch:-
1 Dual USB shuttle carry bag available online.
163 x 38mm x (approx)0.5mm semi rigid plastic sheet. Ideally transparent, translucent or diffusing, some degree of opacity is desirable to view the power and connection LEDs. The material shown is Pacur Lenstar 60lpi lenticular sheet.
Required parts for the Engineers Buddy pocket stick:-
1 micro-controller. Teensy2 or Teensy2++ .
1 BTM. SPP_C or HC-06.
A suitable length of 23x10mm LED profile with end caps, preferably blank but not essential.
A length of insulating tape, tough enough to resist penetration by the soldered pins, or thin sheet plastic, to insulate the bottom of the aluminium profile.
Step 2: Construct Your Chosen Build.
EngineersBuddy OEM board.
! Note for advanced users. When connecting to the Engineers Buddy the BTM will appear on on your blue tooth device list as either HC-06 or BT04-A(SPP-C). It is possible to change this device name but should be done before proceeding, you will need to connect the BTM to a USB UART and use the Arduino IDE serial monitor function. !
Preparation:- Remove the pins from the BTM, which are invariably already fitted, leaving usable holes for re-soldering. The technique shown in illustration(1) involves cutting the pins below the bend, enabling removal of the plastic moulding they are mounted in. The pins can then be removed individually and a de-soldering tool used to clear the holes. If you don't have a de-soldering tool, stranded/braided wire can be used as a sponge.
You will also need to insulate the exposed conductive areas on the back of the micro-controller board, using a small piece of insulating tape, covering the outlined shaded area shown in illustration(2).
Assembly:- The FR-4 PCB Circuit Board is used as a backplane on which to mount the micro-processor and BTM. The link wires secure the boards to the backplane.
! All following co-ordinates relate to the markings on the backplane before it is inverted as shown in illustration(3 ) !
With the backplane supported at least 10mm above the bench top, pre-form and insert a link wire between M/04 and O/04 and another between M/05 and O/05, also between M/07 and Q/02, then another between M/06 and R/02. The stripped ends should protrude at least 5mm through the other side of the board, illustration(4). Solder all these link wires into place as shown in illustration(3).
Invert the backplane and lay it on the bench with the stripped ends of the link wires protruding upwards, ensuring they are straight and perpendicular to the backplane. The finished module should appear as shown in illustration(5). Locate the processor board onto the protruding link wires so that the power connections, VCC and GND align with the backplane connections O/04 and O/05 respectively , as identified on what is now the underside of the backplane. The other two wires, by default, should locate into the TX/RX pinouts on the processor board. Similarly locate the BTM onto the 4, in line, wire ends so that the VCC and GND connections align with the backplane connections M/04 and M/05 respectively. This will link the processor VCC to the BTM VCC and the processor GND to the BTM GND. The other link wires will now, by default, be located correctly. These will link the processor RXD(D2) to the BTM TXD and the processor TXD(D3) to the BTM RXD. With the assembly face up and the boards pressed flat against the backplane, solder all 8 populated holes. Drop 3 short bits of bare wire through the F1, R1 and B5 connections of the processor board so they rest on the bench and protruding above the processor enough to be soldered. Solder these connections on the upper side. They are fixings and purely structural. Trim all the protruding wires. Invert the module, ensuring the backplane is pressed firmly down on the processor and BTM boards, solder the other side of these pins.
The use of the backplane produces a robust module with scope for additional components and wiring for the developer, so the fixing pins in connections F1, R1 and B5 should used/located according to preference.
EngineersBuddy reinforced shuttle pouch.
Preparation:- Cut the semi rigid plastic reinforcing sheet to size, 163mm x 38mm, then fold so it becomes 81.5mm x 38mm as shown in illustration(6). Round off the corners at the fold.
Assembly:- Hold the folded end of the reinforcer so that it curves and becomes narrower than the pouch entrance and slide it, folded end first, into the side of the pouch with the manufacturers logo on the outside.
To insert the OEM board, squeeze the sides of the reinforced pouch at the entrance so they curve away from each other and slip the board between them, with the BTM going in first and the USB socket uppermost, illustration(7).
The USB cable should be stored in the other pouch with the plugs going in first to reduce stress on the plastic and ease removal, illustration(8).
EngineersBuddy pocket stick.
Preparation:- Calculate the length of profile required by adding the length of the processor to that of the BTM and the distance to the shoulder of the USB Mini B plug when inserted into the Teensy, see illustration (11). Cut the profile and cover together, then insulate the base of the inside of the profile with tape or thin plastic sheet. It should be tough enough to ensure the bottom of the soldered wires cannot penetrate it. Drill a suitable sized hole for the rounded section of the Mini B plug in one of the end caps, then split the bottom edge in the centre , see LED profile image in step(1).
Bend the pins on the BTM as shown in illustration(9).
Assembly:- Solder the bent pins into the Teensy board so as to link both boards' VCC and GND connections together, illustration(10), a Teensy2++ with an HC-06 BTM. This is a crude but effective way of mechanically and electrically connecting the boards together. Use link wires to connect the Teensy TX to the BTM RX and the Teensy RX to the BTM TX.
Twist the bottom of the drilled end cap, so as to open the slit at the bottom, to accommodate the USB cable. Then pull the circular section of the plug into the hole. Plug the USB cable into the processor and fit the end cap, complete with both boards, into the profile. Fit the other end cap. Glueing the end caps in is probably prudent. Securing the boards into the bottom of the profile with a sticky pad or two is optional rather than essential. Fit the profile cover.
Step 3: Program Your Engineers Buddy
To program the Teensy access to the loader button on the board will be required.
The image above shows the compiler with the Tools menu and board selection dropped down and the Teensy loader module in the top right hand corner. The top 14 lines of the sketch in the editor are partially shown in the background.
Run the IDE. Start a new project, choose any name you want. In the editor screen delete anything below the project name. Download the sketch file below, 'TeensySketch.txt'. Open with a basic text viewer such as notepad, word processors use hidden formatting which the compiler will not understand. The content of the file should be cut and pasted into the IDE editor. First, use the tools menu to select the correct board type, Teensy 2 or Teensy2++. Ensure that the USB type is set to 'Keyboard+Mouse+Joystick' as in the illustration. UK/US keyboard layout is controlled from the app, so keyboard layout in the compiler must be set to 'United Kingdom' for this to work. With the Teensy connected to your computer, click on the arrow immediately beneath 'Edit' in the illustration. This will compile the sketch and may automatically upload it. If this does not happen automatically then press the button on the Teensy board or click 'Auto' in the Teensy loader module. When the compiler reports 'Done uploading' the process is complete.
Step 4: How to Use the Engineers Buddy Kbd/Mouse App.
Download the app from here
Firstly, ensure that your Engineers Buddy hardware is connected to the computer that you are working with. The Engineers Buddy processor board LED should illuminate and the BTM LED should flash. On first use, use your phone/tablet to pair with it. If it is an SPP-C then BT04-A will be the device name that is found during the device search. The HC-06 will be identified as HC-06.
When you open the app you will be presented with the keyboard layout in illustration(1). It will always be necessary to press the 'key' in the top left corner with the bluetooth symbol on it. This will bring up the available paired devices list as shown in illustration(2). In that illustration there is only one device listed and the SPP-C module has been configured to identify itself as Engineers Buddy. Tap on the device in the listing to connect. The app will, after a brief period, return to the keyboard layout. If the connection failed an error report will be displayed, just try again. It will usually connect first time, it has done so if it returns to the keyboard layout without reporting a failure.
You may now use the app to control your device. Most keyboard functions replicate a normal keyboard but some keys lock without being 'held' so that 'CTRL+ALT+DEL' can be invoked sequentially with one hand. Tapping any of these keys a second time releases them. In the bottom left hand corner there is a key displaying a mouse icon, illustration(1). Tap this to invoke the trackpad style mouse function. When the shift key is pressed this becomes the UK/US keyboard layout selector. It displays the current setting as a flag, illustrations (3) & (4), tap flag to change.
When in trackpad/mouse mode, illustration(5), all usual trackpad functions are supported. Tapping anywhere on the pad is the equivalent of a left click, which is also available using the top left key with the mouse icon. Right click is achieved by clicking the key on the top right. 'Holding' either left or right mouse buttons is achieved by tapping the relevant key with both a mouse and padlock icon, illustration(6). Tap again to release.
There is a settings key which allows adjustment of the mouse response. A mouse icon associated with a speedometer icon offers 'slow', 'medium' and 'fast' response, illustration(7). A tick indicates the current setting. Tap desired setting to change.
The keyboard icon, illustration(5), will return the app to the keyboard layout.