Erik Ballesteros
Created June 30, 2020

Simple Thermal Detonator

Ever wanted to have that one working prop for your Star Wars cosplay? Ever wanted to end up on an FBI watch list?

BeginnerFull instructions provided10 hours12

Things used in this project

Hardware components

Adafruit Trinket Mini - 3.3V Logic
×1
Micro Limit Switch - Hinge Lever Arm SPDT
×1
5 mm LED: Red
5 mm LED: Red
×1
High Brightness LED, White
High Brightness LED, White
×3
Slide Switch, Sub-Miniature
Slide Switch, Sub-Miniature
×1
Li-Ion Battery 100mAh
Li-Ion Battery 100mAh
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Resistor 220 ohm
Resistor 220 ohm
×1
Assorted Wire Bundle (26 AWG)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Super Glue
Rub-n-Buff
Sandpaper (Vary Grit)
Fill/Primer Spray Paint

Story

Read more

Custom parts and enclosures

Insert

This is the 3D printed part that all the electronics will be assembled to in order to house into the Thermal Detonator. Print this alongside the thingiverse files.

Thermal Detonator Shells and Button

Actual prop files. 3D print these out any material you like.

Schematics

Breadboard Schematic of Thermal Detonator

Could not import the exact microcontroller used, but created notes to document deviations from tutorial to eliminate confusion.

Code

Thermal_Detonator_Script

Arduino
Simply upload this to the arduino. When you click down on the lever switch, a sequence of LEDs begin lighting up. To stop the sequence, simply press and hold the lever switch until the red LED turns off, then release the lever switch.
int led[] = {1,0,2,3};
int toggle = 4;
int x = 0;

void setup() {
  //ASSIGNMENT OF THE LED PINS AND THE LEVER SWITCH FOR LOGIC 
  pinMode(led[0], OUTPUT);
  pinMode(led[1], OUTPUT);
  pinMode(led[2], OUTPUT);
  pinMode(led[3], OUTPUT);
  pinMode(toggle, INPUT);

}

void loop() {

  //FOR LOOP THAT KEEPS LEDS OFF UNTIL SWITCH IS ENGAGED
  for (int k = 0; k <= 3; k++)
  {
    digitalWrite(led[k], LOW);
  }
  
  // FOR LOOP THAT RUNS THROUGH THE THREE WHITE LEDS TO CREATE BLINKING SEQUENCE
  //IF SWITCH IS ENGAGED, RUN FOR LOOP
  if (digitalRead(toggle) == HIGH)
  {
    digitalWrite(led[0], HIGH);
    //FOR LOOP TO BLINK EACH WHITE LED 5 TIMES BEFORE PROCEEDING TO NEXT LED
    for (int i = 1; i <= 3; i++)
    {
      for (int j = 1; j <= 5; j++)
      {
        digitalWrite(led[i], HIGH);
        delay(750);
        digitalWrite(led[i], LOW);
        delay(300);
        //NESTED IF STATEMENT THAT TRIGGERS SEQUENCE TO SPEED UP TO TURN OFF LEDS IF SWITCH IS PRESSED AND HELD
        if (digitalRead(toggle) == HIGH)
        {
          break;
        }
      }
      digitalWrite(led[i], HIGH);
    }
    //WHILE LOOP TO TURN OFF LEDS WHEN SWITCH IS PRESSED AND HELD
    while (x < 1)
    {
      if (digitalRead(toggle) == HIGH)
      {
        digitalWrite(led[0], LOW);
        delay(1000);
        break;
      }
    }
  }

}

Credits

Erik Ballesteros

Erik Ballesteros

0 projects • 0 followers
JPL Engineer, man-child who “magically” makes stuff work. Currently building a fully autonomous Astromech droid. Doing stuff in between.

Comments