Prototyping Class
November 10, 2021

Arduino Interface Project

So, here is the last task we got in class:

• Create a lamp (or other light-emitting device) for humans (or other light-sensing creatures)

• Identify an intuitive gesture that can be measured with an Arduino and connected sensor(s), and use it to control the qualities of LED light(s)

I came up with the idea to create a lamp looking like a lightning cloud that is sensitive to the thunderstorm sound.

I saw such an idea realized in the real product here that costs $3,360 and which includes several additional technical things, so I decided to create something similar but simpler and only using the capabilities of Arduino Starter Kit.

This is how my diagram looks like:

The diagram: LED is sensitive to the sound recieved by the Piezo sensor

The cloud lamp is comprised of cotton cloud inside which are located Arduino MC, LED, Piezo sensor with 1Ω resistor, and Bluetooth speaker.

The speaker is playing the thunderstorm sound from any source, and the Piezo sensor which is working in this case as a microphone transforms the vibration into the current and sends the signal to the Andruino MC and then the signal is being sent to the LED.

The 1MΩ resistor around the Piezo sensor is used to suppress the excessive signal on input so the LED could quickly change its lightning condition.

Here is the photo of the circuit inside the cloud:

The circuit inside the cloud

Now, let's watch how my lamp is working (please watch it with the sound turned on):

Thunderstorm sound operated cloud lamp

The code for the project:

int sensorPin = 0;
int ledPin = 13;
int threshold = 1; //level of piezo sensor sensitivity

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() { 
  int val= analogRead(sensorPin);
    if (val >= threshold) {
      digitalWrite(ledPin, HIGH);
      delay(50);
      digitalWrite(ledPin, LOW);
  }
    else
    digitalWrite(ledPin, LOW);
}

Please leave your comments if you liked or disliked my lamp) Thank you!