INTERFACE DESIGN

User interface design or user interface engineering is the design of computers, appliances, machines, mobile communication devices, software applications, and websites with the focus on the user's experience and interaction.

As I am quite experienced in interface design, I will dedicate this week to get familiar with piezoelectric sensors and will connect Arduino and Processing to get a visual output from it. (MY WORK HERE)

I will use a Piezoelectric element to detect sound as a knock sensor. Will use the processor capability to read analog signals through its ADC - analog to digital converter. These converters read a voltage value and transform it into a value encoded digitally. In the case of the clone arduino board, we transform the voltage into a value in the range 0..1024. 0 represents 0volts, while 1024 represents 5volts at the input of one of the six analog pins. We can use the Piezo to play tones and to detect tones. Here I will be plugging the Piezo on the analog input pin number 0, that supports the functionality of reading a value between 0 and 5volts, and not just a plain HIGH or LOW.(LINK HERE)

Piezo Transducer 30Vac 75dB

Vendor's website specs.

Hardware schema.

Out of the box.

"The piezoelectric ceramic buzzer (PIEZO TRANSDUCER 30Vac 0.5-20Hz 75dB LEAD TYPE) has a simple structure in which a ceramic piezo-element is glued to a vibration plate. The piezoceramic element expands or shrinks diametrically when an alternating voltage is applied. This characteristic is used to bend the vibration plate, which generates sound. The acoustic generating method can be subdivided roughly into the self-drive oscillation method and the external drive oscillation method. The former yields the lowest impedance on the acoustic generator and produces sound through the oscillator circuit's positive feedback. This allows the creation of sound pressure using a simple circuit. The external drive oscillation method uses a fixed frequency and produces sound through the oscillator".(VENDOR LINK HERE)

Process

For more detail and more complex code look at the Arduino site. (LINK HERE) I built a small code in Arduino that reads the sensor and outputs its value when the sound of a knock is over a threshold of 300. Using the analog to digital converter (ADC), the voltage from 0 to 5V is encoded into a number between 0 and 1024. The Processing code reads also from serial and determines a background color of the sketch window.

General schema.

Using analogue pin 0 and ground from the headers.

Microcontroller schema.

Close up to the schema.

Extra circuit.

Extra circuit schema.

Codes.

Arduino output (SENSOR READ).

Processing output (COLOR grey/white).

Reading serial from Processing...

Result (animated GIF).