Are you a nerd who likes to party?
Well, it’s high time you put your skills to some work.
Turn up your house party with Bass reactive led strip lights. To get you a little excited, here is a demo..
The procedure to get this done is easy and cheap, so, here we go.
What you need?
- Arduino Uno R3: Buy here
- Sound Sensor: Buy here
- Led Strip lights 12V (AC power adapter included): Buy here
- Jumper Cables: Buy here
- IRF540 N-Channel Power MOSFET: Buy here You can buy other mosfets aswell but go for the bulky ones (TO-220).
- Breadboard: Buy here
- Speakers with sub-woofer: Buy here
There is no need to stick to the links that I have mentioned, do what your pocket allows.
NOTE: The sound sensor picks up the bass and therefore has to be kept close to sub-woofer. As close as possible.
Circuit
Now it is time to wire your project up! The following diagram shows all of the connections. These are the direct connections for the sake of simplicity, the number of wires on your actual project may vary since you will be using a breadboard and literally connecting wire to wire.
Use your 9 V wall adapter (that you got with the LED strip) to power the Arduino (plug it into the black component on the lower left side of the Arduino)
Arduino Code
I am assuming that you know the basics of Arduino. Not a problem even if you don’t. You can refer the beginner’s guide here.
If you still struggle with Arduino, just connect the AO pin of the sound sensor to the Gate pin of the mosfet. If not, let’s talk code.
#include <SoftwareSerial.h>
#define SS_output 7
#define LEDstrip 3
#define LEDstrip1 5
#define LEDstrip2 6
void setup()
{
pinMode(SS_output, INPUT); //AO of the Sound Sensor connected to Analog Pin 7
pinMode(LEDstrip, OUTPUT);
pinMode(LEDstrip1, OUTPUT);
pinMode(LEDstrip2, OUTPUT);
}
//This loop gets the sound sensor readings and forwards them to thed LED strip
void loop()
{
int soundstate = analogRead(SS_output);
analogWrite(LEDstrip, soundstate);
analogWrite(LEDstrip1, soundstate);
analogWrite(LEDstrip2, soundstate);
}
And that brings you to the end. Pick a song and chill.
If you like this, buy me a beer someday!
Top comments (0)