Arduino Strobe / Stroboscopic Lamp

39,167

117

17

Posted

Introduction: Arduino Strobe / Stroboscopic Lamp

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.

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

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • First Time Author Contest 2018

    First Time Author Contest 2018
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

17 Comments

WOn't the resistor on the transistor suffice, ??

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.

please add a video,

thnks

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.