Simple Arduino Psychedelic Lamp

The biggest attraction in most discotheques is the colourful strobe lights which are often synchronised to the rocking music. Another interesting gimmick is the psychedelic light system which enlivens things up a bit by flashing one or more lamps infinitely in a random fashion.

Psychedelic Lamp

Psychedelic lamps are widely used for a mesmerizing experience. You can simply transform your home or office room into a mesmerizing space with psychedelic lamps as such nifty lamps feature entrancing patterns making them ideal for creating unique ambience, a party atmosphere, or a calming oasis for relaxation.

Also it is worthy to note that drug-free psychedelic light trips capable of creating very deep trance states have the potential to assist people in making positive changes.

So, what if you could use stroboscopic light as a type of psychedelic light therapy? Actually, using psychedelic brainwave entrainment as a type of psychedelic light therapy is nothing new.

Today’s build is a simple and super easy psychedelic lamp with an Arduino microcontroller. The idea is straight forward, it basically drives a bunch of lamps willy-nilly i.e. in a random manner.

The scheme cannot be simpler – an Arduino Nano, 4 LEDs, 4 Resistors and a 9V battery.

At this moment its outputs can fire some discrete LEDs only but you can setup more lamp channels together with an appropriate multichannel power driver adapter later to make it mightier by using diverse LED strings or LED strips.

Nano 4 LED Psychedelic Light Schematic

The hardware setup could turn in to a nice psychedelic lamp if you just upload this pretty simple code to it. Note at this point that you can use the built-in functions random() and randomSeed() to generate the pseudo-random numbers in Arduino which can be used for various projects.

int lamps[4] = {8,9,10,11};

void setup(){
  for (int jj; jj<sizeof(lamps)/sizeof(int);jj++){
    pinMode(lamps[jj],OUTPUT);
    delay(5);
  }
}

void loop(){
  digitalWrite(lamps[random(0,sizeof(lamps)/sizeof(int))],HIGH);
  delay(random(10,200));
  digitalWrite(lamps[random(0,sizeof(lamps)/sizeof(int))],LOW);
}

Just to make sure I was not fooling myself, I simulated this with the help of WOKWi. The result was as expected. Here is what I came up with:

Nano Psychedelic LEDs WOKWi

So, I simply picked out the psychedelic lamp theme and had some fun playing around with it. This time it would be nice to add a light sensor and/or sound sensor to modify the basic scheme to get a light responsive and/or sound responsive psychedelic lamp. The hasty decision is now to move on to a clear-cut concept but I will not for now.

Psychedelic LEDs Prototype

Excursus: ShiftPWM is a great Arduino Library for software PWM with shift registers. Maybe the next iteration will focus on that.

PWM 4 Channel Mosfet Module

Jumping to a quick conclusion, as previously mentioned a power driver circuitry serves you drive high-current lamps through the Arduino while building a powerful psychedelic light system. As an example, a 4-Channel PWM MOSFET module for that is shown below. However, Arduino offers you more than 10 channels, so roll up your sleeves now and add more channels to your psychedelic lamp. And so clam up, sit in that chair there and go into a deep trance!

App Electronics STM32H743ZIT6 technical specifications.

Leave a Reply

Your email address will not be published. Required fields are marked *