Tutorials

Electronics Fundamentals: Hey Mr Ohm

last updated: 14/10/18

Beginning with this chapter we will come across many "Just do it" tasks. These tasks have to be carried out and have to be documented thoroughly! Your marks will depend on the documentation!

Introduction

Without current no fun or as the German says "Ohne Strom nix los". If our batteries are empty the rover is virtually scrap. But what really powers the rover? What is electricity or energy and what is a current or a voltage? We will try step by step to elude or refresh the basics.

Wikipedia:

Electricity is the set of physical phenomena associated with the presence and motion of electric charge.

So let's beginn with the electrical charge to warm up:

Electric charge (wiki)

In atoms we have electrons and protons, both hosting an electric charge. Neutrons have no charge. The electric charge is like mass a physical property of matter. It is difficult to explain what a charge or electricity really is. It is only possible to observe the effects and prove their existence by this effects.

The smallest unit of the charge called "elementary charge e" is very small, about 1.602×10−19 coulombs.

The symbol for the charge is often Q or q; the SI unit is the coulomb C or ampere-second As (ampere times second)

q = 1.602×10−19 C

The charge of an electron is by convention negative −e and that of a proton positive +e.

Unmoving electric charges create an electric field. Moving electric charges create an electric field and a magnetic field, called an electromagnetic field! If we bring a charge in an electromagnetic field an electromagnetic force is generated, which is one of the four fundamental forces in physics. Equal charges repel. Positive and negative charges attract each other.

Voltage (wiki)

Song of this chapter: AC/DC > T.N.T > High Voltage.

Enough theory: Look at your batteries, Remove them from the battery holder and read what's written on it. We have 4 alkaline AA or Mignon batteries with 1.5V each.

V stands for Volt, and is the SI unit of the voltage. U is the symbol for voltage (sometimes also V).

U = 1.5V

The voltage is the cause and can exist on it's own. When we switch the rover on, there will be a current, flowing through the circuit. The current arises only after pressing the switch and is the effect.

AC/DC

No Australian rock band ;).
A battery is a Direct Current DC power supply. The electric current generated by the battery only flows in one direction. The voltage does not change his direction.
The voltage and the current in Alternating Current AC circuits change direction periodically.

Measuring the voltages

On the batterie we noticed U = 1.5V.

Let's control if this is true. For this we use a voltmeter to measure the voltage between two points. Because we also want to measure other physical quantities we use a digital multimeter (DMM) which combines a multirange voltmeter, ammeter and ohmmeter.

To draw circuit diagrams, we need normed symbols. We will use DIN EN 60617-2 (IEC 60617-2).

Symbol for a voltmeter in a circuit diagram:

symbol voltmeter

The multimeter has a red and a black lead (cable). The leads have normally pointed probes and 4mm shrouded banana plugs (connector). To use the multimeter as voltmeter the red lead is connected to the banana jack with the V-sign and the black lead to the common socket mostly marked with COM. Turn the rotary switch to the position or V-. We are measuring DC voltage!

voltmeter battery volts

Voltage is the difference in electric potential between two points.

The two different potential of our battery are marked with plus (+) and minus (-). By convention we use the red lead for positive potential and the black (sometimes blue or brown) lead for the negative lead.

Symbol for a battery in a circuit diagram:

symbol battery 1 cellsymbol battery 3 cells

A voltmeter is always connected in parallel with a device to measure its voltage.

"Just do it" Ohm 1:

A new battery has a voltage of about 1.6V, an old battery a voltage of about 1.25V.

Our AA alkaline battery is only one cell composed of an anode, a cathode and an electrolyte. In a battery the electrolyte can be liquid (often a type of acid) or solid (called wet cell or dry cell). The anode reacts with the electrolyte to produce electrons (-). The cathode reacts with the electrolyte and takes electrons (+).

"Just do it" Ohm 2:

lemon battery

Potential (wiki)

As stated above, voltage is the difference in electric potential between two points in a system. At our battery the two points are the anode and the cathode. The anode has an excess on electrons (-) and the cathode has a lack of electrons (+).

For the potential we use the lowercase Greek letter phi φ.

To measure voltages we need a common reference potential. For our battery we define arbitrary that the negative pole (anode) has a potential of zero:

φanode = 0V

The Greek small letter PHI (φ) is used as symbol for the potential. The SI unit is Volt, the same as for the voltage.

The potential of the cathode is:

φcathode = 1.5V

so we get for our voltage:

Ubattery = φcathode - φanode = 1.5V - 0V = 1.5V


