I am trying to figure out how to light an average size living room or bedroom with lights flashing at 40 Hz at the same time (one big light or many small ones). I assume the range can probably be +/- 3 Hz or less but the target is 40 Hz. This range appears to be out of the range of a common strobe... I know there are a million answers for this problem, I figure LEDs have a natural advantage (but could be incandescent), AC or DC options will be considered, but the most user friendly options will likely win out. I would like to set something up that even my grandmother could turn on without thinking twice.

The background information regarding why this is such a hot question on the internet can be found here: http://www.radiolab.org/story/bringing-gamma-back/

Thanks in advance!

  • 1
    \$\begingroup\$ Related to the recent Radiolab on new Alzheimer's research? Yup, just saw link :-), so far promising results on mice... \$\endgroup\$
    – vicatcu
    Dec 10, 2016 at 18:30
  • 6
    \$\begingroup\$ RED FLAG: Your idea has a rather high risk of triggering photosensitive epilepsy in people exposed to it. This could cause grave harm. Proceed with due caution. en.wikipedia.org/wiki/Photosensitive_epilepsy \$\endgroup\$ Dec 10, 2016 at 18:49
  • \$\begingroup\$ This is very achievable with standard LED light strips and one of the various PWM-via-power-MOSFET circuits that can be found here and elsewhere. \$\endgroup\$
    – pjc50
    Dec 10, 2016 at 19:15
  • \$\begingroup\$ Note that if you have multiple timers for different strips, their differences in timing will cause aliasing effects. \$\endgroup\$ Dec 11, 2016 at 1:17
  • 2
    \$\begingroup\$ I'm voting to close this question as off-topic because its too broad and generating a lot of useless answers. \$\endgroup\$
    – Voltage Spike
    Dec 12, 2016 at 18:11

4 Answers 4


As noted by Peter Camilleri: This might help sufferers of Alzheimer's disease, and I certainly hope it does, but it may cause problems for other people.

Generating a 40Hz square wave is not difficult. The simplest solution would likely be an astable 555 timer circuit. You could also use a microcontroller, but that is a significant hassle in comparison. Note that the 555 can only output 200mA, so you may need to put a transistor on the output to drive your light.

LED is probably the best choice for the light source. The filament in an incandescent bulb will remain hot and luminous briefly after it is switched off. At 40Hz, the overall effect might be more like a dim bulb than a flashing bulb. An LED will turn on and off abruptly.

One light is probably better as well, just because you won't have to have power wiring throughout the room for distributed lights. A single high power LED can provide significant illumination.

Think battery power, like a USB power bank. There are significant electrical safety problems associated with powering things from the mains, especially if the user is suffering from Alzheimer's disease. You want your system to present no hazard to the user.

This circuitry is relatively small and simple, so you could assemble it on stripboard/veroboard.

I would do it this way. USB Power Bank -> Astable 555 timer -> Driver transistor -> Light

Here is a calculator for the 555: http://www.ohmslawcalculator.com/555-astable-calculator


Technically, this is trivial. LEDs (including white) will switch much faster than 40Hz, so it's a matter of switching current to the LEDs.

Practically, it might be slightly more difficult because most consumer level products have a power supply + driver circuit built-in which cannot be switched that fast.

One approach would be to use 12V lamps with only resistors inside (some will have a driver and may not be suitable) and a beefy 12V supply. Then you could use a simple MOSFET to switch the current. A 555 timer or a cheap function generator could be used to drive the MOSFET (probably through a driver chip).

enter image description here

The function generator would have the advantage of a frequency display so the results would be repeatable. Using 12V also makes it less likely that someone will be accidentally electrocuted.

To nail this down more firmly, you need to define how much light you actually need, what safety standards you are working to (many of the power supplies will require an enclosure, fusing and maybe input filtering external to the metal case they come in) and how the lights will be mounted etc.


Essentially what you are doing is PWM dimming - just at 40 Hz instead of several KHz. (PWM dimming pulses the signal at a certain duty cycle for the brightness desired.) There are lots of LED lighting products designed to work with PWM dimming, mainly for RGB controllable color, and I'd just dive into that parts bin.

