Smart Materials

Theory

A smart material is a material that is able to change its features when an external stimulus is applied to it. An example of this is piezoelectric materials. Piezoelectric materials are materials that product an electric current when an external mechanical force is applied to it. As part of research with Dr. Bilgen at Rutgers University, I got the opportunity to develop a project based on these piezoelectric materials.

The created project is a piezoelectric doorbell. Piezoelectric materials produce current when a mechanical force is applied; similarly, they can generate mechanical forces when a current is applied to them. This doorbell utilizes piezoelectric disks to send mechanical pulses to another piezoelectric disk, which can detect the frequency of pulses sent. When there is an interuption in the frequency of pulses, such as a person knocking on the glass, it will detect that and be able to play a song by playing notes using the piezoelectric disks, by using an Arduino to send pulses to the disks at a certain pitches and frequencies.

images/pika.gif

Overkill for a doorbell

Code and Wiring

Code

The code for this project consisted of three different parts: sending pulses through the first disk, reading pulses and detecting interruptions through the second disk, and playing music.

To send pulses, the first piezoelectric disk is wired to an Arduino pin and set to OUTPUT. At varying intervals, the signal is set to HIGH and LOW to generate mechanical pulses.

In order to read pulses and be able to detect interruptions, the system needed to be calibrated for ambient conditions. When the system is powered on, it takes readings of the pulses in ambient conditions. The readings from the piezoelectric disk are then connected to a voltage amplifier and read through the Arduino. The average voltage reading and standard deviation are calculated to determine a baseline for pulse readings. Additionally, a derivative function is used to read the average rate of change, and to accurately determine if an interuption through an outside force is detected.

For playing music, a seperate file containing the pitches of varying notes was generated. When the derivative of pulse readings exceeds a certain threshold, it tells the piezoelectric disk to send pulses at the pitch of notes, allowing us to play music. Currently, it can play Fur Elise, Ode to Joy, Turkish March, and Canon in D Major.

A link to the code can be found here.

Wiring

The system is powered using a 6.5V power source plugged into wall outlet, then regulated to 5V using a voltage regulator. This allows the Arduino LilyPad to be powered. The Arduino is attached to both piezoelectric disks and is sending and reading pulses simultaneously. For reading pulses, the second disk is wired to a voltage amplifier to amplify readings from the disk and then attached to a 16 bit I2C ADC, which allows the Arduino to make more accurate readings.

images/pika.gif