circuit battery 2

We use a blue arrow to visualise the voltage. The arrow is pointing from the positive charge to the negative charge if the voltage is positive.

The common reference potential is often named ground (GND) or earth. Earth is idealized as an infinite source or sink for charge, which can absorb an unlimited amount of current without changing. Earth is an arbitrary point to which potential of wiring things are rated. Even if our negative pole is now not connected with earth it is our reference.

It's similar to why we use sea level to measure height. The choice of our reference is deliberate! We could also use the earth's core instead sea level, so the mount Everest would be about 6379 km in height!!


water analogy 1

To explain the potential, we can use the water analogy. The image shows two batteries with different potential. In our analogy these are different heights of our water level for the two tanks, witch gives the two water tanks different potential energy and thus different pressure. The pressure is directly proportional to the height (p = ρ·g·h; pressure = density of the liquid·gravity·height).

The pressure corresponds to the voltage in our water analogy.

It’s the pressure pushing the electrons (charge) through a material.

The pressure acts on the closed water taps (infinite resistance), but there is no water flow.

Back to our batteries!

"Just do it" Ohm 3:

The batteries are connected in series, to get a higher voltage. The motors need a minimum of 3V to rotate and 6V for full power.

As stated above, the choice of our reference is deliberate!


circuit battery 3

Normally our voltage arrows point to earth. If we change the direction of our voltage arrow from a negative potential to a positive potential, the voltage gets negative.

"Just do it" Ohm 4:

Current (wiki)

Song of this chapter: Blue Man Group > The Complex > The Current.

Surly you want to open the two water tabs :). They act here like a switches (fully open or fully closed). Here is the result:


water analogy 2

The water is flowing. Inside the battery the pressure (voltage) is maintained by chemical redox reactions. A water pump visualises these reactions. In the second battery these reactions are weaker because the battery is nearly empty. The water tabs are fully open. Because of less pressure the flow is weaker for the second battery.

Back to electricity:

The water flow corresponds to the current in our water analogy.

An electric current is a flow of electric charge.

As stated in the wiki: In electric circuits this charge is often carried by moving electrons in a wire. It can also be carried by ions in an electrolyte, or by both ions and electrons such as in an ionised gas (plasma).

Even if we talk about the flow of electrons, its is sufficient that the electron nudges its neighbour electron a little amount, who will nudge its next neighbour and so on until an electron reaches the device to power it. The long chain of momentum transfers between mobile charge carriers is explained by the Drude model.

Electric current cause heating (light bulbs) and creates magnetic fields (motors).

The symbol for the current is I, the SI unit is the base unit ampere A.

In our analogy a water tube stands for the wire. The wire is normally a metal and though a very good electrical conductor. The chemical bonds (for metals metallic bonding) explain the conductivity of metals. The electrons in a metal can easily change from one energy state into a slightly different one. They become delocalized and are forming a sea of free electrons that can be moved by an electric field.

If a wire is connected to the two terminals of a battery (DC voltage) we get an electric field across the conductor. The free electrons of the conductor are forced to drift toward the positive terminal under the influence of this field. So we get steady flow of charge (electrons) through a surface (cross section area) in the wire.

The current through a wire is the electric charge transferred through the surface (amount of electrons) over a period of time.

I = Q/t [A]=[C]/[s]

More generally:

I = dQ/dt

A weird convention

In a wire the moving charged particles (charge carriers) are the negatively charged electrons. In e.g. semiconductors, the charge carriers can be positive or negative, depending on the dopant used. Positive and negative charge carriers may even be present at the same time, as happens in an electrolyte in our battery. A flow of positive charges gives the same electric current as an equal flow of negative charges in the opposite direction. A convention is needed for the direction of current that is independent of the type of charge carriers

The direction of conventional current is arbitrarily defined as the same direction as positive charges flow.

Weird is the convention, because we often think in "electrons" as charge carriers. The electrons flow in the opposite direction of the conventional current flow in an electrical circuit!

We use a red arrow to visualise the current. The arrow points from + to - in a consumer load and from - to + in a generator (producer of energy like our battery).

If the current flows in the opposite direction, the current has a negative value.

When analysing a circuit, the direction of current through a circuit element is not always known. The current direction is assigned arbitrarily (often towards ground). When the circuit is solved, a negative value means that the actual direction of current through the circuit element is opposite that of the chosen reference direction.

Switching the current