A typical LARGE RGB LED system is set up like this:

  • 12VDC power supply (sometimes 24V)
  • An RGB or monochrome brightness controller, which takes user input and generates 12V modulated with PWM.
  • An amplifier which inputs power and the 12V PWM signal, and outputs that same pulsed signal at much higher current.
  • The LED strips or spot lights, which then "shimmer" at whatever the PWM frequency is.

Normally the controllers have enough current to drive a few lights directly. For a large system, their output is used strictly as a signal into the amplifiers.

Commonly they have 3 channels (R G B). You can use monochrome lights and drive them off one channel, or split the signal to 3 channels and have 3 branches all monochrome. Or simply go RGB, but the color CRI may not be great.

Replace the controller with a simple circuit, perhaps 555 timer based, which outputs 12V PWM at fairly low current - only enough to gate the amplifier. Now you don't have to worry about switching power, the off-the-shelf amplifier does it for you.

You can make the LED lighting as bright as you please, depending on how many emitters and amplifiers you are willing to stack. Generally one amplifier will power more light than you're likely to want - 72W of LED light is quite a lot.


I am in the process of building one with an Arduino Uno R3. The process is very simple and can be completed for less than $20. Amazon has the R3 for less than $7.00 plus a starter kit with LEDs, jumpers, resistors etc. I am waiting on the kit to complete it but you can test your schematic at circuits DOT io . This will allow you to try out different configs without frying your hardware.

My Schematic: https://goo.gl/4WBKM1

The code for the controller is (not mine, credit included) :

/* Blink without Delay

Turns on and off a light emitting diode (LED) connected to a digital pin, without using the delay() function. This means that other code can run at the same time without being interrupted by the LED code.

The circuit: * LED attached from pin 13 to ground. * Note: on most Arduinos, there is already an LED on the board that's attached to pin 13, so no hardware is needed for this example.

created 2005 by David A. Mellis modified 8 Feb 2010 by Paul Stoffregen modified 11 Nov 2013 by Scott Fitzgerald

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay */

// constants won't change. Used here to set a pin number : const int ledPin = 13; // the number of the LED pin

// Variables will change : int ledState = LOW; // ledState used to set the LED

// Generally, you should use "unsigned long" for variables that hold time // The value will quickly become too large for an int to store unsigned long previousMillis = 0; // will store last time LED was updated

// constants won't change : const long interval = 25; // interval at which to blink (1000 milliseconds/40 = 25 ms intervals)

void setup() { // set the digital pin as output: pinMode(ledPin, OUTPUT); }

void loop() { // here is where you'd put code that needs to be running all the time.

// check to see if it's time to blink the LED; that is, if the // difference between the current time and last time you blinked // the LED is bigger than the interval at which you want to // blink the LED. unsigned long currentMillis = millis();

if (currentMillis - previousMillis >= interval) { // save the last time you blinked the LED previousMillis = currentMillis;

// if the LED is off turn it on and vice-versa:
if (ledState == LOW) {
  ledState = HIGH;
} else {
  ledState = LOW;

// set the LED with the ledState of the variable:
digitalWrite(ledPin, ledState);

} }

  • 3
    \$\begingroup\$ This is an extremely poor hardware design -- you're sourcing current for five LEDs from a single microcontroller pin. This is likely to cause damage to the microcontroller. \$\endgroup\$
    – user39382
    Dec 12, 2016 at 17:19
  • \$\begingroup\$ A solution would be a great accompaniment to the criticism. I have never worked with an Arduino before and the Circuits DOT io simulator indicated that this would work. \$\endgroup\$
    – Matthew
    Dec 12, 2016 at 18:37
  • \$\begingroup\$ @Matthew - The problem is with physical reality. Microcontroller pins can only source/sink a certain amount of current. Trying to run 5 LEDs from one pin may exceed the output's current capability -> the uC gets hot/broken. Your circuit would be better if the microcontroller switched a MOSFET or BJT on/off. This requires much, much less current from the uC. The transistor passes current through the LEDs. \$\endgroup\$
    – vofa
    Dec 12, 2016 at 20:40
  • \$\begingroup\$ @vofa thank you for the constructive response. I will research the method you mentioned. \$\endgroup\$
    – Matthew
    Dec 12, 2016 at 20:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.