Arduino Forum

Using Arduino => Project Guidance => Topic started by: zoom on Jul 04, 2014, 07:17 pm

Title: Beep sound problem with MSGEQ7
Post by: zoom on Jul 04, 2014, 07:17 pm
There are a lot of tutorials and also guidance on the datasheet. However, even though I repeated the same procedures over and over again, there is a constant beep sound and LED is on when I connect an LED to analog output which has the output of the msgeq7 IC's signal.

Even the LED is not connected to 3.5mm jacks at all. So, how come this constant beep sound comes from the speaker.

Any idea what about the probably problem or anyone come across such a problem.

Title: Re: Beep sound problem with MSGEQ7
Post by: DVDdoug on Jul 04, 2014, 07:49 pm
Sorry if this is a dumb question, but do you have a resistor in series with the LED, or is the LED connected directly to the Arduino?
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 04, 2014, 08:00 pm

Sorry if this is a dumb question, but do you have a resistor in series with the LED, or is the LED connected directly to the Arduino?


Directly connected. However, tried with a resistor in series but as expected nothing changed but the brightness.
Title: Re: Beep sound problem with MSGEQ7
Post by: Grumpy_Mike on Jul 04, 2014, 08:07 pm
Quote
Directly connected.

BAD BAD BAD

Even if it did not solve your immediate problem it will cause others.

Quote
There are a lot of tutorials and also guidance on the datasheet.

So which one are you trying to follow? Link please.
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 04, 2014, 08:33 pm

Quote
Directly connected.

BAD BAD BAD

Even if it did not solve your immediate problem it will cause others.

Quote
There are a lot of tutorials and also guidance on the datasheet.

So which one are you trying to follow? Link please.


Why is it so ? I always used LEDs directly. I really don't know the potential problems ?

This is one of the tutorials I've found;
http://nuewire.com/info-archive/msgeq7-by-j-skoba/

And this is the Data sheet contains the extra component connection schemes;

https://www.sparkfun.com/datasheets/Components/General/MSGEQ7.pdf

Thank you.
Title: Re: Beep sound problem with MSGEQ7
Post by: Grumpy_Mike on Jul 04, 2014, 08:55 pm
Quote
Why is it so ? I always used LEDs directly. I really don't know the potential problems ?

