Published: May 24, 2023, Edited by: Niels Jensen

Basic Electricity and Electronics

Image Description

Basic concepts


You and everything you touch has electric charges (danish: ladning). Invisible forces between these charges drive the biochemistry in our bodies and keep solid objects together. We have learned to control these magical charges, move them along wires and use them to transmit signals or drive motors. Read this introduction if you want to make and understand your own magic devices.

Image Description

Charge comes in two flavours: Positive charges, which are concentrated in the center of atoms and negative charges carried by the electrons orbiting the center. Similar charges repel each other, opposite charges attract. The reason we rarely notice electricity in nature is because the positive and negative charges have already found each other in most places, making everything neutral. The basic idea behind electronics is to peel electrons out of atoms, and then make sure they can only get back by running through clever devices where they work for us.

Analogy: Water

A very good analogy for understanding electricity is water: Imagine two reservoirs, one low in a valley and another further uphill. We can lift water from the lower reservoir to the upper. This costs energy, because we have to fight gravity. If there is a pipe between them we can open the valves and let gravity pull the water back where it came from. Along the way we can put watermills which take energy out of the flow and do useful things like grinding grain or sawing wood.

cc-by Kaunda et al.

This is very close to what we do with electronics: We pull negative charges away from positive charges. This takes energy, because we have to fight the electric attraction. If there is a wire between the charges we can switch a contact and let electric attraction pull the electrons back where they came from. Along the way we can put devices which take energy out of the flow and do useful things like heating food or showing movies.


The first concept we'll introduce is voltage (danish: spænding). In our analogy this corresponds to the height difference between the lakes. Imagine two lakes with a height difference of 5 cm. If you open the channel between them, nothing too dramatic happens. You can set up a water mill, but you'll need a LOT of water to grind your grain because there's so little pressure - almost no energy is released with each liter of water. If the height difference is 100 m, things are different. A thin pipe down from the top lake will have a very high pressure at the bottom, and you can open a valve to let a thin but very strong jet of water run your watermill. Satisfying, but a bit dangerous.

Image Description

You can measure voltage with a multimeter. The voltage of an AA battery is 1.5 Volt. A USB power supply has 5V. These are very safe voltages, it is possible to heat things to the point where they catch fire, but electric shock is not a risk. A 9V battery is also harmless, but try putting the poles on your tongue - you'll clearly feel the metallic electric buzz. The power supply for your laptop is probably around 20V. Up to 48V you can work without too much worry or any special permission, just be ready to put out fire. At higher voltages, beware! The 230V in your power plug is dangerous. On a good day it will give you a whack you'll remember. On a bad day it will kill you.

Interestingly, even electric shocks of 1000s of volt are harmless if they're just short enough, like the shocks you get from a static carpet or a cattle fence. Unpleasant, but harmless.

Zero Volt: Ground

In the example with the two lakes only the height between the lakes matter: The system works the same whether the lakes are at 100 and 200 meter or at 1100 and 1200 meter.

It's the same with voltage: We can measure voltage differences, but it's not obvious what we actually mean when we say "Zero Volt". In a house, the 0V cable (the third leg in a danish plug) is usually coupled to a metal spike plugged into the ground, for this reason we say "Ground" (or "GND" or "G") instead of 0V.

Image Description

Image Description

"Ground" does not mean the same for every device. In planes or cars plugged spikes are impractical, instead the electronics couple to the metal frame, and use that as common ground for all the electronics. This is also done in washing machines, TVs etc. which are only coupled to the ground if they have a three-wire cable plugged in a grounded plug. If you want to connect two electronic devices (say, two [[Arduinos]]) their relative ground levels may fluctuate unless they're in the same power supply. This can cause a lot of weird and frustrating errors. "You can trust your Mama, but you can never trust your ground" as the old saying goes. [[Measure the voltage]] between the two grounds if in doubt.


The second important concept is current (danish: strøm). In the water analogy, that (of course) corresponds to current: How much water passes in a second. In electronics, current tells how much charge passes per second. You can
measure current with a multimeter, it is measured in Ampere (A). Or more often, in milliAmpere (mA) or microAmpere (μA).


The third important concept is power (danish: effekt). It tells how quickly your device converts energy. Energy is measured in Joule, and if a motor consumes 10 Joule every second we say that it consumes 10 Watt. Your oven consumes maybe 2000 W, your TV 100 W, your lamp 20 W.

Some of the power supplies in the lab can show the power in Watt. For a standard 230V device you can get power meter plugs that measure the power, ask to borrow one from the lab. If you're building your own device, the usual way to find the power is to measure the current, which will tell you how much charge is flows per second. The voltage will tell you how much energy each charge has, and so you can find the power by multiplying them. If you measure in Ampere (A) and Volt (V), the result comes out in Watt (W).

Example: You use a standard 5V USB power supply. You measure a current of 300 mA = 0.3 A. Then the power is
5V * 0.3A = 1.5W
The power supply for your laptop may say "Output 20V, 4A". How much power can it supply?

The power consumed by your device may come out as light or movement, but in all cases some of it comes out as heat. If you put a lot of power in a small space, you should consider cooling. Also, if your device gets very hot, it's often a sign that something is not working correctly. Unplug it quickly before it's damaged and look into it.


Water flowing in a channel is slowed down by rubbing against the sides. In the same way, electrons flowing in a wire are slowed by bumping into the atoms. The energy is lost as heat. The water flows more easily through a short wide channel than through a long narrow one. Just the same, electricity flows better through a short thick wire than a long thin one (and some materials are better than others). This is known as electrical resistance (danish: modstand).

For electricity we measure the resistance in Ohm (Ω). In most cases, we want it to be as small as possible so we don't lose energy, but sometimes it's useful to put in a resistor with just the right amount of resistance. The resistance of these components can be read from their colour codes, they're in sorted boxes in Expert Lab. You have a resistor in the bottom of your electric kettle where it converts electric energy to heat. The current flow through a resistor can be calculated using Ohms law.

Alternating current

When building in the lab you'll normally be working with Direct Current (DC) which means that the current always flows in the same direction. Ordinary power plugs are Alternating Current (AC), which means that it flips back and forth 50 times per second. You can still calculate power in the ordinary way, though.

Circuit diagrams

Once you start building electronic devices, you'll quickly run into circuit diagrams, see here for an example. They show where the parts must be connected electrically. If you want to build the circuit, you will then have to decide how to connect them - with a breadboard, by soldering wires or some other way.

It's a good use of your time to learn how to read them for the following reasons:

  • The diagram is often simpler to understand than a picture that shows a tangle of wires and tiny components.
  • Once you understand the diagram of a simple circuit the rest is just more of the same
  • It's an international standard that you only need to learn once

Check out this basic introduction and look up the list of symbols.

Common electronics components


See "resistance" above.


A diode is a component that only lets current flow in one direction. Some diodes are Light Emitting Diodes (LEDs) that give off light when current runs through them.


A potentiometer (short: potmeter) is useful if you want to control your device by turning a knob like a classic volume control. It has three legs. The legs on the left and the right go on two different voltages, typically 0V and 5V. You can now turn the knob to vary the voltage on the middle leg between 0V (full left) to 5V (full right). Get them from the tiny drawers on top of the safe.


A transistor is a component with three legs. The voltage on one leg (gate) controls how much current flows between the other two (base and emitter). There are many different types. Computers are basically large systems of transistors, you have a billion tiny transistors on a thumbnail-sized chip in your phone.