EZ-Keys+Project

=EZ-Keys Make & Take Project=

A Reference for Building an Accessibility Switch Bluetooth Interface Using the [|BlueFruit EZ-Key] Board
Bluetooth switch interfaces are used with PCs and iPads to receive switch input from accessibility switches. Some iPad apps have switch controls written in as part of the app. Apple iOS also has switch control built-in as part of the operating system, so that apps can be controlled by switch inputs even when the app developer did not write anything special into the app to use switch input.

Bluetooth switch interfaces work by providing HID codes (Human Interface Device - the standard for keyboard, mouse, and 'consumer reports' remote controls) to the PC or iPad. In other words, they respond to a switch activation by sending key presses (like a bluetooth keyboard would do) or mouse actions, or a 'consumer report' such as Play/Pause, or Volume Up/Down.

Any of these HID standard actions can be triggered by the [|BlueFruit EZ-Key] board made by [|Adafruit]

In this project, you'll make a 12-input bluetooth switch interface similar to the design used for a Make & Take meeting at the NorthEast Washington ESD May 6, 2015. The finished project will look like one of these:



Here are the parts:

@http://www.adafruit.com/product/1535 is the EZ-Key module itself (the most important part!!). @http://www.adafruit.com/products/903 is the box, or you could use any sturdy plastic lunch leftover box from the grocery store. @http://www.adafruit.com/products/793 these rainbow wire bundles fit the pins on the headers on the EZ-Key module - you cut the bundle in half, peel off one wire at a time, and solder onto the switch jacks. @http://www.amazon.com/gp/product/B00H8SWQAO/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1 are the battery holders. Adafruit used to stock these, but now they don't. I chose the 3 AA battery size because it fit the box and it was easy to use rechargeable AAs, since we use a lot of them in my district. The EZ-Key module can run off of anything 3-16V, so you have a lot of options here: http://www.adafruit.com/category/44 especially, if you use a bigger case. @http://www.allelectronics.com/make-a-store/item/mmj/3.5mm-mono-open-audio-phone-jack/1.html I bought a couple hundred of these 1/8" (also called 3.5MM) phone jacks - the standard connector for accessibility switches. For mass production, you'd probably want to go with a PC board and PC-mount jacks, because soldering these is the most time-consuming part of the project. @http://www.amazon.com/gp/product/B00B4TO6IS/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1 are unusually-super-skinny zipties to secure the EZ-Key module into the case. I ordered a bag of 100. Instead of these, you could carefully drill out the mounting holes on the EZ-Key module to use the regular 4" zip ties, or you can use twist-ties or florist wire to secure the module. You could use screws and standoffs and nuts, but it would be very fiddly, and it wouldn't work well in a sandwich box. @http://www.amazon.com/gp/product/B008DFVOWM/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1 I think this is the right shrink tube, but I just grabbed whatever fit the soldered terminals on the switch jacks. Shrink tube adds mechanical strength to the connection, as well as electrical insulation.

<span style="font-family: Tahoma,sans-serif;">Adafruit pre-programs the EZ-Keys modules <span style="background-color: #ffffff; font-family: 'Gotham SSm A','Gotham SSm B','Lucida Grande','Lucida Sans Unicode','Lucida Sans',Geneva,Verdana,sans-serif;">to send this list of keys: Right, Left, Up, Down, Enter, Space, w, a, s, d, 1, and 2. For this project, you're going to reprogram the module to send a different list of keys more useful for assistive technology apps. I assembled this list: Right, Left, Up, Down, PgUp, PgDn, Space, Enter, LeftClick, RightClick, ~1, and Play/Pause. <span style="display: block; font-family: Tahoma,sans-serif;"><span style="font-family: Tahoma,sans-serif;">Most switch accessible apps these days have the option of using Space and Enter, or PgUp and PgDn. I included ~1 because that is the code RJ Cooper used in the RadSounds app (it's mode 4 on the now-discontinued AirTurn BT-105 that RJ re-labeled) and it's still an option in the GoTalk NOW app. I'll probably change it to something else in the next version. LClick and RClick are mouse clicks, useful on a Windows PC for things like talking PowerPoint activities. Play/Pause is for the music/video player apps - it is one of the "Consumer Report" group of HID commands that the EZ-Key module can send. You can, of course, use any other mapping that is useful for you.

The guide page for mapping is: <span style="display: block; font-family: Helvetica,Arial,sans-serif;"><span style="font-family: Tahoma,sans-serif;">@https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/remapping-the-buttons-wireless And here is a quick video showing the Processing sketch (program) and how to map the EZ-Keys module to the AT list: YouTube video showing AT mapping for EZ-Key

I used the latest version of Processing (32-bit) and it worked just fine on an Asus Transformer running Windows 10 (it was the only machine I had with Bluetooth).

Step 1: Wiring Harness
Take one of the rainbow ribbon bundles, and cut it in half:

Peel off a wire from the bundle:

Save the red wires and the black wires for later - we're going to need those for the battery and ground. Now we're going to solder 12 of the colored wires to 12 jacks, so put on some tunez.

//**<to be added: soldering a wire to a jack, and better pictures>**//

Next, we're going to assemble the harness of jacks and wires. Start with about a 4" length of 22 or 20-gauge solid wire, and solder the black (ground) wires of the jacks to it. The top row of 4 jacks should have their black wire cut to 1", the middle row cut to 1 3/4", and the bottom row to 2 1/2".



We're getting fancy here with the black (ground) wires, because otherwise we have a big bundle of wires and it won't fit in the box.

Next, assemble the finished harness into the box:



Bend the top of the harness(where all the black wires join) so that it is scrunched down out of the way. Then, secure the EZ-Keys module in place with 2 of the tiny zip ties.



Connect the colored wires to the module. Looking from the inside of the box, the top right wire goes to pin 0, then from right to left, pins 1, 2, and 3. Middle row from right to left connect to pins 4, 5, 6, and 7. Bottom row from right to left connect to pins 8, 9, 10, and 11. The black wire connects to one of the 3 pins labeled "GND".

I used a loose tiewrap to tidy up the bundle of wires.

//**<to be added: battery case>**//