IKEA Halloween Mirror - With Crash and Scary Messages

by telekomor in Circuits > Arduino

517 Views, 1 Favorites, 0 Comments

IKEA Halloween Mirror - With Crash and Scary Messages

FHV46W1KVAYK8NP.jpeg
EL ESPEJO MALDITO

it is just another magic or halloween mirror, with presence detection, break effect and scare music and messages. This was my first ARDUINO project, be comprehensive.

More information (in Spanish) http://eljugueterodebladerunner.telekomor.com/?p=77

Supplies

  • IKEA frame or similar, so as not to raise suspicions.
  • Mirror effect vinyl
  • black cardboard
  • DIY material: glue, foil, pair of scissors, adhesive tape...
  • Arduino nano
  • mini IR PIR sensor (human presence)
  • 10 white leds
  • DF player mini for arduino
  • Speaker
  • pcb card and solderings tools.
  • wires
  • 9 volts supply

Build the Mirror

20210110_132627.jpg
  • Frame could be the IKEA or similar with a 2cm edge or more.
  • You should put the vinyl on the glass according to the manufacturer's instructions (sorry, i dont't have images). External side is a mirror and the internal side is semitransparent.
  • Draw a broken efect on the card board, be creative.
  • Cut the cardboard. Glue on the inner face of the glass.
  • Put some foil pieces for better reflexion of the light.

Electronics and Arduino

esquema_circuito.jpg
PIR.jpg
20210111_225315.jpg
20210113_194903.jpg
20210113_000314.jpg
20210113_195548.jpg

The thikercad chart (and simulation) is for simple reference only.

When Arduino detects the presence, play the music and a voice of first message "look in the mirror", then play the break sound effect and turn on the LEDs and finally finish with another message of "you have broken the mirror, 10 years of bad luck , hahahaha ". And and it turns off. Produces a real scare by night.

You cannot feed many LEDs from the same Arduino port, so we use two LEDs in each port (serial connected) and two ports for the two break zones.

Use the PCB to solder the DF Player mini module, the speaker and the LEDs to the pullup resistor and to the wire that goes to the arduino.

I prefer not to solder Arduino and use a screwed wiring jacket. Facilitates maintenance.

Distribute and fix the LEDs strategically with adhesive tape so that they illuminate the "tear" of the cardboard in a uniform way.

I have put a switch on the back to cut off the power suply (9volts battery), because the detector jumps easily and very often.

You can see the arduino pin connection in the next section.





Arduino Code

This is my first Arduino program. Completely newbie when i did this.

I use a very simple way to play de sound in the DF Player module, only a pulse on the "IO_2" pin for secuencial play. Be careful, because the sound reproduction order is the same in which the audios are stored on the microSD card. Currently I prefer to use the communication method through the serial port, it is also simple and much more powerful.


//PROYECTO ESPEJO HALLOWEEN v1.3
//EFECTO: Al pasar junto al espejo, suena una música y una voz. Al mirar el espejo, se rompe.
//MECANISMO: Al activarse un sensor de presencia, se ejecutan sonidos y un falso espejo que se ilumina por detras mediante leds con un efecto de sonido.
//LOGICA: Se detecta presencia (sensorpir), y se activan 4 leds (2 leds en cada zona de rotura) y se ejecutan efectos de sonido en DF Player
// version 1.3: Musica de Halloween y una voz que atrae la atención
//NOTA: sensorpir se sustituye por un pulsador de momento


int sensorpir = 2;
int led_a1 = 7;
int led_a2 = 3;
int led_b1 = 4;
int led_b2 = 5; 
int sonido = 6;
int pausa_inicio = 30000; //Pausa antes de empezar
int pausa_ab = 1000; //Pausa entre zonas de rotura
int pausa_fin = 20000; // Pausa antes de apagarse
int long duracion = 0;
int long inicio = 0;
int long pulso = 0;
 
void setup()
{
  //Asignamos las entradas y salidas
  pinMode(sensorpir,INPUT);
  pinMode(sonido,OUTPUT);
  pinMode(led_a1,OUTPUT);
  pinMode(led_a2,OUTPUT);
  pinMode(led_b1,OUTPUT);
  pinMode(led_b2,OUTPUT);
  //Asignamos el estado inciial de entradas y salidas
  digitalWrite(led_a1, LOW);
  digitalWrite(led_a2, LOW);
  digitalWrite(led_b1, LOW);
  digitalWrite(led_b2, LOW);
  digitalWrite(sonido, HIGH);
  digitalWrite(sensorpir, LOW);
    delay(pausa_inicio);
    inicio = millis();
    pulso = millis(); 
}




void loop()
{  
  if (digitalRead(sensorpir) == HIGH){
    pulso = millis();
    }  
   else
   {
     inicio = millis(); 
    } 
  duracion = pulso - inicio; 
  if(duracion > 3000) //Cuando el sensor detecte algun movimiento mayor de dos segundos se inicia la secuencia de iluminación y sonido
  {
    digitalWrite(sonido, LOW); // Se crea un pulso para que EF Player ejecute el efecto de sonido "Mirate en el espejo"
    delay(200);
    digitalWrite(sonido, HIGH); //
    delay(15000); //tiempo de la narración "mirate en el espejo" menos 3 segundos
    digitalWrite(sonido, LOW); // Se crea un pulso para que EF Player ejecute sonido de rotura de la primera zona de rotura
    delay(200);
    digitalWrite(sonido, HIGH);
    delay(300); // espera para sincronizar con los leds
    digitalWrite(led_a1, HIGH);
    digitalWrite(led_a2, HIGH);
    delay(pausa_ab);  // Se espera antes de iniciar la segunda zona de rotura
    digitalWrite(sonido, LOW);
    delay(200);
    digitalWrite(sonido,HIGH); 
    digitalWrite(led_b1, HIGH);
    digitalWrite(led_b2, HIGH);
    delay(3000);
    digitalWrite(sonido, LOW);  //se crea un pulso para que EF Player ejecute efecto sonido "Siete años de mala suerte"
    delay(200);
    digitalWrite(sonido,HIGH); 
    delay(pausa_fin);
    digitalWrite(led_a1, LOW);
    digitalWrite(led_a2, LOW);
    digitalWrite(led_b1, LOW);
    digitalWrite(led_b2, LOW);
    pulso = millis();
    inicio = millis();
    delay(pausa_inicio);
  }
  
}

Conclusions

I think the project has been successful. By using a modern mirror, without Halloween decoration, it produces more fear when the music starts playing and talking.

I have made a second more sophisticated version of the mirror, like Snow White's magic mirror, you can "chat" with the mirror, but that will be another instructable.

Anecdote: The very first mirror fell off the wall and broke. Luckily we're friends with Steve Wonder and we don't like being Superstitious.