amiravni / LightFun

Music controlled RGB led strip with FIR and arduino
17 stars 11 forks source link

Using FC-109 module but not getting output #1

Open tusharvb19 opened 8 years ago

tusharvb19 commented 8 years ago

I am using this module having fixed 20dB gain i.e. 10x!!!

http://electropit.com/index.php/2015/12/20/fc-109-max9812-microphone-amplifier-module/

Can you help me to modify your code to get it work!

amiravni commented 8 years ago

The code stays the same, but the power to the mic should be 5 volts instead of 12 volts.

tusharvb19 commented 8 years ago

I have connected the vcc to 5V only..but I have not connected the LPF! Will try tomorrow with the LPF. Is LPF is compulsory?

amiravni commented 8 years ago

You can try without first, might be more noisy

tusharvb19 commented 8 years ago

Without LPF it gets continuously on and much noise! Will try with LPF. And I have connected IRF mosfets without registers to led strip.This can cause issue?

amiravni commented 8 years ago

IRF MOSFETs are fine, but what do you mean without registers? Without connecting them? So how do you know it works?

tusharvb19 commented 8 years ago

I have already built this circuit but as i am not having MSGEQ7 I am using FC-109 amp module and will integrate your code sir. So ignore the MSGEQ7 connections and I am using IRF540N (http://www.infineon.com/dgdl/irf540n.pdf?fileId=5546d462533600a4015355e396cb199f).

http://i.imgur.com/nBmupB6l.png

Full blog here http://russe11m.blogspot.in/2013/08/arduino-powered-rgb-led-strip-controller.html

tusharvb19 commented 8 years ago

Now I am using completely your circuit except the mic module! I am using FC-109. But still I am not getting the desired output as you have shown in your video!

This is my serial monitor without music.(local noise though)

TIME: 60,70412 NoFiltVal: 10 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0 TIME: 60,70424 NoFiltVal: 10 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0 TIME: 60,70496 NoFiltVal: 10 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0 TIME: 60,70432 NoFiltVal: 10 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0 TIME: 64,70460 NoFiltVal: 10 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0 TIME: 60,70444 NoFiltVal: 10 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0 TIME: 60,70436 NoFiltVal: 10 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0 TIME: 64,70424 NoFiltVal: 9 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0 TIME: 60,70376 NoFiltVal: 10 Val: R = 9 G = 0 B = 0 MinMax: R = 0,1 G = 0,10 B = 0,20 Bright: R = 235 G = 0 B = 0 LastBright: R = 235 G = 0 B = 0

And with EDM playing through phone-

TIME: 60,70596 NoFiltVal: 36 Val: R = 32 G = -4 B = -1 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 39 B = 0 LastBright: R = 180 G = 39 B = 0 TIME: 64,70840 NoFiltVal: 32 Val: R = 29 G = -1 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 152 G = 0 B = 0 LastBright: R = 160 G = 37 B = 0 TIME: 60,70708 NoFiltVal: 33 Val: R = 31 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 171 G = 0 B = 0 LastBright: R = 171 G = 35 B = 0 TIME: 64,70484 NoFiltVal: 42 Val: R = 32 G = 0 B = -1 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 0 B = 0 LastBright: R = 180 G = 33 B = 0 TIME: 60,70556 NoFiltVal: 34 Val: R = 31 G = -2 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 171 G = 9 B = 0 LastBright: R = 171 G = 31 B = 0 TIME: 64,70608 NoFiltVal: 26 Val: R = 30 G = 0 B = 2 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 161 G = 0 B = 4 LastBright: R = 161 G = 29 B = 4 TIME: 64,70472 NoFiltVal: 42 Val: R = 31 G = 0 B = -1 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 171 G = 0 B = 0 LastBright: R = 171 G = 27 B = 0 TIME: 64,70544 NoFiltVal: 30 Val: R = 33 G = 3 B = 3 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 189 G = 24 B = 17 LastBright: R = 189 G = 25 B = 17 TIME: 60,70628 NoFiltVal: 12 Val: R = 32 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 0 B = 0 LastBright: R = 180 G = 23 B = 10 TIME: 60,70360 NoFiltVal: 33 Val: R = 31 G = 0 B = -2 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 171 G = 0 B = 4 LastBright: R = 171 G = 21 B = 4 TIME: 60,69904 NoFiltVal: 15 Val: R = 32 G = -3 B = 2 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 24 B = 4 LastBright: R = 180 G = 24 B = 4 TIME: 64,70460 NoFiltVal: 30 Val: R = 28 G = -3 B = -2 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 143 G = 24 B = 4 LastBright: R = 160 G = 24 B = 4 TIME: 60,70708 NoFiltVal: 28 Val: R = 32 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 0 B = 0 LastBright: R = 180 G = 22 B = 0 TIME: 60,70352 NoFiltVal: 32 Val: R = 32 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 0 B = 0 LastBright: R = 180 G = 20 B = 0 TIME: 60,70552 NoFiltVal: 21 Val: R = 30 G = -3 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 161 G = 24 B = 0 LastBright: R = 161 G = 24 B = 0 TIME: 60,70552 NoFiltVal: 31 Val: R = 31 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 171 G = 0 B = 0 LastBright: R = 171 G = 22 B = 0 TIME: 60,70384 NoFiltVal: 27 Val: R = 31 G = -2 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 171 G = 9 B = 0 LastBright: R = 171 G = 20 B = 0 TIME: 60,70364 NoFiltVal: 31 Val: R = 32 G = 2 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 9 B = 0 LastBright: R = 180 G = 18 B = 0 TIME: 64,70448 NoFiltVal: 27 Val: R = 31 G = 0 B = -3 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 171 G = 0 B = 17 LastBright: R = 171 G = 16 B = 17 TIME: 60,70884 NoFiltVal: 33 Val: R = 32 G = -1 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 0 B = 0 LastBright: R = 180 G = 14 B = 10 TIME: 64,70584 NoFiltVal: 31 Val: R = 31 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 171 G = 0 B = 0 LastBright: R = 171 G = 12 B = 3 TIME: 60,70308 NoFiltVal: 29 Val: R = 30 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 161 G = 0 B = 0 LastBright: R = 161 G = 10 B = 0 TIME: 60,69996 NoFiltVal: 41 Val: R = 32 G = -2 B = -2 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 9 B = 4 LastBright: R = 180 G = 9 B = 4 TIME: 60,70356 NoFiltVal: 35 Val: R = 32 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 0 B = 0 LastBright: R = 180 G = 7 B = 0 TIME: 60,70292 NoFiltVal: 31 Val: R = 32 G = 0 B = -1 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 180 G = 0 B = 0 LastBright: R = 180 G = 5 B = 0 TIME: 60,70508 NoFiltVal: 29 Val: R = 34 G = 0 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 198 G = 0 B = 0 LastBright: R = 198 G = 3 B = 0 TIME: 60,70440 NoFiltVal: 42 Val: R = 30 G = 3 B = -1 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 161 G = 24 B = 0 LastBright: R = 178 G = 24 B = 0 TIME: 60,70780 NoFiltVal: 33 Val: R = 33 G = 1 B = 0 MinMax: R = 0,28 G = 0,17 B = 0,20 Bright: R = 189 G = 0 B = 0 LastBright: R = 189 G = 22 B = 0

amiravni commented 8 years ago

It's a bit hard to debug it from here :) Did you use the exact components values for the LPF? Try to input a frequency sweep and then you might understand were exactly the problems are: https://www.youtube.com/watch?v=hvkipAlRKq0

tusharvb19 commented 8 years ago

Yes I am using the exact values and hardware except the module as FC_109( fixed 20dB/10x). What will be the values(No filt Val) on serial monitor if I am playing frequency sweep?

amiravni commented 8 years ago

take a look on the filters visualization in the post: http://www.whatimade.today/lets-make-some-signal-processing-with-an-arduino/

You should see the leds react to the sweep according to the filters

  1. LPF - Should react up to around 300Hz ( probably will react a bit up to 1Khz as well)
  2. BPF - Should react to frquencies 2Khz-4.5Khz (probably a bit more than that)
  3. HPF - Should react to frequencies higher than 4Khz

Since they're all digital filters these are "more-or-less" the numbers. But if you see the led connected to the HPF output light with low frequencies it should point out there's a problem.

tusharvb19 commented 8 years ago

I think due to low 20dB output it is not giving expected output.. Now the leds and No filt values varies according to frequencies and on seep test but they are not switching to off!