Hey. I am trying to make addressable led lights react to music with arduino nano. Im just a beginner so dont blame. First problem i have encountered is that I am getting very random readings from my sound detector I am using. It jums from 0 to maximum value 1023 even in complete silence. Doesnt react to music much at all. Not sure what is wrong or my sound detector is broken.
First read the "how to use this forum" post and edit your original post. The forum software has eaten some of your code.
Second, did you think it might be useful information to describe the "sound sensor" or give us a part number we can look up? Prefereably a web link (in [ url] tags) for where you bought it.
Do you get anything different from the module's two outputs? Analog and Digital should be different. You are describing the behaviour of the digital output connected to an analog input.
Does adjusting the trimpot do anything?
This is probably going to work poorly as a beat detector. Usually you need some analog filtering to remove any high frequency sound energy in order to detect the low-frequency drumbeats. It would be worthwhile expanding your search to more expensive modules.
I have connected analogue input of sound detector to analogue pin of arduino so they both analogue? Yeah i did not expect anything great from it but jumping from 0 to maximum and random values are not what i expected to see.. Il have a look at some more expensive ones
The readings im getting is on the first post of the tread i have attached it. Adding another picture of my circuit. Its confusing but i can try to explain.
analogue pin from sound sensor > A0 pin of arduino
D6 pin of arduino > LED drive pin
all share chips share same +5v and same ground. there is not much else to it
Okay... Very strange thing are happening. I have tryed chaning the number of leds to 15 instead of 120. Firstly when i uploaded the sketch, 15 leds kept blinking randomly until i disconnected +5v and connected again. Now 15 Leds react fine to music. I have tryed with 25 aswell it kinda works but seems that the more leds i use the worse sound detector readings get.
If you are going to have long jumpers like that be sure to run each signal wire in parallel with a ground
wire, otherwise you'll risk picking up interference - you effectively have a set of random loop-antennas.
Neat and compact layout is less likely to have such issues. Can't say if thats the problem, but best to
improve the layout in case.
Leds on the side of the breadboard are not connected to the part of the circuit im working althought i have removed them. I took blue wire from converter out of the circuit for the second i was taking picture to disconnect the power from the circuit.