Arduino Nano + WS2812B + Music Sensor

Hi guys, I'm quite new in the Arduino "making a RGB stripe work with music" thing and so I came here to ask for some advice.

I have this:

  • Arduino Nano
  • Sound Sensor (analog)
  • 144 LED WS2812B Stripe

Sound Sensor plugged on 5v / GRD / A5 analog.
WS2812B stripe plugged on 5v / GRD / DIGITAL 6 PIN.
The Arduino, Sound Sensor and LED stripe are powered through the 5v USB.

Most of the codes "works" fine. The problem are being able to get the correct sensibility. Most of the cases the LED flashes are not so accurate, even regulating the potentiometer

Can you guys give me some hints on what do I need to do for this thing to become more accurate. I accept anything, even if I need to change something.

Best regards,
Blaz.

What sound sensor , what spec does it have, wiring diagram , code ?

flashes are not so accurate,

What would an accurate flash look like?

Use Serial monitor, Serial.print and see what levels, values etc. the code is joggling.

hammy:
What sound sensor , what spec does it have, wiring diagram , code ?

I'm using a basic sensor. I can't "draw" the diagram for you right now but it is very simple as I've described on the post. Both sound sensor and LED strip are on 5V + GND (5v on the Arduino), the sensor DATA is on A5 (on Arduino) and the LED strip DATA is on D6 (on Arduino).

I'am on at it's very basic using of Arduino, can't give any more specific information because I really don't know this a lot. So if there is anything more that you need information I can try to find for you guys.

ps: a pic of the sound sensor, is exactly like this one.

ps2: I've attached the code on this reply.

Regards.

led_reactive.txt (2.65 KB)

That is "a sensor". Which one, what data sheets etc.?

The Arduino, Sound Sensor and LED stripe are powered through the 5v USB.

Each LED can draw up to 60mA depending on the color & brightness. With 144 LEDs that's almost 9 Amps. USB can only supply about 1 Amp. You should have a bigger power supply.

There are (at least) 3 kinds of sound sensors. The most common type put-out an amplified & biased audio signal. Some put-out a DC voltage that varies with loudness. Some put-out a digital high whenever the signal above the a threshold (set by a pot).

Most of the codes "works" fine. The problem are being able to get the correct sensibility. Most of the cases the LED flashes are not so accurate, even regulating the potentiometer

Can you guys give me some hints on what do I need to do for this thing to become more accurate. I accept anything, even if I need to change something.

I have no idea what you mean by "accurate" but my [u]World's Simplest Lighting Effect[/u] takes a 20-second moving average for automatic sensitivity adjustment.

That post also has an attached bias schematic in case you want to directly plug-in a line-level or headphone-level signal, but it will also work with a sound sensor (but not the digital kind).

@DVDdoug
I missed the powering. It's a disaster.

Guys, may I remind you that I've started "messing" with Arduino recently. I know I'm doing dumb stuff with it, I'm a programmer and I'm trying to learn something new, initially, by myself, from zero. Don't be toxic with your reply's, again, I don't know anything about electronics and stuff, any positive tips and hints would be very much appreciated, I'm really trying to learn here.

Thanks for all the tips, I'm gonna change the power supply to a correct one and give a try on what you posted @DVDdoug!

regards.