Mini Tutorial: Tactile Feedback

This page is dedicated to a mini tutorial explaining how to design and implement a tactile feedback using Open ViBE [http://openvibe.inria.fr/] and Arduino [https://www.arduino.cc/].

Thus, I will try to provide guidelines both for the hardware and software components of the system.

I am not a computer scientist, but still managed to understand how it works. Trust me: it is quite easy and accessible! Also, I am not claiming it is the best (or most efficient) way to do it… The goal is simply to provide a full pipeline enabling everybody to easily (and cheaply) design a tactile feedback.

Before starting, I would like to thank all the folks who helped me: Thibault Laine (electronics), Daniel Spelmezan (Arduino) and Jérémy Frey (LSL).


 

The whole tutorial will be based on the system we designed and implemented for the study described in this paper :

* C. Jeunet, C. Vi, D. Spelmezan, B. N’Kaoua, F. Lotte, S. Subramanian, “Continuous Tactile Feedback for Motor-Imagery based Brain-Computer Interaction in a Multitasking Context”, Interact2015 – pdf

The objective of this study was to compare, in a between-subject experiment, a standard visual feedback to an equivalent tactile feedback (i.e., providing the same information but on a different modality) in terms of BCI performance and cognitive resources required for the task.  Capture d'écran 2017-03-30 11.07.35

In the paper are described all the details concerning the design (why the motors were placed on the palms, the number of motors per hand, the space between the motors, etc.) and the results (little spoiler: the tactile worked well!!).

Here we will focus on the technical aspects. I orally presented this tutorial during the 2nd Open ViBE workshop, which was a satellite event of the BCI Meeting (Asilomar – USA, 2016). My presentation can be found here : “Connecting OpenViBE to Arduino”. This pdf explains the context as well as the link between the different elements I will introduce below, so do not hesitate to have a look at it (especially to the second part) to better understand the pipeline. I also tried to put some sort of  “Camille-like-pseudo-code-for-noobs-like-me” in the presentation, hoping it could help someone :). Let’s get down to serious business!


 

I — Hardware

I.1 — The motors

Based on the constraints we had concerning the size of the motors (that had to be less than 1cm wide), and due to the fact that we could modulate their “intensity of vibration” (pulse-width modulation), we chose to use the following motors : vibration motors 307-103 (9mm wide, 25mm long, 3V – for more characterstics, please visite the website). The cables of the motors were extended as shown in the gallery below so that they can be connected to the electronic board.

This slideshow requires JavaScript.

I.2 — The electronic board

These motors were connected to an electronic board, itself connected to the Arduino. The original electronic board had been designed by Daniel. Thibault made a new one and created a zip folder including all the required information to make your own board!

Vibrotactile BCI shield

Link towards the whole folder!

You are really bad at electronics? Do not panic! You can simply look for a website proposing to make such electronic boards for you and send the zip folder to them! It should not be too expensive (I think it is around 30 to 60€… to be checked 😉 ).

This slideshow requires JavaScript.

I.3 — The Arduino

Originally, we used an Arduino Due. But almost four years later, based on the Great Thibault expertise, it is more relevant to use an Arduino Mega. This is the one he used in his example!

This slideshow requires JavaScript.

I.4 — The wonderful gloves

Finally, for the experiment, the motors were embedded in “artisanal/hand-made” gloves. You can find a photo of them on the paper!

 

II — Software

The global picture is as follow: the information is sent from OpenViBE through an LSL protocol to a Python script. This script connects to Arduino and sends the information about the motor to be activated to it. Finally, the Arduino activates/stops the motors.

 

II.1 — The OpenViBE code

As explained in the “Connecting OpenViBE to Arduino” pdf, we used a standard OpenViBE pipeline of online scenarios to which we added an “LSL Export (Gipsa)” box. For the needs of our experiment, we added as inputs to this box the following elements: the classifier output (of time signal) and the stimulations. But of course, it is possible to add as many inputs as requested for the experiment.

Link to the online OpenViBE scenario with the LSL box

 

II.2 — A Python script to link OpenViBE to Arduino

This Python script first connects to the Arduino (here through a serial port) and then communicates with OpenViBE. The “Stream[0]” to “Stream[n]” correspond to the inputs provided in the OpenViBE scenario, in the same order. For instance in our example, Stream[0] corresponds to the classifier output and Stream[1] to the stimulations. As an output, this script indicates the motor to be activated depending on the classifier output and the instruction (extracted from the stimulations).

Here again, everything is explained in the “Connecting OpenViBE to Arduino” pdf.

Link to the python script.

 

II.3 — The Arduino code

Finally, this code simply launches a specific motor (depending on the output of the python script received) at a specific intensity i (defined in the code). For instance, if the input is “m5” it will activate the motor connected to the…. 5th pin of the Arduino :O!

You can test the motors just by launching Arduino, compiling the code, and typing “m” followed by the number of the motor you want to activate. To stop, juste press “s” in the console!

Link to the Arduino code.

 

And here we are!

I hope this page is useful. Please do not hesitate to give me some feedback so that I can improve it! All the best!!!!!