Putting electronics into the Mandolorians Blaster
If you have one of our Mandalorian resin blaster kits or if you downloaded our files for this kit and printed them out yourself, this blog goes through the process of adding lights and sound to this blaster. The electronics and process used in this tutorial can also be used in any number of plasters. We also sell a small sound board kit which makes this easier for larger blasters or helmets, but for this small sidearm, we have to try to make this as compact as possible and not use the additional board. If you wish to order our soundboard for this project, please let us know that this is what you intend so we leave it unsoldered.
Parts: (Links to Amazon for parts)
- Arduino Mini Pro board
- DF Player MP3 board
- Tactile Push Button
- 1K Ohm Resistor
- Ribbon wire
- 20mm speaker
- CR2032 Cell batteries
- CR2032 Battery holder with switch
- 5mm Prewired 5V Red LED
- USB to TTL Programmer
This is the basic wiring schematic the boards for setting up either a blaster or helmet. (Please note that if you change the input for either the buttons or the LEDs this will have to be updated in the code.)
In the case of this blaster, we are going to only use the stage 2 LED and the Trigger button. We are also going to change a couple of pins on the Arduino to make wiring easier. The LED should be wired to pin 6 and the trigger to pin 4.
Programming the Arduiono and loading sound files
Its easiest to program the board before soldering everything up.
Here is as a set of demo sound files. Download them and put them exactly as they are in the zip file on a micro SD card. Click here
The directory structure should look like this
You are going to need the Arduino IDE found here.
You are going to need the Arduino libraries for the DF Mini which can be found here.
Click here to download the Blaster Arduino Code.
Hook up the USB TO TTL module to the board by inserting the board as shown. Be careful that the pins line up correctly. Note that DTR is on one end and GRD is on the other end of the row of pins. Make sure GRD lines up with GRD. If its correct your board should have a red LED light up on it.
Open up your Arduino IDE software on your computer. Unzip the code into your Arduino Code folder. This is usually a folder called Arduino in your documents. Load up the code into the IDE software.
Check that the pins you have your switches and LEDs attached to match the code. This code was written for using one of our PAD Soundboard circuit boards, but there isn't enough room in this blaster for the circuit board so we must wire everything directly.
You will need to set the software under the Tools Menu for the board we are using. You want to select "Arduino Pro or Pro Mini" for Board, ATmega328P (5V,16MHz) for the Processor. Make sure the USB to TTL is showing up and select it in the Port.
You should then be able to select Sketch --> Upload and the code will upload to your board. You should see lights flashing on the USB to TTL board as its uploading. (You may have to press on the connection to make sure you are getting a good connection between the TTL board and the Arduino while doing this. Since we are not soldering this connection sometimes its finicky. )
Setting Up the Trigger
We want to start by setting up the trigger. The springs used in this design are easily found in most ball point pens. You will need two springs. The shorter spring we will cut in half for the spring that goes up behind the trigger.
Once the trigger is working, we need to put in the micro switch so that the trigger will contact it to turn on the electronics.
You want to test fit the switch first before soldering on the leads. If it doesn't fit you can use some small files to file out the space to get it to fit perfectly. You can also cut down an cardboard nail board to help with this as well. (If its your wifes nail board, ask her first. I landed in the dog house taking mine wife's.).
Solder the wire onto leads of your switch. The two pins you want to use are usually diagonally across from each other. Use a multimeter and test your connections before pressing it into the spot. If its loose use a dot of CA glue to secure being very careful not to get any glue on the switch itself.
The next thing you want to do is to attach wires to your LED and then run them down the barrel and into the battery compartment. Also run wires to the battery compartment for the batteries and speaker and measure everything and mark them with a marker. Measure all the wires very carefully giving just enough wire to go to the correct pins on the boards. Measure it all a second time...then cut the wires.
The pins on the DF Player chip are pretty long and we need to trim them so that it will fit in the handle.
Once this is done begin wiring the boards together based on the schematic above. You need to be very careful with your wire lengths so that you have enough to wire it together but not enough that you have extra wire.
The blaster is powered by two CR2032 cells which go into a holder like the one shown. This is then put into the body of the blaster just behind the speaker. To turn the blaster one and off, you rotate out the side pannel and turn on the switch.
The battery holder has to be cut down to a just the bare essentials to fit.
The battery compartment must also be modified slightly if you are using the battery holder. You can use a dremel tool to do this.
You should hear the startup.mp3 file play when you power the blaster on. If you don't then check the connections between the Arduino and the Mp3 player chip.
If you have the USB to TTL plugged into the board, you can open up the Serial Monitor in the Arduino IDE software and see debugging information in the monitor. On startup it should tell you it initialized the DF Player and what directories it found files in. When you press the button if should tell you that the button was pressed.
This hardware setup can be used for a number of different blasters and additional triggers can be added for different sounds or light combinations.
This hardware setup can be used to also power indexable LEDs if you have a blaster that has a longer barrel and you want to see the "blast" travel. You can also hook up a bluetooth transmitter to the DF Mini Players output to send the audio to a louder speaker on your belt.