i'm using arduino to dimmer 9 led strips with different output pins after an FFT audio analysis gives results at 60Hz = 16ms. [FFT is performed by a PC and sent to arduino using a RF24 module]
I started the project using SoftPWM on pins D2->D9 & A4 with a lower frequency update but now i'm having problems increasing the frequency update. I have already wired 6 copies of that board and i'm looking for a software solution
To diagnose the problem i performed a test sending a pwm value and zero at a certain frequency, if the frequency is high you can only see a lower emitted power
If I set the pwm once I have a stable signal (led intensity) If I set the pwm every ~10ms (10ms on @ certain pwm, 10ms at pwm=0) I have an unstable intensity, repeating the test on the pin 6 with a normal analogWrite i don't have the problem. With 10ms i clearly see it blinking at a random frequency (~20Hz=50ms), with 15ms I only see it random fluctuating
I'm using arduino Pro mini - 5V - 2kB Without signals arduino performs 16k cycles/second (most without changing anything), with a 10ms signal it runs at 14k cycles/second so it seems not a load problem.
Can someone help me regarding this problem?
- Should I change library
- Should I move to a lower level to rewrite a more performing library
- Should I use only 6 std pwm, draw again the board, print them again, weld all components again, and test it again?
Thanks!
PS: I can't create the SoftPWM tag for a reputation problem, can a moderator do that?