# Arduino Strobe / Stroboscopic Lamp

43,967

118

17

This instructable is about the Paty-Like strobe effect or Stroboscopic Lamp using leds.
In the photo I used the arduino 5v through a transistor to demonstrate the use of an out-surce power for using more leds and more power.
The potentionmeter is there working through the code to control the speed of the blink from 10/1000 of the second to a whole second.

One more thing, the code is actually the code of the blink example in the arduino software with a little modification.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: You Will Need

As many Leds as you want, but you will need coresponding power suplay and matching transistor
1 X 220ohm resistor
1 X 10k Potentiometer
Few Cabels

## Step 2: Leds

Connect the leds in a prallel connection, connect the (-) cathode to ground, connect the anode (+) to the emitter side of the transistor.
Connect the collector side of the transistor to V and the base to the arduino pin 13 through a 220ohm resistor.

## Step 3: Potentiometer

Connect the potentiometer's left pin to Arduino's 5v pin, the right pin to GND and the mid pin to analog 0 (A0)

## Step 4: The Code

```/*<br>  Modified Blink Example for a Stroboscopib Lamp
Created by Uria Dubinsky
*/

int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
int dd = map (analogRead (A0), 0, 1023, 10, 1000);  // Reads Potentiometer and maps it to an integer between 10 to 1000)
digitalWrite(led, HIGH);   // turn the LEDs on (HIGH is the voltage level)
delay(dd);               // wait for however long sets by the potentiometer
digitalWrite(led, LOW);    // turn the LEDs off by making the voltage LOW
delay(dd);               //  wait for however long sets by the potentiometer```

## Step 5: You Are Ready to Go...

Thats it, you are ready to go to the party...

I found that to find the best blink speed start from the festest, while it almost seems lighting continualy and start slowing down, the best speed is as fast as you but while you can see it blinking and notice the on/off clearly

## Recommendations

• ### Internet of Things Class

22,790 Enrolled

## 17 Discussions

That's the base resistor, you really need a current limiting resistor for the LEDs in practice wont matter. (probably shouldn't mention the obvious that with just two transistors and a couple of capacitors and resistors you could make the same strobe effect without the Arduino :)

In step 1 if pin 13 is at 0V and V = 5V won't a current in the order of hundreds of mA go through each LED and damage them? Why did this work for him?

You are limited to how much current the supply can deliver (battery?), the LEDs are flashing so the on time is not 100% (almost like a PWM). You will eventually burn the LEDs out but they will work a fair amount of time before that happens; White LEDs also run at a lot higher current

It probably worked for him without burning the LEDs because of the max current the battery can provide (yeah, I think he's using the battery for everything). If it had been an ideal voltage source (lol, there's no such thing) I think all the LEDs would burn unless the flashes would be at a really high frequency.

If it's really working/surviving because of the battery internal resistance, the supply volts would be pulled down and it is surprising it doesn't make the processor brownout and reset.

It is as you say. And there's feedback loop here: when the LEDs are on as the battery voltage decreases the emitter-base voltage decreases and so does the current through the transistor.

I agree with the need for resistors, I didnt had ones and desided to push them to the limit since on battery. Also I am a newby on arduino and electronics, i do have the basics but m missings some to. Thanks all for the comments i learned a lot just from reading. thanks.

This is a double example of how not to do it. LEDs should always have series resistors, preferably one per LED (or 1 per branch if you put the LEDs in series/parallel). And a 555 timer IC will do the job much cheaper and simpler. If you want a simple build Maplin do a kit.

2 replies

I agree wholeheartedly with with the need for resistors. Each LED needs a resistor or the one with lowest threshold will 'current hog' (in the business these resistors are often called "ballasting resistors" because they help balance the current between the LEDs, all of which have slightly different threshold voltages. I agree with others that this circuit seems to have a current limit set only by the power supply capability - if someone builds this with a very capable supply, the LEDs are goners. As a matter of fact, I suspect that as soon as the first LED burns up on this design, the current will be split between fewer remaining LEDs, which will burn up more quickly, likely leading to a domino-failure (which is faster as more LEDs burn up).

I suggest the author make some changes to avoid leading newcomers to burn up a lot of good LEDs.

Thank you, I was about to post this. Plus, the more time saving part of the project would have been a complete computer generated schematic, and custom PCB layout ready to made so it is a finished working design instead of just a rough circuit on a pin 'n socket prototype board. As is it is a lot of work and expense for something unready to use.

I love that you're using a simple analog controller (potentiometer) to control the digital input in a self-contained manner. Nice!