DEV Community

Cover image for A bit about Haptics
Gbenga Ojo-Aromokudu
Gbenga Ojo-Aromokudu

Posted on

A bit about Haptics

It started when I downloaded a 3rd party app to make my touchbar more interesting. Being the person that I am, I was combing through all of the settings to personalise as much as possible for my preferences. I noti there was an option to switch on haptic feedback, so I did so, and wondered what that would change. At first I didn't notice anything, but soon enough, I realised that it meant I got a small vibration when using the touchbar. Cool. Didn't think much of it and moved on.

Some weeks later, I was trying to do lots of things at once as usual, and I had one finger on the trackpad, and another on the touchbar, trying to change the song. I noticed that I felt the vibration in both fingers. This made me stop and think - what is going on when I use the touchbar that gives me this so-called "haptic feedback"? How can it be linked to the trackpad, and why is it something that I can turn on/off using a 3rd party app?

What is Haptics?

In short, Haptics is all about creating a sense of touch by directing vibrations to a particular area on a surface to create a feeling of pressure. It can have many applications: from my Macbook, to robotics, to prosthetics.

In investigating a little further, I realised that I, and likely you, have had more experience with haptic technology than you might realise. If you have a phone that vibrates, or have ever used a controller for a gaming system which vibrates, then you're familiar with haptic technologies in at least one of its applications.

An example that occured to me recently:

When I got my Macbook, and I tried to use it for the first time, I noticed that the trackpad didn't 'click' when pressed if it was still in sleep mode. However, when the screen was on there were two levels of 'click'. I did a small amount of research and found out that Macbooks use haptic trackpads, which explained what happened to me.

Before this point I had honestly never considered the kind of technology that goes into a trackpad, but, it lead me down an interesting rabbit hole.

How does it work?

Without getting too detailed, I'll try to explain simply how it works. There are receptors in the skin that respond to different stimuli, such as an object slipping our of your hand, or the sharp edge of a knife. Haptic perception is achieved by noticing and feeling contact with surfaces through movement (as opposed to tactile, which refers to static touch).

Given that, on the whole, many people are engaging in haptic perception without even realising it, I wondered how it might be applied to people who are otherwise limited in this area. Applications I have seen so far have ranged from an vibrating video games controller, to Exo-Skin, which can be used to help retrain patients through physical therapy.

Why do you care?

What is particularly intriguing to me about haptics, is the way it leans into minimalism and multi sensory feedback. By this I mean, it gives us options to split up methods of communication. For example, imagine you were filling out a form, on pen and paper. You answer each question one by one, and then hand it to a member of admin staff. You hay have mispelled your address, or missed a letter of your phone number without even realising it. However, there is a fair chance that this may go unnoticed by both you and the staff member. Evidently this could cause a number of problems down the line.

Then transfer this situation to a computer, which can dynamically give you feedback as you go through each question, using colours for example. You can use a controlled form that validates your input as you go, so you must at least give a phone number that could be correct. This is better, as it catches errors before they have a chance to occur and be saved to a database. However, depending on how cluttered the webpage you are on is, or how many tabs you might have open, sometimes you can miss these visual cues when completing forms. (Raise your hand if you've tried to submit the same form 3+ times, not understood why it hasn't worked, and then later realised your input was invalid. Guilty)

Now, imagine if upon filling out each field of the form, if you try to move to the next one leaving invalid input in the previous one, you recieved a small vibration. This would give you immediate feedback to let you know that something should be corrected, and it separates the method of communication into something that might be more noticeable. Alternative use: on online banking or other secure website, you might receive a vibration to warn you that your session is about to time out. This could be useful for those of us who get distracted in other tabs.

A realistic approach

Let me stress that the goal should not be to make everything vibrate all the time. Using haptics for a select few things currently allows us to separate what is important from the constant barrage of visual cues we see and have to interpret throughout the day. Converting too many cues to haptic feedback would just dilute the effect of each piece of feedback.

Haptics can also be used to recreate sensations that we would other recieve as feedback in real life, to enrich an otherwise completely virtual experience. Take for example, on an physical radio (if you still use one), you recieve sensory feedback as you adjust the volume, as you can hear the difference in volume, and also (depending on the radio) can feel the individual increments as you turn the dial.

Consider the equivalent but translated to a phone. An on-screen dial that you can rotate by tapping and holding the screen. But how do you know when you've gone up one level? Or when you've reached maxium volume? Haptic feedback can help here, especially if you're visually impaired.

Your Trackpad

Now, what I really wanted to do with this post was explain how my (and possibly your) trackpad works, so let's get into that.

To me, the wildest realisation was that the trackpad (on a Macbook 2015+) doesn't itself actually have multiple 'click levels' (not sure what else to call it), but in fact, based on the amount of pressure the user places, there is a targeted amount of haptic feedback, that makes you feel like you have clicked something.

There are sensors in the trackpad that can feel how hard it is pressed, and returns a vibration to the location where the pressure is applied

Practical exercise (if you have a Macbook)

Try to feel the 3 distinct inputs in your trackpad. ie. try tapping it gently, clicking it, and clicking it firmly. You can notice it feels like there are 2 different 'click levels'? now try using 2 fingers to do the same thing. What do you notice? there's only one 'click level'. This would not be possible if it were actually within the hardware to have 2 different click levels. Rather, in the software, there are sensors that make the trackpad respond to additional pressure only if it comes from one point, and no more.

Top comments (2)

Collapse
 
dmahely profile image
Doaa Mahely

I believe the same tech is used on iPhone 7’s home button. Unlike previous models, if your iPhone 7 is off and you click on the home button, you won’t feel anything. It’s not an actual ‘raised’ button but the haptic feedback gives that impression, as you have mentioned.

Collapse
 
gbenga profile image
Gbenga Ojo-Aromokudu

Yes exactly - when I got my OnePlus 3T a few years ago, I had a hard time explaining to people that it's not a button. So many times people picked it up and started pressing so hard I thought it was going to break 😅