Hi everyone,
I´m working in a project that aims to modify the light brightness of a white LED Strip (12V and GND), the brightness will modify in funtion of the sound detected by a module with amplificator and microphone (MAX 4466), at this point, the led Strip turns on but brightness doesn't change much with the sound.
Following, you can find the list of components used in this project.
MAX4466 Module with microphone and gain adjustment.
White LED Strip 1 meter - 12V (Two pins: 12V+ y GND)
Power supply 12V 1 A
Transistor TIP120
1k Ohm Resistor
Arduino UNO R3
This is the schematic.
Note: Transistor, resistor and led strip are only for referecen, actual components are listed above.
This is the code uploaded in the Arduino.
int valorMic=0;
float luz=0;
void setup(){
pinMode(9,OUTPUT); // Pin 9 conected to base of the TIP transistor
}
void loop(){
valorMic=analogRead(2); //Analogical read of microphone
luz=valorMic*(255.0/1023.0); //
analogWrite(9,luz); //Signal sent to transistor base
}
I will apreciate any comment related to the code or hardware.
Thank you and have a great day.
