Vibrotactile Stimulus Verifier Shield
I’m a Graduate Research Assistant at the Haptic Research Interface Laboratory (HIRL) at Purdue University. Being a Haptics Lab, we primarily study the sense of touch; investigating the modes of tactile sensation and exploring ways to deliver information to humans by means of it.
During our research, we often find ourself delivering vibro-tactile stimuli to subjects using small voice-coils, shakers, or even pager motors. All of these are devices are electro-mechanical in nature; this means their behavior is affected by physical parameters, like force. In the best case, this response is linear; in the worst, non-linear. Due to this non-ideal behavior, it’s very important to verify the stimulus amplitude and frequency at the point of contact.
The type of vibrotactile research that we conduct in our lab generally involves multiple stimuli in an active environment. Therefore, it’s very difficult to verify signal integrity using traditional means such as a force sensor/conditioning amplifier/NI-DAQ combo.
We needed a system that could meet the following criteria:
- Accurate
- Preferably small
- Easy to configure and use
- Low cost/commodity parts
VSV w/ ArduinoBT and Accelerometer
The solution that I came up with uses the commonly available ST LIS3LV02DQ Triple Axis Accelerometer (in the form of a break-out board), a modified Cat5e Ethernet Cable, an Arduino microcontroller platform, and a simple, custom-designed daughterboard in the form on an Arduino “Shield“.
Hardware Details
The choice to develop on the Arduino platform was a no-brainer: cheap, easily available, easy to use, freely available toolchain… the list is nearly endless. In addition, a wireless version, the Arduino BT, is available, making the transition to a wireless device painless.

Human Tactile System Sensitivity Thresholds Israr, et. al 2008
Just like any other electro-mechanical system, the human tactile system has a frequency response curve. Similar to the Fletcher-Munson Curves for the auditory system, there exists the “Bolanowski Curves” for touch. From these curves, one can see that humans are most sensitive to vibrations around 250 Hz; therefore, most researchers choose to use vibrotactile stimuli of this frequency. This requirement means that the absolute minimum sampling rate of the accelerometer must be in excess of 500 Hz. Of course, the frequency response of the accelerometer itself must be flat at these frequencies.
ST LIS3LV02DQ Accelerometer
VSV, ArduinoBT, and LIS30LV02DQ Break-Out Board
The LIS3LV02DQ Triple-axis accelerometer was the only commodity accelerometer that met both of these requirements, with a maximum sampling rate of 2560 Hz. In addition, a break-out board was available from the great folks at Sparkfun, reducing the maintenance and fabrication costs for the units.
Unfortunately, the LIS3LV02DQ accelerometer is a 3.3V device and the Arduino operates at 5.0V. Therefore, directly connecting the accelerometer to the Arduino SPI-bus is a no-go. One method of translating levels is to use a resistor-based voltage-divider circuit. This actually works great for low-impedance, on-board routing of the connections. However, I wanted to allow the user to position the accelerometer away from the development kit, making it easier to take measurements in tight places. The only way to do this is to send signals down a wire.
The LIS30LV02DQ accelerometer offers two interface buses, the I2C-bus and the SPI-bus. However, it can only operate at the require sampling rate of 2560 Hz using the SPI-bus. The most commonly available, relatively high-quality, cable people have access to is an Ethernet cable. Therefore, I figured “adapting” one for the project would be easier than using a proprietary solution.
Software Details
Serial Port Configuration
The VSV transmits data to the host PC using a USB virtual serial port. The serial port is configured as follows:
- COM Port: Depends on system
- Speed: 115200
- Data Bits: 8
- Parity: N
- Stop Bits: 1
- Flow control: None
Data Format
The accelerometer used for the VSV is the ST LIS3LV02DQ, a 3-axis accelerometer capable of sampling at a resolution of 12-bits at rates up to 2560 Hz. By default, the VSV is configured to sample and transmit only Z-axis data at a rate of 2560 Hz. The data is transmitted in 16-bit blocks of 1024 samples. Each 16-bit sample is transmitted as an 8-bit upper byte followed by an 8-bit lower byte.
For other details regarding the accelerometer specifications, please refer to the LIS3LV02DQ datasheet.
To initiate a block read, the host PC must first send a single ASCII character, ‘r’ to initiate the data transfer. Following the receipt of this character, the VSV system reads and transmits 1024 12-bit samples from the accelerometer. The samples are right-justified and padded to 16-bits, therefore, a total of 2048 bytes are transmitted to the host PC.
Following blocks of samples can be read in an similar fashion.
Pseudo-code
- Initialize serial port
- Pause 5 seconds to allow Arduino to boot
- Transmit ‘v’ to verify connection with PC
- Transmit ‘r’ to initiate block read
- Count 1 to 1024
- UpperByte = Read byte from serial port
- LowerByte = Read byte from serial port
- Sample = LowerByte + ( UpperByte << 8 )
- Store Sample in array
- Perform FFT on 1024 sample block
- Display results of FFT to screen
Updating Firmware
The firmware for the VSV is open-source, and available here: VSV Firmware
To upgrade the firmware, you will need to download the Arduino environment, which is available here.
After extracting the firmware and the Arduino environment into seperate directories, please follow these directions, starting from step 7, to update the firmware. Please remember to open the VSV firmware file named ‘vsv_firmware.pde‘, and not the ‘Blink’ example. When upgrading the firmware, please detach the VSV daughterboard from the Arduino.
How to upgrade VSV firmware. [avi 15.42MB]
Camstudio lossless codec.
Useful Scripts
Instructions
Execute: ./getaccdata.py | tee output.txt
Data samples will be read from the VSV device and placed in ‘output.txt’. ‘plotaccdata.m’ expects the samples to be in a file titled ‘output.txt’ in the current working directory.
getaccdata.py - Python script to read accelerometer data from VSV serially.
plotaccdata.m - Reads in accelerometer data and creates time and frequency plots.

200 Hz Sinusoidal Signal

250 Hz Sinusoidal Signal

FFT of 200 Hz VSV Output

FFT of 250 Hz VSV Output
Signal Input – 250 Hz
Signal Input – 200 Hz
Unloaded C2 Tactor @ 250 Hz
Unloaded C2 Tactor @ 200 Hz
Datasheets
LIS3LV02DQ - Low-voltage 3-axis accelerometer.
LP2981 - TI 3.3V LDO regulator.
SN74LVC4245 - Octal bus transciever.
VSV Daughterboard schematic.
VSV Daughterboard v1.0 Gerber Files (Sent to Advanced Circuits on Feb 12, 2008).
VSV Daughterboard v1.0 Protel Layout Files


