Introduction: Bedazzler: DIY Non-lethal Weaponry

About: All-original DIY electronics kits - Adafruit Industries is a New York City based company that sells kits and parts for original, open source hardware electronics projects featured on www.adafruit.com as well a…



Our first open source Homeland Security non-lethal weapon project - The "THE BEDAZZLER: A Do-it-yourself Handheld LED-Incapacitator".

After attending a conference where the $1 million "sea-sick flashlight" (named "THE DAZZLER") was demonstrated by the US Dept. of Homeland Security, we decided to create our own version. For under $250, you can build your own dazzler and we've released the source code, schematics and PCB files to make it easy. A great Arduino project for people who really like blinking LEDs. We also added in a mode selection so you can put it into some pretty color-swirl modes, great for raves and parties!

Yes this project does indeed cause: Nausea, dizziness, headache, flashblindness, eye pain and (occasional?) vomiting! So don't use it on your friends or pets.

Please note: This is not a kit, nor for sale...so don't ask us. All documentation is on the design and download pages.

Mad props to Scott Johnston for LED assistance. Sk0t r0x!

Step 1: Introduction


This project isn't a kit (and won't ever be) so the instructions are more laissez-faire, with many opportunities for the maker to change elements or modify the design. Take it more as a guideline (and use common sense) than a rigorous step-by-step!

Parts list

To make this project you'll need:

  • 36 or 37 1+ Watt LEDs. there are 2 Watt LEDs that are now easily available. For color versatility you can use 12 each of red green and blue. Or you can go with 18 each of green/blue for more effective dazzling. These range around $3 each. Look on eBay or other closeouts to get slightly-older LEDs for less. We used some older Cree XLamp XR-E 7090
  • You'll also need lenses/optics for each LED. Go with narrow-beam lenses, about 20mm diameter. 6 or 5 degree will be most effective. (Like this, but make sure you get ones that match your LED)
  • Balancing resistors, one for each LED. I used 1.0 ohm 1210's
  • For red LEDs (and maybe green/blue depending on your power supply) you may need a choke resistor 0.5 ohm at 5W may be OK. The internal resistance of the battery and Rds of the FET will make a difference, so do math and measurements!
  • 6" diameter LED plate, see the downloads page for layout. This holes the LEDs and lenses. In theory a aluminum core LED is helpful but we found that for quick blasting, FR4 with copper fill worked just fine.
  • 16 or 18 gauge wire for connecting things up
  • 6 N Channel logic level power MOSFETs. We used FDP6030BLs. Nearly anything that can sink 2A is just fine.
  • Arduino or other microcontroller. The AVR atmegax8 series such as found in the arduino is handy because it has 6 hardware PWMs. We used a DC boarduino and attached an FTDI cable to upload the firmware
  • Battery capable of sourcing 4A at 4V+. 3 D cells or a lead acid is a good choice. We used a 4A 6V SLA that came with the lantern
  • Heatsink. A spare AMD processor heatsink and fan worked nicely and was free!
  • 9V battery + holder with switch for the arduino, seperate supplies prevent noise issues when driving such large loads
  • Enclosure. We repurposed a cheap yet enormous flashlight from Sears. It was pricey at $40 but had the benefit of including a lead acid battery (which would have run almost $20 with shipping) and a basic lead acid charger.
  • Power supply for testing, a ATX power supply is a good way to generate 5A+ at 5V

Step 2: Build It: the PCB


You'll want to start by getting an LED plate fabbed at your favorite PCB manufacturer and acquiring all the materials necessary (image 2a).

