"Speak-up" Voice Interaction Wall Lamp

Introduction: "Speak-up" Voice Interaction Wall Lamp

Do you know surveys about our fears commonly show fear of public speaking at the top of the list? Our fear of standing up in front of a group and talking is so great that we fear it more than death, at least according to some surveys.

This "Speak Up" wall lamp uses a microphone to detect your volume when you are giving public speaks and will trigger a simple LED light visualization that helps you to understand the proper volume you could use during the speakings. Also, you can practice/rehearse your speakings towards the lamp. The aim of the lamp is helping all of us to be a more confident public speaker with a clear voice. In this tutorial, we will be discussing how to create your own full-sized "Speak Up" wall lamp powered by Arduino.

Supplies:

1. 3-4 1/2" plywood 12" x24 "

2. 1 black - 12” x 24” sheet of ⅛” acrylic

3. Wood Glue

4. Arduino

5. Solid Wires

6. Screw Driver and Screws

7. Microphone

8. Soldering Set

9. LED Stripe

10. Switch

11. USB power adapter

Recommended Tools:

1. CNC

2. Laser Cutter

3. Drill Press Power Drill

4. Orbital Sander

5. Band saw

6. Belt Sander

7. Clamps

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Step 1: Download & Cut Files

In order to create the base for the lamp to hide the Arduino board and circuit inside, you will need to CNC a sheet of 12''*24'' plywood. Since this project has a thickness, you should probably use wood glue to glue 4-5 sheets together so that it is thick enough to cut by CNC. For this project, I used a Shopbot CNC and prepared the files with Vectric. The bit was the 1/4" straight bit used particularly for plywood. Download the CNC file below, once your files are prepared, send them to the CNC to get cutting.

For this project, I used a laser cutter to cut the black acrylic. The laser cutting file below is ready to be sent directly to the laser cutter.

Files attached:

1.CNC Parts

2.Laser Cutter File

Step 2: Step 2: Sand & Prep Parts

Once your CNC has finished cutting, cut the base of your material using band saw. It will be a little bit hard if you want to cut it perfectly. So recommend you to use the belt sander to sand the wood after you finish cutting it by band saw.

And then, you can drill a hole in the middle of the base by using a proper size of the drill press, so that you can still check your circuit even if your lamp is sealed by the acrylic. And don't forget to drill a hole under the base, which will allow you to put the microphone and the charging wire outside. Lastly, we should prepare a hole to help you hang this lamp on the wall (a single nail on the wall is ok, easy and fast!).

Step 3: Step 3: Create Circuit & Upload Code

Now it is time to make the “speak up” wall lamp come to life. In order to get the microphone sensor and led stripe going, you will need to build a circuit using Arduino. In the sample code I attached, you should attach the wire to pin 3 to control switch, pin 6 to control LED stripe and pin A0 to control microphone. Please follow the circuit diagram that I upload here to build your circuit. Once these are set up using the test code in Arduino to confirm it is functioning. Then upload the following code.

Code:

#include "Adafruit_NeoPixel.h" #include "NewPing.h" #ifdef __AVR__ #include #endif #define VOICESENSORPIN A0//声音传感器信号引脚接A0 #define PIN 6//灯带信号线,接在arduino第6引脚 #define NUMPIXELS 35//led灯的个数,根据实际修改数量 #define MAXVOICEVAL 1000//最大音量 #define MINVOICEVAL 100//最小音量 #define CHANGECOLONUM NUMPIXELS/4//改变颜色的led序号 #define UPDATALEDONCETIME 200 //0.02秒刷新一次led状态 #define SWITCHPIN 3//开关引脚 #define SWITCHONDIGITAL 0//开关合上的电平

byte LowVoiceRGB[3] = {10, 0, 180}; byte HightVoiceRGB[3] = {180, 10, 10}; byte NomalRGB[3] = {5, 5, 5}; unsigned long UpDataLedSt = 0;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int CurrentBlinkNum = -1; int TargetBlinkNum = -1;

struct VoiceSensor { byte Pin; unsigned int CheckOnceTime = 200;//0.02秒检测一次声音值 unsigned long CheckSt = 0; int LastVal = 0;

void Init(byte pin) { Pin = pin; }

unsigned int GetVoiceVal() { if (millis() - CheckSt < CheckOnceTime) { LastVal = max(LastVal, analogRead(Pin)); return LastVal; } CheckSt = millis(); LastVal = analogRead(Pin); return LastVal; } };

VoiceSensor Sensor;

void Display() { if (millis() - UpDataLedSt < UPDATALEDONCETIME) { return; } UpDataLedSt = millis(); if ( TargetBlinkNum != CurrentBlinkNum) { if (CurrentBlinkNum >= 0) strip.setPixelColor(CurrentBlinkNum, NomalRGB[0], NomalRGB[1], NomalRGB[2]);

if (TargetBlinkNum > CurrentBlinkNum) { CurrentBlinkNum++; }

else { CurrentBlinkNum--; }

if (CurrentBlinkNum < CHANGECOLONUM) { if (CurrentBlinkNum >= 0) strip.setPixelColor(CurrentBlinkNum, LowVoiceRGB[0], LowVoiceRGB[1], LowVoiceRGB[2]); } else { if (CurrentBlinkNum >= 0) strip.setPixelColor(CurrentBlinkNum, HightVoiceRGB[0], HightVoiceRGB[1], HightVoiceRGB[2]); } }

//for(int i=0; i

void setup() { #if defined (__AVR_ATtiny85__) if (F_CPU == 16000000) clock_prescale_set(clock_div_1); #endif strip.begin(); strip.show(); Sensor.Init( VOICESENSORPIN); pinMode(SWITCHPIN, INPUT_PULLUP); Serial.begin(115200); Serial.println("Begin"); for (int i = 0; i < NUMPIXELS; i++) { strip.setPixelColor(i, NomalRGB[0], NomalRGB[1], NomalRGB[2]); } strip.show(); }

int voiceVal ;

void loop() { if (digitalRead(SWITCHPIN) == SWITCHONDIGITAL) { voiceVal = Sensor.GetVoiceVal(); if (voiceVal > MAXVOICEVAL) { voiceVal = MINVOICEVAL; }

if (voiceVal > MAXVOICEVAL) { voiceVal = MAXVOICEVAL; } if (voiceVal < MINVOICEVAL) { voiceVal = MINVOICEVAL; } Serial.println(voiceVal); TargetBlinkNum = map(voiceVal, MINVOICEVAL, MAXVOICEVAL, 0, NUMPIXELS) - 1; Display(); }

else { for (int i = 0; i < NUMPIXELS; i++) { strip.setPixelColor(i, 0, 0, 0); } strip.show(); delay(500); } }

Step 4: Step 4. Test and Assemble

Test your circuit and code, if it is ready to go, you can put the board inside of the base, and leave LED stripe, microphone and switch outside (through the hole we drilled on the bottom of the base). Then, wrap the LED stripe on based on the outline of the wood base. You could use any glue you like to attach LED stripe safely on the base. Test your circuit again, if everything goes fine, you can seal the base with the acrylic that we cut just now.

STEM Contest

This is an entry in the
STEM Contest

Be the First to Share

    Recommendations

    • Magnets Challenge

      Magnets Challenge
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    Discussions

    0
    audreyobscura
    audreyobscura

    5 weeks ago

    What fun tools to work with!