We mounted and connected a simple on-off switch to our rover. It switches the positive wire of the battery holder, meaning it can interrupt the current to the motors and microcontroller. A closed switch has practically no resistance and the current can pass. An open switch interrupts the wire. The air gap between the poles gas a very high resistance and the passing current is nearly zero. A switch removes or restores the conducting path in a circuit when operated.

The used switch is a closer (SPST-NO: Single pole, single throw, normally open). The two terminals are normally disconnected (open) and are closed when the switch is activated.

Symbol for a switch in a circuit diagram:

symbol switch

Measuring the current

Electric current is measured with the ammeter (not amperemeter!).

An ammeter is always connected in series with the circuit, because the current has to flow through the ammeter.

Symbol for an ammeter in a circuit diagram:

symbol ammeter

To use the multimeter as ammeter the black lead stays in the common socket (COM). The red lead is connected to a banana jack with the A-sign.
There are two jacks for two different measuring ranges. The lower range is often 400mA (0.4A) and marked with 'mA'. Usually we don't know if the current will be under this threshold, so we start with the higher range (mostly 10A). The red lead is connected to the 10A jack.

The ammeter has integrated fuses. They prevent damage to the ammeter when the current is to high, so it is important to begin with the higher range and use the lower range only if the current is under 400mA. If the ammeter is not working, check the fuse and possibly replace it.

ammeter

"Just do it" Ohm 5:


circuit ammeter

Resistance (wiki)

As seen above: The voltage is the cause and the current is the effect.
but there must be a third quantity that defines how much current will flow at a certain voltage. The missing link is the resistance R.

As stated in wikipedia:

The electrical resistance of an electrical conductor is a measure of the difficulty to pass an electric current through that conductor.

Electrical resistance shares some conceptual parallels with the notion of mechanical friction.
In the hydraulic analogy, current flowing through a wire (or resistor) is like water flowing through a pipe, and the voltage drop across the wire is like the pressure drop that pushes water through the pipe.
The resistance is proportional to how much pressure is required to achieve a given flow.

Water tabs could be used as variable resistance in the water analogy.

The symbol for the resistance is R, the SI derived unit is the ohm Ω.

Less used than the resistance is it's reciprocal the conductance G with the unit siemens S.

Conductor, insulator and semiconductor

