Findings, Analysis and Challenges

This section discusses the key observations, analysis, and challenges faced during the implementation of this simple and common experiment.

Observation 1:

When the Arduino is connected to the computer system and the code is uploaded to the Arduino, the serial plotter generates the following graph simultaneously. Each time the piezoelectric sensor is knocked, the graph peaks as can be seen in the video below:

Peaks on the Arduino Serial Plotter

Observation 2: Even the slightest knock on the Arduino can power up the LED and lead to a peak on the graph.

Analysis:

This shows that even a slight tap on the piezoelectric sensor can lead to a voltage fluctuation on the sensor. In the code, the line int sensorValue = analogRead(knockSensorPin); reads the analog voltage value from the sensor. When the sensor detects a knock, it generates a voltage spike, which is detected by the Arduino. This spike is reflected in the serial plotter as a peak in the graph.

The line if (sensorValue >= threshold) checks if the sensor value exceeds a certain threshold. In this code, the threshold is set to 200. If the sensor value is greater than or equal to the threshold, it means that a knock has been detected. In response to a knock, the code turns on the LED by executing digitalWrite(ledPin, HIGH);. Even a slight knock can cause the sensor value to exceed the threshold, triggering the LED to turn on. Consequently, a peak is observed on the graph in the serial plotter.

Challenges:

No major challenge was faced in the implementation of this experiment.

However, occasionally the LED light would start even without a tap on the piezoelectric sensor. This might be due to a low threshold set in the Arduino code. The threshold can be increased in order to reduce the sensitivity of the piezoelectric sensor.

Arduino boards need an external stable power supply of 6 to 20 volts. Hence, they would need an external battery source in order to operate and cannot operate as such on the energy generated from a Piezoelectric Sensor unless the piezoelectric sensor is being used to recharge the battery source itself!

Last updated