The problems that you are destroying either your LED or the thing that drives it.
Read this:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html (http://www.thebox.myzen.co.uk/Tutorial/LEDs.html)

Thanks for the link. So now you need to post what you are doing. A good quality photograph, less that 1000 pixels wide woul be a good start.
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 04, 2014, 09:56 pm

Quote
Why is it so ? I always used LEDs directly. I really don't know the potential problems ?

The problems that you are destroying either your LED or the thing that drives it.
Read this:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html (http://www.thebox.myzen.co.uk/Tutorial/LEDs.html)

Thanks for the link. So now you need to post what you are doing. A good quality photograph, less that 1000 pixels wide woul be a good start.


Ooh I didn't know it is that serious. Thank you!

Below the photos of the setup and thank you for your interest

(http://thumbnails109.imagebam.com/33682/591367336814729.jpg) (http://www.imagebam.com/image/591367336814729) (http://thumbnails112.imagebam.com/33682/b4f5cf336814759.jpg) (http://www.imagebam.com/image/b4f5cf336814759) (http://thumbnails109.imagebam.com/33682/4e7c02336814807.jpg) (http://www.imagebam.com/image/4e7c02336814807) (http://thumbnails111.imagebam.com/33682/353ef1336814867.jpg) (http://www.imagebam.com/image/353ef1336814867)
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 05, 2014, 12:12 am
Okay, I did some debugging and concluded that when I read the left or right channel of the audio signal through A0 input of arduino, I read "0" all the time. However, when the end of the cable connected to the A0 input is floating, there is some random noise and when I touch the cable it changes prominently.

The thing is, I get the audio signal from laptop's audio output and channel it to the speaker over breadboard, meaning the signal is there on the breadboard and going to the speaker without any problem, but when it comes to reading it through an Analog input, there is nothing.
Title: Re: Beep sound problem with MSGEQ7
Post by: Grumpy_Mike on Jul 05, 2014, 12:17 am
Quote
when the end of the cable connected to the A0 input is floating, there is some random noise and when I touch the cable it changes prominently.

That is exactly what I would expect.

Quote
but when it comes to reading it through an Analog input,

What do you mean by that?
Can you post a schematic of what you have actually done. I can't marry up those photos with the schematic on that link.
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 05, 2014, 12:58 pm

Quote
when the end of the cable connected to the A0 input is floating, there is some random noise and when I touch the cable it changes prominently.

That is exactly what I would expect.

Quote
but when it comes to reading it through an Analog input,

What do you mean by that?
Can you post a schematic of what you have actually done. I can't marry up those photos with the schematic on that link.


I simply get the left channel of the audio signal through a 3.5mm Jack and connected it to A0 (analog input 0)

Datasheet below;
https://www.sparkfun.com/datasheets/Prototyping/Audio-3.5mm.pdf

pin 2 and 3 are the same pins for left channel. So, audio signal is coming from computer and going to the arduino. However, I read "0"
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 05, 2014, 01:25 pm
A new, more clear setup.

(http://thumbnails112.imagebam.com/33698/367357336977655.jpg) (http://www.imagebam.com/image/367357336977655) (http://thumbnails112.imagebam.com/33698/174679336977689.jpg) (http://www.imagebam.com/image/174679336977689) (http://thumbnails110.imagebam.com/33698/4ae922336977716.jpg) (http://www.imagebam.com/image/4ae922336977716) (http://thumbnails111.imagebam.com/33698/55e4ae336977746.jpg) (http://www.imagebam.com/image/55e4ae336977746)
Title: Re: Beep sound problem with MSGEQ7
Post by: Grumpy_Mike on Jul 06, 2014, 01:11 am
The capacitor between pins 1 & 2 is for supply decoupling. This should be a ceramic type capacitor, not the type that you have used. It could be that the chip is oscillating as a result.
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 06, 2014, 12:53 pm

The capacitor between pins 1 & 2 is for supply decoupling. This should be a ceramic type capacitor, not the type that you have used. It could be that the chip is oscillating as a result.


Are you sure that's the reason or is this just a guess ?

Also I do wonder why I read "0" from the audio signal input ?
Title: Re: Beep sound problem with MSGEQ7
Post by: Grumpy_Mike on Jul 06, 2014, 01:32 pm
Quote
Are you sure that's the reason or is this just a guess ?

I am sure that the capactor you have used is useless for the task you have give it so it needs changing in any case. if you have anything else wrong it is hard to say at this stage. You must always correct the things that are wrong when ever you see them. As itcouldexplain everything and needs changing anyway then you loose nothing by changing it.
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 06, 2014, 10:13 pm

Quote
Are you sure that's the reason or is this just a guess ?

I am sure that the capactor you have used is useless for the task you have give it so it needs changing in any case. if you have anything else wrong it is hard to say at this stage. You must always correct the things that are wrong when ever you see them. As itcouldexplain everything and needs changing anyway then you loose nothing by changing it.


Okay. Thank you so much. I'll try to find a ceramic one and replace it.
Title: Re: Beep sound problem with MSGEQ7
Post by: zoom on Jul 09, 2014, 07:23 pm


Quote
Are you sure that's the reason or is this just a guess ?

I am sure that the capactor you have used is useless for the task you have give it so it needs changing in any case. if you have anything else wrong it is hard to say at this stage. You must always correct the things that are wrong when ever you see them. As itcouldexplain everything and needs changing anyway then you loose nothing by changing it.


Okay. Thank you so much. I'll try to find a ceramic one and replace it.


So, changed the capacitor but problen insisted. Then check the code once again and realised I used the same output twice. Now it is working with even plastic capacitors (FYI). Also noise of LEDs are gone.

Title: Re: Beep sound problem with MSGEQ7
Post by: Grumpy_Mike on Jul 09, 2014, 09:33 pm
Glad it is working.
Quote
Now it is working with even plastic capacitors (FYI)

Even so it needs to be ceramic to work effectively. You have what is known as a better margin with a ceramic. This will apply to susceptibility to interference as well and you haven't tested for that.