bzqp
Published © CC BY-NC

Voice Activated, 3D Printed Tali's Helmet!

It blinks when you speak!

IntermediateFull instructions provided4
Voice Activated, 3D Printed Tali's Helmet!

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
LM393 Digital Audio Sensor
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
Resistor 220 ohm
Resistor 220 ohm
×3
RGB Diffused Common Cathode
RGB Diffused Common Cathode
×1
Toggle Switch, Toggle
Toggle Switch, Toggle
×2
9V battery (generic)
9V battery (generic)
×2
Battery Holder, 9V
Battery Holder, 9V
×2
Axial Fan, 5 V
Axial Fan, 5 V
×1
Capacitor 1000 µF
Capacitor 1000 µF
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Custom parts and enclosures

3D printing and vacuum forming files

The 3D printing and vacuum forming files are available on my Thingiverse. The model was based on Rainyfire's original helmet and an in-game Tali model extracted from Mass Effect 3.

Schematics

Wiring diagram

The wiring for the blinking Tali's helmet

Code

Blinking Tali's helmet

Arduino
The software for Arduino Nano controlling the voice-activated blinking for Tali's helmet. Together with the wiring diagram it's quite self explanatory and simple.
// Tali helmet - voice detection LED control by bzqp (2021) https://www.youtube.com/user/Beezqp
//https://www.thingiverse.com/bzqp/designs
//
//A0 - potentiometer
//D13 - microphone
//D3 - red
//D5 - green
//D6 - blue
int brightness = 0;
int brightnesscache=0;
int loudness = 0;
const unsigned long timeout=100; // voice sampling time in ms
unsigned long timestamp=0; // first sample timestamp
void setup() {
  pinMode(13, INPUT); //D13 - microphone
  pinMode(A0, INPUT); //A0 - potentiometer
  pinMode(3, OUTPUT); //D3 - red
  pinMode(5, OUTPUT); //D5 - green
  pinMode(6, OUTPUT); //D6 - blue
  Serial.begin(9600); // Serial for debugging, not really needed normally
}
void loop() {
brightness = floor(analogRead(A0)/4);
loudness = digitalRead(13);
Serial.println(brightness);

if(brightness<8){
    // if brightness below 5 turn off the lights to prevent unbalanced RGB color flickering
    analogWrite(3, 0);
    analogWrite(5, 0);
    analogWrite(6, 0);
    delay(1);
}
else{
unsigned int  dl=(floor(float((float(1)/(float(brightness)+2))*float(100000)))); //delay in microseconds, the same total delay for every brightness setting
//Serial.println(brightness);
if(loudness==LOW){
  // if a sound is detected by a microphone, mark a timestamp
  timestamp=millis();
}
if(millis()-timestamp<timeout){
  // if within the timeout period, gradually lower the brightness to zero
  while(brightnesscache>0){
    brightnesscache--;
    analogWrite(3, brightnesscache/2);
    analogWrite(5, brightnesscache/3);
    analogWrite(6, brightnesscache);
    delayMicroseconds(dl);
  }
  }
else{
  // if no sound is detected, gradually rise the brightness to the value determined by the potentiometer
  while(brightnesscache<brightness){
    brightnesscache++;
    analogWrite(3, brightnesscache/2);
    analogWrite(5, brightnesscache/3);
    analogWrite(6, brightnesscache);
    delayMicroseconds(dl);
  }
  // just to be sure it goes all the way up to brightness
    analogWrite(3, brightness/2);
    analogWrite(5, brightness/3);
    analogWrite(6, brightness);
}
}
}

Credits

bzqp

bzqp

2 projects • 6 followers

Comments