AVR mA HELP!

I am super excited about getting a arduino mega very soon, so I started programming and making a design for a sythesizer before I even have one, lol. Then I wondered if you needed to put resistors on a speaker. I looked it up and came across this in the fourm: http://arduino.cc/forum/index.php/topic,53651.0.html.

They say that you only want about 30mA of current to go to a AVR pin or else you will brake your controller. So would I have to put a 200 ohm resistor on anything I hook up to it. I have seen lots of people hook up pots directly to them with no separate resistor. I know that a pot is a variable resistor, but if it is turned all the way down won't all that current go strait to ground and tear up the arduino?

If you could explain it to me it would be greatly appreciated!

Thanks,
Manny_Bee

I think you may be confusing output (speaker) with input (pot)

AWOL:
I think you may be confusing output (speaker) with input (pot)

I see what your saying, but it will still output the same amount of current won't it?

A pot is typically wired across the supply and ground.
Say the pot is 10k, supply is 5V.
Current through the pot is 0.5mA.

A small speaker is typically 8 ohms.

You can do the rest of the arithmetic

Manny_Bee:

AWOL:
I think you may be confusing output (speaker) with input (pot)

I see what your saying, but it will still output the same amount of current won't it?

What you wire to a output pin determines how much current will be drawn from the output pin. You have to control that, the output pin cannot self protect itself from drawing too much current. If wired to a 8 ohm speaker that will represent too much of a current draw and why a series current limiting resistor is required. That will however lower the volume that the speaker can provide. When wanting audio sound from a speaker it's always better to plan on using a audio amplifier sized to the speaker and the volume you desire.

Input pins don't draw current so current limiting resistors are not required, however pull-up or pull-down resistors on input pins are often required, for instance when wiring to button switches.

Lefty

On a 10k pot, is the resistance always 10k? I thought that was the highest it would resist and you could set it lower by turning the knob. Is that true?

On a 10k pot, is the resistance always 10k?

Yes; you may be confusing a potentiometer (three terminals) with a variable resistor (two terminals) - you can make a variable resistor out of a pot, but that is not how you would normally wire one to an Arduino.

Manny_Bee:
On a 10k pot, is the resistance always 10k? I thought that was the highest it would resist and you could set it lower by turning the knob. Is that true?

Depends how you wire and use the pot. If wired as a typical voltage divider supplying a high input impedenace load like a analog input pin, then the current draw from the +5vdc will be consistant (5 volts / 10,000 ohm) amount regardless of pot's wiper position.

AWOL:

On a 10k pot, is the resistance always 10k?

Yes; you may be confusing a potentiometer (three terminals) with a variable resistor (two terminals) - you can make a variable resistor out of a pot, but that is not how you would normally wire one to an Arduino.

I think I get it, so when you turn the knob does it slowly move the current from ground to analog out?

No, the current flows through the pot.
The input impedance of an analogue input is in the order of tens of megaohms - the current is negligible.

but thats a measure of how much current is being resisted. Isn't it?

Yes, and the more is resists, the lower the current.

So when you turn the knob what changes..nothing?

The voltage on the wiper terminal.

Manny_Bee:
So when you turn the knob what changes..nothing?

The voltage changes as measured from the pot's wiper to ground, anywhere from 0 to +5vdc depending on the wipers position.

You need to start with learning the basics, fundamental DC theory, ohms law, etc.
Otherwise you will just be memorizing 'rules' and copying examples, not truly understanding basic electronics theory and then applying it in practice.

Lefty

Ok.I do know ohms law...I guess I will learn some DC theory then. Thanks for helping.

I do know ohms law

Maybe a little revision is in order.