The study and application of haptics (or kinesthetic communication) take advantage of the human sense of touch to relay information to the user. From the gentle buzzing of your phone, to the feel of a game controller vibrating in your hands, or rumble strips along major highways to alert sleepy motorists, haptics have found useful application in many systems. Despite the variety of these few examples, their unifying concept is that haptic information is quickly internalized and understood by the user even when they are performing difficult or distracting tasks.
Taking this idea a step further, researchers have been working to use similar tools not to alert someone to a phone call but to accomplish things such as:
Each of these haptic neuroprosthesic system take diverse sensor information and process it into a format that can be used to stimulate a user's skin via the vibration of an actuator called a tactor. Unlike screens or speakers, if presented properly and left on long enough, the sensor data being delivered via these tactors can end up being treated by the brain as another part of the user's sensory system. In effect, we're piggy-backing sensor data into the mind via the oft-ignored sense of touch!
Over the course of this project we'll assemble the BeagleBone Haptic Cape, look at one method of creating a generic wearable haptic research interface, and finally try out a few sample applications based on past studies that utilize the Seeed Studio's Grove sensor ecosystem!
Since this project involves the creation of a BeagleBone Cape and a soft wearable apparatus, it's advised that you:
If you can handle soldering TSSOP packages and 0603 size passives, you're good to go. If you can't, don't sweat it! Check out the great SMD soldering tutorial video from EEVBlog and start learning this useful craft! You'll thank yourself later.
Since that's the language this Cape currently supports it'd be good to have at least some level of familiarity. Knowing about basic program flow and data structures like dictionaries is recommended. (Don't fret though: BoneScript support is in the works too!)
Even though this project will show you how to build a complete haptic development system, think of it as starting place for your own kinesthetic communication research!
Think outside of the box and push the field into new territory!
At its core, the Haptic Cape is an open source BeagleBone Green/Black compatible daughter board that allows users to quickly develop and test haptic systems. Backed by the BeagleBone's impressive capabilities and the active BeagleBone community, it aims to get a haptic project up and running with a minimum of potential barriers or development pitfalls.
Currently, the Haptic Cape offers 16 channels of PWM signal generation with 4095 levels of intensity for controlling haptic tactors such as vibrating motors via a separate power supply. On the software side, a documented python library has been created that provides a simple interface to the Cape's hardware for quick integration and use.
As shown in the sample projects below, the Haptic Cape library will allow us to create simple haptic systems that take in sensor data and output useful vibrosensory patterns with less than 15 lines of code!
To get the latest gerbers and Eagle schematic/PCB files, clone the official Haptic Cape project repository by running:
$ git clone https://bitbucket.org/cw_earley/coord-haptic-cape.git
Inside the newly created directory is a zip file containing gerbers generated using Seeed Studio's Fusion cam job file. If you want to use a different fabhouse, open up the .brd file up in Eagle (Free Edition is fine) and use the fabhouse's cam job file to generate compatible gerbers.
From there follow your fabricator's instructions on submitting your board and while you wait, start ordering all the parts!(OctoPart Hint: Click the"Buy Now"text to add all the parts to a digikey/mouser cart at once!)
Getting the cape populated and ready to go is pretty straightforward. Once again, this is a board that makes heavy use of surface mount parts so if you're squeamish about chips with 0.5mm pin pitches and tiny passive that vanish with the slightest of sneezes, just watch helpful tutorials from places like EEVBlogorSparkFun and take things slowly!
This is where the magic happens. I didn't list everything I use on the project hardware list since most of it isn't absolutely vital for this type of work. I asked around and it seems that soldering equipment is a very individual and personal thing, so try stuff out and see what works for you.
Going counter-clockwise from the upper left. 1: Third hand for holding parts in place. 2: Solder dispenser, made from K'Nex for geek-cred. 3: Jeweler's loupe for close inspection. 4: WES51 Solder Station. 5: A puddle of no-clean flux in a bottlecap with a little plastic stick to move it around. 6: Fine tipped tweezers.
As a general rule, I like to start with the hardest things first and work my way towards an easy finish. With respect to PCB assembly, this means starting with the smaller components and progressively getting larger, eventually ending with any through-hole headers and connectors.
Here's the original Haptic Cape PCB as fabbed by SeeedStudio's Fusion service. Really nice quality for the price and turn-around time.
To start, identify the row of 0603 pads right next to the output header holes. These are for the CL10F104ZB8NNNC Capacitors. To follow the SparkFun SMD soldering guide, heat one row of these pads and drop a tiny bit of solder onto it, letting it flow out to cover the entire space.
With half of the pads tinned, pick a capacitor up and with your soldering iron, re-melt the tinned solder as you slide a capacitor onto the pad with your tweezers till you see the solder mate with the part. Make sure the part is lying flat to the board too!
Here's a close up of what the capacitors should look like at this point. Always check over your handy-work as you go, it can save many hours of debugging later.
For the other side, just warm up the pads and the part with your iron and melt a small amount of solder to the pad till you see the two parts mate. 16 capacitors later and this is what you should see.
Now repeat the process for the 4-circuit 10.0 kΩ resistor networks. Tin one out of the eight pads and, after remelting the solder, slide the resistor network into place
Now go around the part and flow small solder amounts onto each pad. Flux can be really helpful for this to prevent solder bridges. In the end your board should look similar to what's shown here.
Now for the PCA9685 PWM controller. This is in a 28-TSSOP package. Pretty small but not anything to worry about!
With chips like this, it's always good to setup your orientation beforehand. Make sure the registration marks on the PCB and the chip line up. Then go ahead and tin one of the pads. It's a little blurry, but the lower left pad is what I decided to tin. Finally like all the other parts, reheat the solder and slide the chip into place. Take your time getting the alignment just right. This is pretty much the only chance you have to get everything lined up.
For the rest of the chip, I recommend dabbing a line of flux across all the pins and lightly dragging a soldering iron tip coated with solder across all the pins. You can also follow SparkFun's advice and try your best to solder each pin one-by-one with a solder-wick cleanup afterwards.
No matter your method, you should end up with results similar to this. Now take a short break to recharge, you've earned it!
Now for the N-Channel MOSFETS. These are the bits that allow us to drive motors that have higher power requirements than what the PCA9685 can deliver. As shown here, I've already tinned the drain pads.
Same as the rest, just reheat the tinned pad and carefully slide the MOSFET into place making sure that the other pins are in a good position.
Now solder the rest of the pins. You should now have a board similar to what's shown here. Good work!
Time for the last surface mount devices: 16 Schottky diodes in SOD123F package. Same as all the rest, tin one row of pads and slide the component into place.
With the diodes placed, solder the other row of pads and celebrate with a short break. Congrats, you've finished all the surface mount soldering!
Now that all the SMD work is finished, all that's left are male headers and power connectors.
To attach our (max 16) tactors to the board, a 2x16 right-angle male header assembly is attached to the underside of the PCB.
When I need to solder in large headers, I find it useful to have a Third Hand hold the pieces in place. Some find this more fiddly than just resting the board on the work surface but I like having insurance that nothing will slide during soldering.
Here's what the board should look like after soldering the motor output header into place. Just a little bit more!
Now for the BeagleBone headers. My first go at making this board used 2 full 2x23 pin male headers. While this mated with the BeagleBone just fine, it was nearly impossible to remove the cape from the 'Bone without worry of the boards flexing. So with that experience, it's better to just use as many pins as needed to make cape attachment and removal less strenuous. For spitting the headers, a pair of wire cutters does quick work.
After cutting off five 2x2 and one 2x3 header, position them to the bottom of the PCB in the arrangement as shown and solder them into place.
Here's what your board should look like after each of the headers is soldered in. (Don't worry about the 2x3 at the bottom, I'll describe what happened with that a bit later)
Here's a view of the bottom of the board with all the headers attached.
For the final piece, we have the two position screw-terminal block. This goes on in the holes near the top of JP1/P8. Be sure to check that the wire inputs are facing away from the board!
And that's it! For an extra step, I use some alcohol and a soft toothbrush to get off all the flux so it looks nice but it's not necessary.
Here it is! The finished Haptic Cape plugged into a BeagleBone Green with a Seeed Grove Compass sensor. Don't worry about those little wires in the bottom middle, those were placed to overcome a trace routing error that has already been fixed in the bitbucket repository. Read on to learn more...
Bonus: Don't let anyone tell you that hardware is easy. For this early revision of the board, I made the mistake of putting the I2C lines on pins that (while shown as I2C2 pins in the docs) were not available for use. Since there wasn't enough time for another round of PCBs before the deadline, I had to do some quick rework. A little trace scraping and some tiny solid core wire later and it was working just fine. Luckily for you, the current version of the Haptic Cape has been updated with this fix along with a few smaller improvements!
Now that you have a complete Haptic Cape ready, lets perform a quick test to make sure everything is up and running.
Plug the cape into your BeagleBone and make sure it's correctly aligned firmly seated in the headers. After powering on the BeagleBone, open up a Cloud9/SSH instance and clone the official library into an accessible directory with
$ git clone https://bitbucket.org/cw_earley/coord-haptic-cape-python-lib.git
Now cd into the newly created repository directory and run the testing demo that will proceed to pulse every output on the cape.
$ python demo_haptic_pulse.py
If all goes well, you should see just normal debug messages like shown here:
Even though you don't have anything hooked up to the outputs yet, just confirming that the BeagleBone is communicating with the PCA9685 is good to know before moving on.
Don't worry! Just double check your solder work with a loupe or a multimeter. This is where no-clean flux can be a lifesaver. Just a little line of the stuff and a quick pass with the iron can sort out lots of detached/bridged pin issues with minimal fuss.
From here, you are more than welcome to continue on to make a haptic belt wearable or choose to make something simpler. Although this hackster project documents the creation of a full eight tactor belt, if there's enough interest a smaller/cheaper setup could be added at a later date. Just let me know in the comments!
Over the course of the last few decades, multiple haptic wearables have been tested and utilized but one stands out for projects related to mobility and sensory augmentation:
What’s best is a belt around the torso with eight tactors signifying the eight cardinal directions. 
Sienko et al. found that 4 tactors spaced evenly around the waist were as effective at [reducing body tilt] as an array of 48 tactors (3 rows by 16 columns) placed around the waist. 
McDaniel et al. developed a tactile belt of 7 equidistantly spaced tactors around the waist to cue a blind user of another person’s presence. Results showed that the belt could convey another person’s direction via vibration location and another person’s distance via vibration duration. 
This 4-8 tactor-laden belt provides a comfortable (although not fashionable) manner of exposing a ring of normally un-stimulated skin around the waist to haptic information without impairing mobility. Depending on the task at hand, fewer than the eight available tactor outputs can be used but for the sake generality this project will outline the fabrication of an eight-tactor haptic wearable as described in the successful Army Research Laboratory study  and the original FeelSpace navigation belt study that we will be aiming to replicate later as a quick example. 
To start, we need to figure out the placement of the tactors facing the cardinal directions. Put on the belt with the attachment velcro covering your front.
Using some tailors chalk or tape, mark the belt fabric that's facing directly from your front.
Proceed to mark the fabric at your left and right sides.
After this you'll have three out of four cardinal directions marked.
Lay the belt out on a work surface and, using the space between the other marks as a guide, mark the final direction that would have been placed at your back.
Now proceed to subdivide those marked areas with three more lines. In the end this gives you 8 empty areas in which to place your tactors evenly spaced out along the belt.
Since this is a wearable belt, a soft case for holding all the bits and pieces needed to run our equipment is vital. I've sourced a cheap case on Amazon in the project Component and Supplies list that will work just as well as the case I received as a promo freebie years back.
For the cables that connect the Haptic Cape to the tactors, take your 26 AWG wire and measure out two lengths that start at the leftmost mark and travel to the middle of the desired tactor placement with an additional inch added for slack.
Here's the desired distance for the tactor to be placed in the second left-most section.
In the end, you should have eight sets of two wire, each an appropriate length to reach from the case (shown in the right) to the middle of the tactor segment. It really helps to label the wires so you can keep track of them through the process!
Since the Haptic Cape uses unshielded 0.100"headers, a common choice for a wire-to-board connector are the Molex SL series. These are usually seen in servo connector assemblies or in PC case cables that mate with a motherboard's exposed pins. I've used these numerous times in the past to connect peripherals directly to PCBs with little fuss so they're greatly recommended for situation where you want flexibility to connect/disconnect cables to a board and don't want to worry about things disconnecting.
Counter-Clockwise from left. 1: Ratcheting hand crimper. 2: Our cut-wire lengths. 3: wire stripper. 4: The Molex SL female crimp terminals. 5: Molex SL 2 pin crimp housing.
Taking our wire, strip off about 3 mm from the ends.
Place the SL crimp terminals in the appropriate slot on the crimper. I usually ratchet the crimper a couple clicks to hold the terminal in the jaws so I can load the wire. (Please forgive the cat hair. Spring has sprung in Texas and my pets are shedding)
Lastly carefully place the wire in the terminal, making sure the metal clasps are surrounding the wire correctly. Now crimp!
In the end you should have a crimped wire similar to what is shown. The inner clasp gripping onto the exposed wire strands while the larger, outer clasps are gripping onto the wire shielding without piercing. Now repeat this process for the second wire.
With your two same-length wires crimped, get one of the SL connector housing.
Aligning the metal lock on the crimp terminal with the hole on the connector, slowly push the terminal into the housing.
Keep pressing it in till you hear a click as the lock engages with the hole. Give the wire a firm tug just to make sure. Now repeat this for the second wire.
Your finished connector assembly should look like the image above. If so, congratulations!
If you buy encapsulated motors similar to the ones listed in the project Components and Supplies list you can skip this step. Since I had already scavenged eight un-encapsulated ERM motors from a collection of retired pagers, I had to protect the shafts myself.
I chose some cheap 3/4 inch PEX pipe cut to be a little longer than the motor as my encapsulation medium. Since the motors were a fair bit smaller than the inner diameter of the pipe, a thin strip of electrical tape was used to make up the difference.
Wrap the electrical tape tightly around the body of the motor, making sure not to impede the shaft's weight or the electrical contacts on the bottom.
After wrapping the motor up, attempt fitting it into the piece of pipe. If the motor is now too wide, peel and cut off a little tape and try again. Repeat this process till it snugly fits inside the pipe.
Now attach all eight tactors to the eight wire assemblies with a little solder.
A third-hand setup proves very useful when needing to hold fiddly things like this together for soldering.
In the end you should have all the pieces shown above. Ready for final integration into the belt!
Identify the leftmost division that you marked earlier. This is the one closest to the belt's velcro. Using a pair of normal scissors, make two cuts in the middle of this area to form a small plus-shaped hole.
This is what the hole should look like in the end. This will be the port that all our tactor wires will pass through. Now flip the belt over to expose the neoprene-coated side that we'll mount the tactors to.
Now collect all the finished tactor cable assemblies and lay them out in the proper positions, using the markings on the opposing side as a guide. Since we want the tactors to be completely surrounded, cut out a section of velcro about the length of the belt.
Attach the hook segment of the velcro to the bottom edge of the belt's inside. It's a bit hard to see in this photo but it's there.
Since our tactors are not normally used in wearable applications, we need to apply our favorite tool: Velcro. Cut out little segments that can cover half of the tactor's outer casing.
Apply whichever side you fancy to the motor encasulation.
Using the chalk guide on the reverse side, place the other half of the velcro segment to the middle of the mounting areas you inscribed earlier. Feed the connector end of the tactor assembly though the hole you cut in the belt.
Repeat this process for the rest of the tactor assemblies.
With all the tactors firmly affixed to the belt, now to tidy up the cabling.
Using small zip ties, bundle together all the wires about an inch under each tactor. Progressing from the outer-most tactor inwards.
In the end you should have a tidy wiring setup similar to what is shown above. Be sure to clip off any excess zip tie after tightening.
If you have any cables not pressed through the hole in the belt, this is a good time to push them through one by one.
The inside of the belt should look like this afterwards.
All the tactor connectors are now exposed to the outside of the belt to be attached to the Haptic Cape.
Take the upper edge of the belt (The edge without the velcro on it) and fold it over the tactors.
Take the other edge with the velcro and fold it over the other folded edge kinda like a burrito. This protective tube of fabric will completely surround the tactor assemblies and provide the wearer with two layers of material between them and the potentially irritating hardware within.
Take the Haptic Burrito Belt and give it a test fit. Pretty comfortable!
To attach the case that holds all the electronics, cut three more velcro strips about the length of the case.
Attach one side of the velcro strips to the back of the case and the other half to the belt, centering the strips across where the belt meets the velcro adjustment strap.
Now mate the case and the belt together and give it a test tug. If you have an especially heavy setup, think about adding more velcro strips.
Now that the case and the belt are connected, it's time to load all the parts we need to run the Cape+BeagleBone off the grid. 1: Smartphone battery pack. 2. AA x 2 battery pack to power the tactors. 3: The BeagleBone with Haptic Cape attached.
Pulling the exposed cables towards the case, connect them one-by-one to the motor output header on the Haptic Cape.
Here's how it should look with all eight tactors connected.
Now just close up the case and you are done! Congratulations! You are now the proud owner of a Haptic Cape and Haptic Belt!
Just as we did with the Haptic Cape by itself. Just cd into the Haptic Cape library directory you cloned the git repo into earlier and run the testing demo that will proceed to pulse every output on the cape in sequence.
$ python demo_haptic_pulse.py
If everything is good, you should feel (and hear) each of the outputs vibrate around your waist! Neat!
To get your desired program running on the belt without needing to hook up a USB cable you have two options:
$ sudo crontab -e
and add a @reboot job as shown below (adjusted to match your script location) to the bottom of the file
@reboot python /path/to/your/script.py &
And save! When you next restart, that script will run right after booting up.
The second method requires your BeagleBone to have a working WiFi dongle and home wireless network but it's very useful for active development since you can keep the belt on while you code:
Pretty self-explanatory. If you know the local IP address your network gives the BeagleBone, you can SSH for direct console access or just open a browser and go to http://[BeagleBoneIP]:3000/ide.html and have wireless access to the Cloud9 IDE running on the hardware. When I was developing the library and demos covered a bit lower, this workflow was the most natural. I could make changes to a script and rerun it without needing to even touch the belt.
Honestly, the sky's the limit! But there are a few recommendations to observe.
In most of the existing research into helpful haptic interfaces, their application can be split into three categories: sensory training, sensory augmentation, and sensory replacement. Each seek to improve, supplant, or add new senses in varying degrees. So as you begin to work on your next amazing haptic system, ask yourself:
Various types of haptic wearable applications.  Fig. 1
From these simple questions you could...
But before you begin, there are a few recommendations to observe:
In the case of our demos, the data coming from the compass is reinforced / corroborated by the user's inner ear and vision as they move. This gives the brain more information about the context of this new haptic data. While there has been some success in using haptic devices to deliver information that has little connection to other senses, desired results are less probable.
When our skin is stimulated, the brain is flooded with a continuum of varying information instead of discrete binary touch/no-touch states. So as you go about deciding how to present your digital sensor data to the user, think about using vibration intensity to its fullest extent and flow between state changes with smooth transitions. This isn't vital but it can really help!
With that said, lets look at some simple starting examples based on some of the research projects mentioned.
With the current state of the library, a haptic system's code follows this pattern:
To give a small example, to set outputs 0, 2, 4, and 6 to full power and the rest to off you'd need to call setDuty_dict() with:
Both of the current demos in the Haptic Cape library repository require the Seeed Studio Grove Compass sensor. It's a cheap, easy to integrate sensor that offers a lot of room to explore haptic systems well documented in the studies mentioned elsewhere in this project. Though before we can start running code, we need to add the sensor to our Haptic Belt's case.
In order to attach the Grove Compass sensor firmly to the inside of the case, a little velcro will be needed. Cut out a piece around the size of the sensor PCB.
Attach the hooked side to the bottom of the Grove compass PCB.
Attach the opposing loop velcro square to the bottom of the Haptic Belt case in a place where it wont get in the way. We need this to be parallel to the floor.
Now attach the Grove compass and tidy up all the cabling.
Finally, turn the BeagleBone on and close it up!
The first demo I wrote was a quick-and-dirty script that takes the current heading from the compass sensor and maps it to one of 8 tactors.
Just cd into the Haptic Cape project directory you cloned earlier and run:
$ python demo_simple_direction_guidance.py
This is a cheap reproduction of how systems like the FeelSpace belt operate that aims to show just how easy it is it get a haptic system up and running using the Haptic Cape python library.
As mentioned in the recommendations earlier, anything you can do to make the output on the belt a little less binary can greatly improve the user experience of your haptic system. From this I took the basic magnetoreception example and added a"blurring"factor of sorts that makes the current direction flow around the belt in a very natural-feeling manner. The difference between this demo and the one before is honestly like night and day! Be sure to check out the code for this one on bitbucket to get ideas on how to massage position data into a more haptic-friendly form.
Just cd into the Haptic Cape project directory you cloned earlier and run:
$ python demo_blurred_directional_guidance.py
Lastly, I wanted to show how one sensor can be used for multiple situations just by changing how information is delivered to the user. Based loosely on the work of Kentala, E et al. on aiding those with balance difficulties stemming from inner ear damage, we take in compass information not to get a heading, but to measure the angle at which the user is tilting. Since the wearer is restricted to how far they can tilt (maximum 180 degree arc if we factor in falling over completely) we can use that to change our haptic presentation. Instead of rotating around the wearers waist in a circle, we'll just buzz the side closest to the floor to give an indication of sway. Kind of tickling them to stand up straight.
Due to the limitations of the Grove 3-axis Compass, we need to reorient the sensor in order to measure user tilt. Just open up the case and move the velcro from the bottom of the case to the back facing the user. Now what was once our heading is now the side-to-side rotation.
Just cd into the Haptic Cape project directory you cloned earlier and run:
$ python demo_simple_balance.py
Now this demo only accounts for tilt in one direction (side-to-side) so I'll leave multi-axis tilt tracking as an exercise for the reader.
I hope that the information presented here has at least made you aware of the growing field of research that surrounds haptic neuroprosthesis. This is a unique area of inquiry that allows developers to accomplish extremely interesting things with relatively little costs, risks, or technical know-how compared to other bio-hacking systems. I personally feel that the maker/hacker community is a perfect match to take these concepts out of the lab and start pushing haptic interfaces to new heights with applications that would never occur in an academic environment.