16 July 2024

Self-Defense LED Strobe Light Build Idea

Strobe Lights are widely used to temporarily blind and disorient targets. Do you need a strobe light for self-defense? 

This post explains the construction of a quick-and-easy microcontroller-based strobe light!

The idea is centered around the commonly available and cheap Digispark ATTiny85 Development Board but almost all Arduino Uno/Nano microcontroller boards works equally well here.

This is the schematic (click to enlarge):


The hardware setup is pretty simple so you can rig it up within a couple of minutes.

The P1 I/O of Digispark (U1) is configured as an output pin to drive an LED through a N-channel logic-level power Mosfet IRL520N (Q1). The next I/O is wired to the wiper of a 10K potentiometer (P1). This potentiometer lets you switch and control the LED in a convenient way - from fully off to fully on, and strobe effect (~ 2Hz to 25Hz) in between. The slide switch (S1) is the master power on/off switch.

The Digispark board has an onboard 5V fixed voltage regulator chip (78M05), so you can safely apply a DC voltage in 7.4V to 14.8V range through its VIN pin header (the onboard voltage regulator might work anywhere from about 7V to 35V, though at 35V it would overheat the voltage regulator chip very quickly).

This is the schematic of the Digispark ATTiny85 Microcontroller Development Board (click to enlarge):


This is the Arduino-Style Sketch (Code):

[code]

int driveLamp = 1; // Lamp Drive O/P = P1

int val = 0;

int onTime = 0;

int offTime = 0;

void setup() {

pinMode(driveLamp, OUTPUT); //P1 as O/P

}

void loop() {

val = analogRead(1); // Potentiometer I/P = P2

onTime = val;

offTime = (-2000000 / (onTime + 1000)) + 2000;

onTime = onTime / 4;

offTime = offTime / 4;

if (onTime > 12) {

digitalWrite(driveLamp, HIGH); }

delay(onTime);

if (onTime < 250){

digitalWrite(driveLamp, LOW); }

delay(offTime);

}

[/code]

The code simple and moderately straight forward.

Basically, it’s simply coded to turn the LED drive pin (P1) on and off with delays in between set by the travel of the potentiometer (P1) which’s directly linked to the A1 (P2) analog input of the tiny microcontroller.

This circuit is able to drive most discrete LEDs and special LED modules.

But remember, after connecting an LED (together with its optical parts, if any), you may have to employ additional electronics demanded by the light source (and/or the power source) chose for your particular application.

We used a 12VDC pink LED module to test our experimental 12VDC breadboard setup - it worked nice!


Finally a word of advice: For most people with epilepsy, exposure to strobe/flashing lights at certain intensities or to certain visual patterns can trigger seizures.

This condition is known as Photosensitive Epilepsy which's more common in children and adolescents!

That’s it. We hope you found this post informative and helpful!



No comments:

Post a Comment

We welcome your comments and opinions on our posts but play nice.

We will not edit or delete comments unless they contain off-topic statements or promotional links, false facts, spam or obviously fake profiles!