Can I use polarized cap to control line audio input safely?

I’m digging into my first project with an LED vu meter. Realized I bought polarized capacitors instead of non-polarized and the schematic I’m following shows the input jack going to a non polarized .1u ceramic cap before going to 100k resistors. Am I able to use my polarized capacitors for this or is that dangerous?

Attaching the schematic I’m following, credit to Scott Marley, the creator;

Yes, it is possible if you connect them as per the modified diagram.

2 Likes

Amazing, thank you! What about C3 and C4? Still not sure I understand polarity of capacitors based on how C1 and C2 are oriented in your revised diagram so just want to make sure I don’t mess up anything on those too. Thanks!

Install polarized capacitors so that the "+" end is connected to the circuit junction with the higher positive voltage.

So I guess that's where I'm not understanding something. I don't understand why the anode is going to the resistors and the cathode to the audio jack since the audio jack is sending +/- 5v AC (10v in total). WAIT I'm potentially realizing while writing this, is it due to the fact that it's alternating current meaning that the both the + and the - 5v result in the side with ONLY 5v DC having overall higher positive voltage? This might be a dumb question, but if I were sending +/- 10v AC instead, would the capacitor still be oriented with the anode on the resistor side?

Most importantly, is this revised diagram correct? (See C3 and C4)

That is unlikely, because audio line levels are typically less than +/- 1V AC (less than 2V peak to peak).

If the audio source IS sending +/- 5VAC (10 V p-p), that will very likely destroy the analog input. You would use a voltage divider in that case, to reduce the level to something sensible.

Why would you use 0.1uF polarized capacitors? non-polarized types greatly outnumber polarized types in that capacity range, and they are extremely cheap.

If you are planning to accommodate voltages like that, you can damage the Arduino so you would need protection circuits.

The Arduino can be damaged by negative voltages or voltages greater than +5V.

A line level audio connection is OK (the RCA connectors from a CD/DVD player, etc.) and a headphone-output is also OK.

A speaker output may put-out too-much voltage. In that case you may need an over-voltage protection circuit and an attenuator (or pot).

If you are using a speaker connection I can help you with that.

Your AREF connections also look "strange". AREF is not an output... It doesn't supply voltage. If you are actually using a separate reference less than 5V, then what you have is OK.

I'm sorry I misspoke. It's actually not line level. It is unbalanced stereo. I'm assuming electrically it's the same.
Clearly, I must have got some information mixed up regarding audio signal voltage. I guess what I was getting at was that I didn't understand why the voltage going to the resistors was higher and warranted the anode. Is it because the board is 5v?

It's what I have on hand. No stores in the area that sell this type of stuff unfortunately. I mistakenly bought a kit of electrolytic capacitors on Amazon without realizing there were different aspects to consider beyond the Farad rating. Ordered another kit of ceramics but it won't be here for another couple days and I'm trying to get this knocked out today if possible.

I will be using the headphone output from my audio interface that goes to the 1/4" audio jack. Unbalanced stereo. I misspoke when I said it was line level. Should function the same I believe, but correct me if I'm wrong.

I believe the AREF connections are correct. From how I understand it, the AREF is set to internal in the code in order to get more resolution steps on the VU meter. I'm VERY new to arduino and circuits/electrical components in general but the guy who designed it seems to be pretty experienced/knowledgeable. His video explains it better than I could: https://www.youtube.com/watch?v=Nhc9MvOH0Gs&ab_channel=ScottMarley

At the risk of being redundant, you're saying as long as the AREF is used properly that the polarity of C1-4 in the schematics I posted a couple replies up is going to be alright?

Looks OK to me. But you should not be drawing current from AREF, as previously suggested.

Here is what the processor data sheet says:

