Electronic – arduino – Connecting both ends of battery with a resistor is fine

arduinopullup

I recently just started learning about electronics and electricity. After a lot of reading this is my current understanding about a battery. If you buy a battery it is labeled + or – on each end. The + side is just a bunch of atoms with extra electrons(electrons are – but I guess they labeled this side + ?). The – side is a bunch of atoms with missing electrons(protons are + but I guess they labeled this side – ?). So + side of the battery flows to the – side side. Is this correct?

Resistors limits the current/amps but keeps the voltage the same. Correct?

You don't want to connect them together with a wire since there would be too much current flowing through, such that the battery heats up till it explodes or something. So connecting a high ohm resistor between a battery would be fine. Correct?

Can someone also explain to me WHY a voltage divider works? All websites just explain the formula and the circuit.

The main reason I asked these questions was since I was learning about arduino pullup pins. I noticed a voltage divider in the circuit. The digital input pin measures the voltage right? If the voltage is almost 0/ground it returns LOW else HIGH.

Best Answer

Yes, you can put a carefully selected resistor across the terminals of a battery with no ill effects. Key phrase is "carefully selected."

Current may be described in two seemingly opposing ways. You may want to look at is as if the positive charge moves, or if the negative charge moves. If you are talking about current flow in metals, then you are likely thinking that the protons cannot move and therefore any motion of charged particles must be the electrons. In this case, electrons are actually being pushed out of the negative side of the battery and being sucked into the positive.

Many electrical engineers like to think about "conventional current" where the positive charge moves via the absence of electrons thereby creating a traveling hole. In this case, the current moves out of the positive terminal of a battery and enters into the negative.

Resistors are devices that take more voltage to move either the electrons or the holes than a typical wire, thereby allowing an electrical "pressure" (voltage) to be seen across the device when one is applied.

Current is the resulting flow of electrons or holes when you apply an electrical pressure to a conductor (wire) or other device (resistor, semi-conductor, etc...). If you apply a high pressure to a low resistance, you'll get a high flow. If you apply lower pressure you'll get a lower flow. If you use a higher resistance, you'll also get a lower flow.

All of this follows a set of rules known as Ohms Law which states, Voltage is equal to current times resistance, in it's most basic form.

An additional detail you should know is that when you apply a voltage to a series circuit, the total of all voltage drops in the circuit must equal the applied voltage and that the voltage across any element of the circuit will be equal to the resistance of that element times the current flowing through that element. Think of current as an incompressible fluid. It must be the same in all series components of the circuit. If you know the voltage on the circuit, and you know the value of each resistance, you can add all the resistances to get the total resistance. Now you can calculate the current in the circuit using Ohms law (V/R). Then you can calculate the voltage across each resistive element by multiplying that current by each resistance.

I highly recommend investing in "Getting Started in Electronics" by Forrest M. Mims III. I had the first edition RadioShack version when I was 12, and it was one of my favorite books. As the other folks are trying to suggest, you need to understand how to apply Ohms law in order to calculate the proper values for current limiting resistors or even pull-ups. And there are a couple other details that you might want to know as well when you are driving the gate of a MOSFET.

One of the things that would also be useful, is to draw a schematic of what you are thinking about doing with your components and let the folks make suggestions about how to improve the circuit. If you are limited to "components on hand," Let everyone know which components you have to work with. This site has a schematic drawing feature that should allow you to post basic circuit ideas. Why don't you give that a try?