Start by soldering in one color of LEDs (in the photo there are a few LEDs soldered in from other strings. Go with green to start. (image 2b)

You'll want a nice powerful soldering iron, use leaded solder since its hard enough to solder to the copper plane! (image 2c)

Use 1 ohm (or so) 1210's for the balancing resistors (image 2d)

For testing you'll want a benchtop supply, or use an ATX power supply with a jumper between the green power line and ground (image 2e)

Test the LEDs to make sure you put them in the right place. Each 'string' is 6 LEDs. (image 2f)

Solder in all the green LEDs (image 2g)

Step 3: Build It: the Controller


Once you have a single color in place, you'll want to build the controller. I used a boarduino (Arduino clone) but any microcontroller is fine. Wire up the power FETs so that the gates are connected to the hardware PWM outputs, and the sources to ground. (images 3a & 3b)

To make traces on perfboard high-current-capacity you can use a 20 gauge wire as a backing and solder on top to make a path. (image 3c)

Which you can sort of see here (image 3d)

You don't have to wire up all the FETs now, start with one. We used 5.08mm (0.2") terminal blocks to make wiring easy (image 3e)

Step 4: Build It: Testing & the Heatsink


Do lots of testing and be careful to connect power up properly since there are no protection diodes (image 4a)

You can load some PWM testing firmware onto the microcontroller to check the LEDs as you work (image 4b)

Complete soldering in all the LEDs (image 4c)

A final test PWMing through all the LEDs. It heats up fast so keep the max power low and/or dont run it more than half a minute. (image 4d)

Since we were too cheap to get a proper metal PCB, we'll be attaching a heatsink to the outside. While far from ideal, a spare AMD processor heatsink worked just fine. Remove the fan, take off the metal clip and then reattach the fan. Check the fan to see if it will run off of 9V. Ours did OK (image 4e)

If you have thermal paste, spread some on the heatink. If you didn't tent the vias, use kapton tappe or similar to prevent them from shorting to the heatsink (image 4f)

Step 5: Build It: the Enclosure


Next up is the enclosure. We found the Dorcy 41-1088 lantern at Sears for about $40. Its very close to the right size so we went with it. (image 5a & 5b)

It looks like this. (image 5c & 5d)

Open up the bottom to reveal a 6V, 4A sealed lead acid battery. This battery works pretty well. There's enough internal resistance that when the LEDs are on, the voltage out drops to 4V which is rather convenient (image 5e)

It comes with a charger but putting it on a 7V benchtop supply will charge it much faster (about 4 hours instead of 20). (image 5f)

Step 6: Build It: More Testing & Reassembling the Body


Test the circuit with the heatsink and fan activated. (image 6a)

Then try it with the battery as the power supply (image 6b)

Check the temperature of the LEDs, we didn't get above 58 degrees C which is pretty good. (image 6c)

Open up the rest of the lantern and remove the reflector and halogen bulb. (image 6d)

Reassemble the body. (image 6e & 6f)

Extend the power lines and wire them to the main control PCB (image 6g)

Step 7: Build It: Attaching the PCB, Lenses, and Finishing Touches


The PCB is cut down and tucked into the slot behind where the reflector went (image 7a)

The plate sits in front, sadly its just slightly too small to go into the enclosure. However, this way there is more space for the heat sink. (image 7b)

Lenses are snapped onto the LEDs. I used superglue to tack them down. This is a major mistake so don't do what I did because then the fume damage the lenses and they need to be cleaned. There's probably a better glue to use. Perhaps epoxy? (image 7c)

A 9V battery is wired up to the arduino. All the lenses are put on (image 7d)

We cut out a simple lens protector from acrylic on our laser cutter. (image 7e)

Showing the fit before we finish. (image 7f)

With some gaff or packing tape to attach the lens protector, we're done! (images 7g & 7h)

Step 8: Hardware Files

This is all public domain, so enjoy!

*Schematic for LED plate in PNG format
The LEDs originally used are CREE Xlamp 7090 but any 1+ Watt LEDs work OK. The balancing resistors are about 1 ohm, but can be adjusted. Use 2 sets of 6 LEDs for full tri-color (more versatile). Or 3 sets of 6 LEDs for green/blue only (more effective)

The arduino (or compatible) is hooked up to the LEDs via logic-level N-channel FETs. The diagram shows 2 groups of 3 colors but can be easily changed for 2 colors. If red LEDs are used, a 0.5 ohm, 5W led should be placed in series with the wire to the LED plate.

Code:

// Bedazzler! A good multiple LED PWM project, by Limor Fried
// Public domain 2009

#include <util/delay.h>
int value;
int redpin1 = 5, redpin2 = 6;
int greenpin1 = 3, greenpin2 = 11;
int bluepin1 = 9, bluepin2 = 10;

int ledmax;

#define GLITTER 0
#define SWIRL 1
#define DAZZLE 2

volatile int mode = DAZZLE;

// we use a button on pin 2 (interrupt pin) to detect mode changes
void modechange(void)
{
// debounce it
if (digitalRead(2) == LOW) {
_delay_ms(10);
if (digitalRead(2) != LOW)
return;
Serial.println("button");
mode++;
if (mode > 2)
mode = 0;
Serial.print("new mode! ");
Serial.println(mode, DEC);

}
}

void setup()
{
pinMode(2, INPUT);
digitalWrite(2, HIGH); // pullup on mode button
attachInterrupt(0, modechange, CHANGE);

Serial.begin(9600);

randomSeed(analogRead(0));

// nothing for setup
analogWrite(redpin1, 0);
analogWrite(redpin2, 0);
analogWrite(greenpin1, 0);
analogWrite(greenpin2, 0);
analogWrite(bluepin1, 0);
analogWrite(bluepin2, 0);

ledmax = 250; // change this value to adjust the maximum brightness
}

void loop()
{
switch(mode) {
case SWIRL:
//Serial.println("swirl");
ckswirl(ledmax, 10);
break;
case GLITTER:
//Serial.println("glimmer");
glimmertest(ledmax, ledmax/10, 30);
break;
case DAZZLE:
//Serial.println("dazzle");
bedazzle(ledmax, 10, 7, 11);
break;
}

}

void bedazzle(int ledmax, int pulselensec, int freqmin, int freqmax) {
long pulses;

analogWrite(redpin1, 0);
analogWrite(redpin2, 0);
analogWrite(greenpin1, 0);
analogWrite(greenpin2, 0);
analogWrite(bluepin1, 0);
analogWrite(bluepin2, 0);

// note we dont use red LEDs in this
int freq = random(freqmin, freqmax+1);
int pulsedelay = 1000/freq;
pulsedelay /= 2;

pulses = pulselensec;
pulses *= 1000;
pulses /= 2*pulsedelay;

/*
Serial.print("pulsing at ");
Serial.print(freq, DEC);
Serial.print(" Hz (");
Serial.print(pulsedelay, DEC);
Serial.println(" ms on/off)");
Serial.print(pulses);
Serial.println(" pulses");
*/

while (pulses--) {
analogWrite(greenpin1, ledmax);
analogWrite(greenpin2, ledmax);
analogWrite(bluepin1, ledmax);
analogWrite(bluepin2, ledmax);
_delay_ms(pulsedelay);
analogWrite(greenpin1, 0);
analogWrite(greenpin2, 0);
analogWrite(bluepin1, 0);
analogWrite(bluepin2, 0);
_delay_ms(pulsedelay);
if (mode != DAZZLE) return;
}

}

void ckswirl(int ledmax, uint8_t z) {
int r, g, b;

// fade from red to orange to yellow to green
for (g=0; g// turn red down
analogWrite(redpin1, ledmax-g);
analogWrite(redpin2, ledmax-g);
analogWrite(greenpin1, g); // sets the value (range from 0 to 255)
analogWrite(greenpin2, g); // sets the value (range from 0 to 255)
delay(z);

if (mode != SWIRL) return;
}
// fade from green to blue
for (b=0; b// turn red down
analogWrite(bluepin1, b);
analogWrite(bluepin2, b);
analogWrite(greenpin1, ledmax-b); // sets the value (range from 0 to 255)
analogWrite(greenpin2, ledmax-b); // sets the value (range from 0 to 255)
delay(z);

if (mode != SWIRL) return;
}
// from blue to red
for (r=0; r// turn red down
analogWrite(redpin1, r);
analogWrite(redpin2, r);
analogWrite(bluepin1, ledmax-r); // sets the value (range from 0 to 255)
analogWrite(bluepin2, ledmax-r); // sets the value (range from 0 to 255)
delay(z);

if (mode != SWIRL) return;
}
}

void glimmertest(int maxvalue, int incr, int z) {

for(value = 0 ; value <= maxvalue; value+=incr)
{
analogWrite(greenpin1, value); // sets the value (range from 0 to 255)
analogWrite(greenpin2, maxvalue-value); // sets the value (range from 0 to 255)
analogWrite(bluepin1, value);
analogWrite(bluepin2, maxvalue-value); // sets the value (range from 0 to 255)
analogWrite(redpin1, value);
analogWrite(redpin2, maxvalue-value); // sets the value (range from 0 to 255)
delay(z); // waits for 30 milli seconds to see the dimming effect

if (mode != GLITTER) return;
}
for(value = maxvalue; value >=0; value-=incr) // fade out (from max to min)
{
analogWrite(greenpin1, value);
analogWrite(greenpin2 , maxvalue-value); // sets the value (range from 0 to 255)
analogWrite(bluepin1, value);
analogWrite(bluepin2, maxvalue-value); // sets the value (range from 0 to 255)
analogWrite(redpin1, value);
analogWrite(redpin2, maxvalue-value); // sets the value (range from 0 to 255)
delay(z);

if (mode != GLITTER) return;
}
}

Arduino Contest

Second Prize in the
Arduino Contest