ADC Voltage Reference
The reference voltage for the ADC (VREF) indicates the conversion range for the ADC. Single
ended channels that exceed VREF will result in codes close to 0x3FF. VREF can be selected as
either AVCC, internal 1.1V reference, or external AREF pin.
AVCC is connected to the ADC through a passive switch. The internal 1.1V reference is generated
from the internal bandgap reference (VBG) through an internal amplifier. In either case, the
external AREF pin is directly connected to the ADC, and the reference voltage can be made
more immune to noise by connecting a capacitor between the AREF pin and ground. VREF can
also be measured at the AREF pin with a high impedance voltmeter. Note that VREF is a high
impedance source, and only a capacitive load should be connected in a system.
If the user has a fixed voltage source connected to the AREF pin, the user may not use the other
reference voltage options in the application, as they will be shorted to the external voltage. If no
external voltage is applied to the AREF pin, the user may switch between AVCC and 1.1V as reference
selection. The first ADC conversion result after switching reference voltage source may
be inaccurate, and the user is advised to discard this result.

Hmm ok. From what I can tell, there is no current being drawn from AREF since, as I understand it, pots don't draw current. Please correct me if I'm wrong. Here's the breadboard diagram that the guy offers:

Of course pots draw current. If AREF = 5V, the current through each pot is 5V/20K = 0.25 mA.

But in any case, the data sheet is absolutely clear: Either use AREF as an INPUT (being very careful to disconnect internal references first), or at most, put a small capacitor from the AREF to GND to reduce ADC noise.

Scott Marley is clearly inexperienced, and you should avoid his "designs", or at least correct the errors. Connect those pots to 5V, if you are using 5V as AREF.

Ugh, I just saw the Fritzing idiot diagram. He draws current from the 1.1V reference.

Really, really bad idea.

You're showing
LED1, LED2 VDD connected to GND and VSS connected to +5V.
That will not work so good.

Another "Scott Marley special feature"?

A minor point, but please make sure D3 (attached to Key1 input) is set to INPUT_PULLUP, otherwise it will be floating and may give erroneous readings.

Could you elaborate a little bit? Sorry very new to everything here just trying to soak it all in.

AREF is 1.1V set to internal. In my build I planned to use 50k pots. Again, however, I'm a beginner and he probably explains it better in his video than I could. Skip to 2:57 for a quick explanation.

I understand you're just backing what the documentation says, and obviously I can't argue with that, but there's lots of people in the comments who have done this project successfully so I'm just not sure where the disconnect lies and why it works consistently if this is so flawed.

Not sure why you're attacking this guy that's not even here to defend himself. His youtube channel is a goldmine of cool LED projects using arduino and he takes the time to provide a ton of information, schematics, and code to people such as myself for free. Putting his name in the search bar on this forum and I can see I'm not the first one to try one of his projects. Obviously I don't know enough to understand exactly why he might be wrong/right, or why he's doing something in a certain way that might not make sense. But I do know enough about people to understand needless criticism.

I sincerely appreciate you helping me out and taking the time to give me advice, but the negativity is unnecessary.

Will do, thanks!

What you have shown is exactly the wrong way round. The + of the capacitor must always be connected towards the driving voltage, which in this case is the audio jack. The schematic is drawn unconventionally in that normally inputs are on the left and outputs are on the right. This schematic is drawn against this convention.

The + of the capacitor must be connected to the + of the supply. If this is reversed then your capacitors can explode.

The input capacitor C1 will only experience a small voltage across it because, as you say, it is passing an AC signal.

Basically because to underline to you that he is an idiot. He might have "cool" projects but he knows little about what he is doing.

Sure you can try them but they will slowly degrade the Arduino and it will die a lot sooner than it otherwise would.

So you think it is fine to allow idiots like this to go unchallenged? You think it is fine to let someone put out a project that damages other people's hardware?

Sadly the internet is full of people who have an inflated idea of there own ability. For an other example of this sort of behaviour just look at 95% of electronics on the Instructables web site.

The big problem is there is no review of work, just eager beginners willing to lap things up. Here most of the people giving advice have worked in the electronics industry and know what they are talking about. If someone posts bad advice then they are sure to be challenged.

No it is not. He is massaging his ego like a big kid in a playground. There is not a lot we can do about it short of spending several lifetimes watching low information content videos to find mistakes. Look how others on this thread all agree what he is doing is, let's say less than optimal.

That is why we have to tell you, in no uncertain terms, why his projects must be corrected or avoided.