Every material has a resistance. Copper Cu is often used as [conductor](https://en.wikipedia.org/wiki/Electricalconductor) because for the wire we want a very small resistance near zero. On the other hand we need sometimes a very high resistance so very little electric current will flow through it. Air is a good [insulator](https://en.wikipedia.org/wiki/Insulator(electricity)). In our circuit we use the switch to change from insulator to conductor and vis versa. Material with a resistance falling between that of a conductor and an insulator is called [semiconductor](https://en.wikipedia.org/wiki/Semiconductor). A famous semiconductor is Silicon Si. is essential to integrated circuits. All out IoT world (Computer, phones ...) depends on it.

Resistance of a wire

Each wire has a resistance. Wire is also often used to build resistors (next chapter). To calculate the resistance of a wire we need the electrical resistivity or it's reciprocal the conductivity of the material.

The resistivity is a fundamental property of a material that quantifies how strongly a given material opposes the flow of electric current.

The symbol of the resistivity is the Greek letter ρ (rho). The SI unit is ohm-meter (Ω⋅m). The symbol of the conductivity is the the Greek letter σ (sigma), but κ (kappa) (especially in electrical engineering) or γ (gamma) are also used. Its SI unit is siemens per meter (S/m).

κ=1/ρ
ρ=1/κ

Special alloys have high resistivity, so a shorter wire can be used. To get high stability of the resistor, the alloy's temperature coefficient of resistivity and corrosion resistance are important. Look here!

The longer a wire, the higher it's resistance. Resistance R is directly proportional to the length ℓ.

R~ℓ

The thicker a wire (bigger cross section), the lesser it's resistance. Resistance R is inversely proportional to the cross-sectional area of the wire A.

R~1/A

The formula to calculate the resistance is:

R=(ℓ·ρ)/A

or

R=ℓ/(κ·A)

"Just do (calculate) it" Ohm 6:

Resistor (wiki)

Song of this chapter: Yello > Pocket Universe > Resistor.

In electronic circuits we often need a component that implements electrical resistance. Fixed resistors have resistances that are constant and ideally don't change with temperature, time or operating voltage. They are used per example reduce current flow, to divide voltages or to terminate transmission lines. Variable resistors are used to adjust circuit elements (e.g. volume control) or as sensing devices (e.g. NTC heat sensor).

resistors

Symbols for a resistor and a potentiometer (variable resistor) in a circuit diagram:

symbol resistorsymbol potentiometer

If the current through a resistor is too high, it will heat up. So beside the value R of the resistance in the power P in Watt W is an important factor to consider.

Often an electronic color code is used to indicate the values resistors: https://en.wikipedia.org/wiki/Electronic_color_code. Also for there exist prefferred values that are used to produce Resistors:https://en.wikipedia.org/wiki/E_series_of_preferred_numbers.

"Just do it" Ohm 7:

Measuring the resistance

Electric resistance is measured with the ohmmeter.

Today's Ohmmeters have an electronic circuit that passes a constant current (I) through the resistance to measure the voltage (V) across the resistance.

An ohmmeter is always used on components that are not connected to a source!

Symbol for an ohmmeter in a circuit diagram:

symbol ohmmeter

To use the multimeter as ohmmeter the black lead stays in the common socket (COM). The red lead is connected to a banana jack with the -sign.
After choosing the right ohm-range, the leads are connected with both sides of the component, that we want to measure.

ohmmeter

OHM's law (wiki)

Song of this chapter: Kraftwerk > Radio-Aktivität > Ohm Sweet Ohm.

Thanks for the permission to Laura

When R (and G) are constant, voltage and current are directly proportional to each other. This proportionality is called Ohm's law.

ohms law

U=R·I     R=U/I     I=U/R

Voltage is like water pressure pushing the electrons (i.e. charge) through a material with a certain resistance.

Current–voltage characteristic (wiki)

The current–voltage characteristic (I–U curve) of a component is typically represented as a chart or graph and helps to get a very quick overview of the characteristic of a component. The electric current as the depending value (effect) is on the y-axes (vertical) and the voltage (cause) on the x-axes.

As a resistor is linear circuit element (constant) we get a straight line through the origin. If we compare to the mathematical equation of a straight line (see linear equation):

y = m·x + b

we see that b = 0. If we compare with Ohm's Law:

y = m·x     I = (1/R)·U   (I = G·U)

we see that the slope of the line equates 1/R.

The steeper the line the lesser the resistance.

diagram ohm

source: https://www.grund-wissen.de

"Just do it" Ohm 8:

symbol transformer rectifier

"Just do it (with Arduino :))" Ohm 9:

ohm poti

    // iot_jdio_read_pot.ino
    // weigu.lu
    // 10k potentiometer 1->GND 2(wiper)->A0 3->5V  

    const byte WIPER = A0; // A0 (Teensy 2.0 PF0)

    void setup() {
      Serial.begin(38400); // Tools->Serial Monitor
    }

    void loop() {
      int analogValue = analogRead(WIPER); // read the input on analog pin
      float voltage = analogValue*5.0/1024;
      long resistance = (analogValue*10000ul)/1024;
      Serial.print("ADC value: ");
      Serial.print(analogValue);
      Serial.print("\tVoltage: ");
      Serial.print(voltage);
      Serial.print(" V\tResistance: ");
      Serial.print(resistance);
      Serial.println(" Ohm");
      delay(1000);
    }
"Just do it (with Arduino :))" Ohm 10:

just do it Ohm 10


circuit just do it ohm 10

    // iot_jdio_make_diagram.ino    
    // weigu.lu
    // PWM Out on PB6 (Teensy2); voltage out from 0-5V (step 0,2V)
    // measure total voltage and voltage on 100 Ohm resistor (current)

    const byte PWM_Out = 15; // PB6 on Teensy 2.0 (OC1B of Timer1)
    int i = 0;
    long current, voltage;

    void setup() {
      Serial.begin(38400); // Tools -> Serial Monitor  
      delay(1000);
    }

    void loop() {
      if (i>255) {
        i = 0;   
      }
      Serial.print(i);
      Serial.print("\t"); // Tab
      analogWrite(PWM_Out,i); // voltage out
      delay(200);   
      // read voltages on ADC0 (current) and ADC1 (Teensy 2.0 F0, F1)
      current = analogRead(A0); // current
      voltage = analogRead(A1); // total voltage   
      // read 100 values and calculate average for better results
      for (int j=0;j<100;j++) {
        delay(1);
        current = current+analogRead(A0);    
        voltage = voltage+analogRead(A1);
      }
      current = current/100ul;    
      voltage = voltage/100ul;    
      Serial.print(voltage);
      Serial.print("\t");
      Serial.println(current);  
      i = i+10;
    }

just do it Ohm 10