Jump to content

Recommended Posts

Posted

File Name: Thermal Detonator with Electronics
Designer: Oubliette
Last Update:[/color][/b]05/05/2015
File: https://www.thingiverse.com/thing:809004

 

Description:
May 4th, 2015: I have made this thermal detonator prop file available to the public and do so in deepest thanks to all the great crafters and enthusiasts of the prop building and costuming communities who have supported me over the years, all the amazing artists at Lucas Arts who have inspired this design as well as made fantastic film that I have spent far too much time enjoying. Finally a big thanks to everyone out there making really cool things for others to enjoy. I firmly believe that open-source licenses on prop designs is the way to go. Everyone benefits and the community and artists can grow their skills in leaps and bounds.  

 

Images:
TD_display_large.jpg

 

68747470733a2f2f70726f7074726f6e69782e63

 

68747470733a2f2f70726f7074726f6e69782e63

 

Electronics:

Name of project: Thermal Detonator Electronics

 

Link to project if found online: https://github.com/PropTroniX/Thermal-Detonator-Electronics-V1.0 

 

Software: Arduino

 

Board: Seeeduino 32bit 48MHz Microchip USB Type-C 

 

Components:
Parts Required
1 x Set of 3D STLFiles  - https://www.thingiverse.com/thing:809004
1 x [Thermal Detonator V1.0 PCB] - PCB for Components
1 x [Seeeduino XIAO] - 32bit 48MHz Microchip USB Type-C 
1 x [DFPlayer Mini MP3] - Mini MP3 Sound Player
1 x[PAM8403 Class-D Amplifier] - 2-channel, 3W, class-D Audio Amplifier
1 x [Micro SD-Card] - Minimum 512K
1 x [Mini Limit Lever Switch] - Used on the Slide Switch to Turn On/Off
1 x [Ball Tilt Sensor SW-520D] - (Activation Switch for Thermal Explosion
1 x [28mm Low Profile Speaker] - (Thermal Detonator Speaker
1 x [5mm Red LED] - Top LED - Power Indicator & LED Functions
1 x [5mm Red Flat Top LED Lens] - Top LED Power Indicator Cover
3 x [3mm LED] - Front 3 LED's - Can be any Colour but I use White or Yellow
7 x [JST PH-2.0 Male Lead] - Used to Connect the Components to the PCB
7 x [JST PH-2.0 Female Sockets] - Used to Connect the JST PH-2.0 Leads to the PCB
1 x [Header Pin Set]( - Used to for Connecting the Seeeduino, DFPlayer & PAM8403 to the PCB
3 x [3mm Metal LED Holder/Bezel]- Used for the Front LED's (Optionall)
1 x [Slide Switch Screws] - Used to Secure the Top Slide Switch to the Top Dome

 

 

Code: 
/*
   Thermal Detonator V1.0

   Released on: 21st June 2019
   Author:    PropTroniX (info@proptronix.co.uk)
   Source :   https://github.com/PropTroniX/Thermal-Detonator-V1.0
   Description: Light and Sound for a 3D Printed Class-A Thermal Detonator

   Electronics Parts Available at www.proptronix.co.uk
   Thermal Detonator V1.0 STL Files are Included FREE in the GitHub.
   
   This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
   To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.

*/

#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

SoftwareSerial mySoftwareSerial(7, 6); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void printDetail(uint8_t type, int value);

enum {NORMAL, SPECIAL} currentState = NORMAL;

//suffix N for Normal
byte led1StateN [] = {1, 1, 1, 1, 0, 0, 0, 1, 0};
byte led2StateN [] = {1, 0, 1, 0, 1, 1, 0, 1, 0};
byte led3StateN [] = {1, 0, 0, 1, 1, 0, 1, 0, 0};

//suffix S for Special
byte led1StateS [] = {1, 1, 1, 1, 1, 1, 1, 1, 0};
byte led2StateS [] = {1, 0, 1, 0, 1, 0, 0, 1, 0};
byte led3StateS [] = {1, 0, 0, 0, 0, 0, 1, 0, 0};

byte ledPin1 = 3;
byte ledPin2 = 4;
byte ledPin3 = 5;

int ledPinON = 2;
int triggerPin = 8;

int buttonState = 0;

unsigned long currentMillis;
unsigned long previousMillisPulse = 0;
int pulseInterval = 500;
bool pulseState = LOW;
unsigned long previousMillisBlink = 0;
int blinkInterval = 1000;

byte arrayPos = 0;
int passNumber = 1;

byte specialButtonPin = 14;

void setup()
{

  pinMode(triggerPin, INPUT);
  pinMode(ledPinON, OUTPUT);
  pinMode(ledPin1, OUTPUT);
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);
  digitalWrite(ledPin1, LOW);
  digitalWrite(ledPin2, LOW);
  digitalWrite(ledPin2, LOW);
  pinMode(specialButtonPin, INPUT_PULLUP);


  mySoftwareSerial.begin(9600);
  Serial.begin(115200);

  if (!myDFPlayer.begin(mySoftwareSerial)) {  //Use softwareSerial to communicate with mp3.
    while(true){
    }
  }
  
  myDFPlayer.volume(25);  //Set volume value. From 0 to 30


  myDFPlayer.play (3);
  delay (1500);

  myDFPlayer.play (2);
  delay (300);

}//setup

void loop()
{

  digitalWrite(ledPinON, HIGH);

  buttonState = digitalRead(triggerPin);

  if (buttonState == HIGH) {

    bomb ();

  } else {

    lights ();

  }
}


void lights()
{

  currentMillis = millis();
  doPulse();
  doStates();

}//lights

void doPulse()
{
  if (currentMillis - previousMillisPulse >= pulseInterval)
  {
    pulseState = !pulseState;
    digitalWrite(LED_BUILTIN, pulseState);
    previousMillisPulse = currentMillis;


  }
}

void doStates()
{

  switch (currentState)
  {
    case NORMAL:

      if (currentMillis - previousMillisBlink >= blinkInterval)
      {
        passNumber++;
        digitalWrite(ledPin1, led1StateN [arrayPos]);
        digitalWrite(ledPin2, led2StateN [arrayPos]);
        digitalWrite(ledPin3, led3StateN [arrayPos]);
        arrayPos++;
        if (arrayPos > 8)
        {
          arrayPos = 0;
        }
        previousMillisBlink = currentMillis;
      }

      if (!digitalRead(specialButtonPin))
      {
        currentState = SPECIAL;
        arrayPos = 0;
        previousMillisBlink = currentMillis;
      }

      break;

    case SPECIAL:

      if (currentMillis - previousMillisBlink >= blinkInterval)
      {
        passNumber++;
        digitalWrite(ledPin1, led1StateS [arrayPos]);
        digitalWrite(ledPin2, led2StateS [arrayPos]);
        digitalWrite(ledPin3, led3StateS [arrayPos]);
        arrayPos++;

        previousMillisBlink = currentMillis;
      }

      if (arrayPos > 8)
      {
        currentState = NORMAL;
        arrayPos = 0;
//        Serial.println(" ******* Going to NORMAL ********");
      }

      break;

  }//switch
}//doStates

void bomb ()  {

  myDFPlayer.play (1);
  delay (300);

  for (int counter = 1; counter <= 40; counter = counter + 1) {
    digitalWrite(ledPin1, HIGH);
    digitalWrite(ledPin2, HIGH);
    digitalWrite(ledPin3, HIGH);
    digitalWrite(ledPinON, LOW);
    delay(100);
    digitalWrite(ledPin1, LOW);
    digitalWrite(ledPin2, LOW);
    digitalWrite(ledPin3, LOW);
    digitalWrite(ledPinON, HIGH);
    delay(100);

  }
}


Image:
68747470733a2f2f70726f7074726f6e69782e63

 

 

Wiring:
68747470733a2f2f70726f7074726f6e69782e63

 

 

 

Video:[/color][/b] 

 

 

 

 

 

  • Like 3
  • Love 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...