Before we begin, I'll explain some of the basic electronic components. If you only just started with electronics, this is for you!
Sometimes I'll use some physics to explain how a certain component works, this is just a side note, it doesn't really matter if you don't understand this yet. It'll take some time to get used to.
If you want to go further into electronics, however, you'll find out that electronics is just applied physics.
I also provided some links to videos on YouTube that helped me understand the basic principles of the different components.
Electricity is the flow of electric charge carriers: electrons (in most cases).
Electrons are the negatively charged particles that whirl around the positively charged nucleus (core, plural: nuclei) of an atom.
Electrons can move easily through metals, like copper, silver, gold... We call these materials conductors.
These materials have freely moving electrons.
Materials like plastic, wood, glass, air... don't conduct electricity very well. They are called insulators.
They don't have moving electrons or other charge carriers.
A piece of material that has more negative charges (electrons) than positive ones (nuclei with positive protons), is negatively charged.
A piece of material that has less negative charges than positive ones, is positively charged.
(Note that only the electrons can move, the positive nuclei are stuck in a grid.)
Just like magnets, opposite charges attract each other: when you have one piece of material that has more electrons, and one piece that has less electrons, the electrons in the negative piece will be attracted to the positive piece. If there's a conductor in between these pieces, these electrons will 'flow' to the positive part: This is electric current.
Current expresses the amount of charges that flow through a conductor per unit of time. Its unit is Amps (Ampère), and is defined as C/s, where C is Coulomb (charge) and s is seconds (time). Its symbol is I.
A battery has a negative side that has more electrons, and a positive side that has fewer electrons. Like I said earlier, the electrons will try to reach the positive side, but they cannot go through the internal circuit of the battery itself. This gives the electrons potential energy. This is the energy that is released as light and heat in a bulb, as motion (kinetic energy) in a motor... The difference in potential energy of a charge at the positive and a charge at the negative side, is called the voltage. The unit is Volts, and is defined as J/C, where J is Joule (SI-unit of energy) and C is Coulomb (SI-unit of charge). This expresses how much energy a certain charge (read: certain amount of electrons) releases.
The symbol for Volts is V or U (from the German word 'Unterschied', difference, and refers to the potential difference).
Power is the amount of energy that is released per unit of time. The SI unit is Watts, and is defined as J/s where J is Joules, and s is seconds. If you multiply current by voltage (C/s ∙ J/C) the C cancels out, so you get J/s. This means that voltage multiplied by current gives you the wattage.
In most schematics, the conventional current flow is used: arrows are drawn from the positive side to the negative side. In practice, however, only electrons can move, so the actual direction of the current flow is from the negative side to the positive side.
Resistors are components with - as the name implies - an electrical resistance, in other words, they limit the flow of electrons, so they are often used to limit the current.
The SI unit of resistance is Ohms, often written as the Greek letter omega (Ω). They are often used with the unit prefixes kilo (k) and mega (M). E.g. 1.2MΩ = 1M2Ω = 1,200kΩ = 1,200,000Ω = 1,200,000E = 1,200,000R. (note that writing a digit after the unit prefix is the same as writing it after the decimal point. Also, in some schematics, E or R are used instead of Ω).
The value of a resistor is indicated by 4 (or 5) colored bands, using the resistor color code:
The first 2 (or 3) bands are the 2 (or 3) first digits of the value, and the 3rd (or 4th) band is the power of ten that comes after those 2 (or 3) digits. This is also called the multiplier, and is just the number of zeros you have to add. The last band is the tolerance, and is mostly silver or gold.
E.g. red red red gold = 22 x 100Ω = 2,200Ω = 22 x 10² Ω = 2k2Ω = 2.2kΩ, with a tolerance of 5%; green blue black brown red = 560 x 10Ω = 5,600Ω = 5k6Ω = 5.6kΩ, with a tolerance of 2%.
The relationship between resistance, voltage and current can be calculated using Ohm's Law.
I = V/R
where I is the current in Amps, V the voltage in Volts, and R the resistance in Ohms.
This is a very, if not the most important formula in electronics, so try to remember it!
A capacitor is an electrical component that can store electrical charge (in the form of electrons).
Although they are fundamentally different, in some ways, it behaves like a small rechargeable battery.
When a voltage is applied to a capacitor, the potential difference (a difference in number of electrons → the side with more electrons has a negative charge, compared to the other side) These electrons can flow out of the capacitor again, when the voltage is no longer applied, just like a battery.
Capacitors are used in filters, for example to filter out the 50/60Hz noise from your power supply, or to filter high frequencies out of your music when you turn on the low-pass filter, or turn the bass and treble knobs on your amplifier. In these cases, the capacitor charges and discharges really quickly.
Another use for the capacitor, is filtering out DC voltage.
The SI unit of capacitance is Farad, or F. This is a very large unit, and most often, you'll see prefixes like pico (p), nano (n) or micro (µ).
On some smaller capacitors, the capacitance is written using a three-digit number. The first two digits are the first two digits of the value, and the third digit is the power of ten to multiply it with. The unit of the value you get is picofarad.
E.g. 104 = 10 x 10⁴ = 100,000 pF = 100 nF = 0.1 µF (= 0.0000001 F)
Larger capacitors, the electrolytic type, (mostly the cylindrical ones) have a polarity, marked by a grey line. If you connect them the wrong way around, they can explode, be careful!
A transistor is a semiconductor device, that is used to switch or amplify a signal. You can think of it as a switch, that can be operated by using a very weak signal, a current controlled switch.
A transistor has three terminals: they are called the base (B), the emitter (E) and the collector (C).
The emitter 'emits' electrons, and they are 'collected' by the collector. The base is used to control this flow of electrons.
If a small current flows from the base to the emitter, a much larger current will flow from the collector to the emitter. How much larger this C-E current is, depends on a constant, specific to the type of transistor. This constant is called the DC current gain, and has the symbol of the Greek letter bèta (β) or Hfe.
E.g. if you have a transistor with β = 100, and your B-E current = 10mA, your C-E current will be 1A.
This principle is used in amplifiers.
Obviously, the transistor cannot keep on amplifying forever: at a certain point, the transistor will just act like a switch: the transistor is now in saturation mode.
There are two types of transistors: NPN and PNP. This has to do with the semiconductors inside.
The difference is the direction in which the current flows, more on this in the examples in the following steps.
Another type of transistor is the MOSFET, acronym for Metal Oxide Semiconductor Field Effect Transistor.
The MOS just stands for the materials it is made of, and FET signifies that the amount of current that is let through is controlled by a field, an electric field, more specifically. Physics tells us, that the higher the voltage, the stronger the electric field, so we can control the current using a voltage, whereas the normal (Bipolar Junction Transistor or BJT) uses current to control the current.
A MOSFET also has three pins: a gate (G), a drain (D) and a source (S).
The source is where the electrons come from, and they flow to the drain. This flow is controlled by the voltage at the gate (and its accompanying electric field). By analogy with the transistor, the gate can be compared to the base, the source to the emitter, and the drain to the collector.
An advantage of a MOSFET over a BJT is the higher efficiency: when fully turned on, a MOSFET has a D-S resistance of a few tens of milliohms. This results in much less power (heat) dissipation when driving high-current loads.
Also, no current flows from the gate to the source.
A disadvantage though, is that you need about 10v on the gate for most MOSFETs to be fully on. This is 2-3 times higher than the voltage of an Arduino output pin, for example.
Just like a transistor, a diode is a semiconductor device. One of the interesting properties of a diode, is that they only conduct electricity in one direction.
For example, Arduino boards have a diode in series with their power input jack, to prevent you from reversing the power, and damaging the chip.
Diodes have a forward voltage drop ranging from 0.5v to 0.7v. This means that if you measure the voltage before the diode, it will be about 600mV higher than after the diode.
Of course, a diode has its limits: if the reverse voltage is too high, it will break, causing it to let current pass in the wrong direction. In some diodes, this is done in a controlled way. These diodes are called zener diodes. They will only conduct if the voltage is higher than a certain value, specific to the zener.
This value is constant, so zener diodes can be used as a reference in voltage regulators.
An LED, acronym for Light Emitting Diode, is like a normal diode, but they emit the energy (that is lost because of their forward voltage drop) as light, instead of heat. Their voltage drop is higher than a normal diode: ranging from 1.2v for an infrared LED, up to 3.5v for blue, white and ultraviolet LEDs.
If the current going through the LED is to high, it will die. To prevent this, a resistor in series is used.
Always do this, otherwise, you'll kill the LED withing a second.
A relay is a mechanical current-controlled switch. It consists of a coil, next to a piece of metal, that is pulled back by a spring. When current flows through the coil, it generates a magnetic field that attracts the piece of metal, and makes a connection.
The advantage is that you can control very high-current or AC loads, and they add virtually no extra resistance.
The disadvantages are that relays are slow, since they have to move physically, they are more fragile, due to the moving parts, and they can create sparks.
(To prevent sparks and interference when switching heavy loads, you should use a snubber circuit.)
Of course there are countless other components you can use in your Arduino projects:
Microphones and speakers: Dynamic microphones have a coil and a magnet to convert the vibrations of the air to electrical signals. Similarly, speakers use a coil that moves in a permanent magnetic field to generate those vibrations, when fed with an AC signal. Electret microphones translate air movement to changes in capacity. Piezo disks convert vibration to voltage, and vice versa, so they can be use as both a mic and a small speaker.
Switches: switches are easy input devices for your Arduino, they exist in all shapes and sizes.
Variable resistors or potentiometers: this is just circular resistive trace, and a wiper, connected to a turning shaft, that changes the resistance as it moves along the trace.
Small versions without a shaft are called trimpots.
ICs and chips: There's an immensely wide variety of ICs available, like voltage regulators, microprocessors, op-amps, amplifiers, logic gates, memory, timers, and so on.
Sensors: You can find a sensor for virtually anything, light sensors, temperature sensors, distance sensors, alcohol sensors, even GPS modules, cameras... Other variants are optointerrupters, reed (magnetic) switches...
Rotary or optical encoders: they convert movement to a series of pulses, like the volume knob in your car, or knob on your microwave oven.
Displays: LCD displays can be used (some with touchscreen), or simple 7-segment LED displays, even small OLED displays are available.
Fans, coils and motors: computer fans, solenoids, DC motors, stepper motors, servos, and so on.
You can power your Arduino from a USB port, but this solution is limited to 5v and only 500mA, so if you want to use things like motors, or things that require a higher voltage, you'll need a power supply.
A benchtop power supply is the best solution, I think: They have current limiting features, adjustable voltages, and they can deliver a lot of power. Most of them also have some convenient 12v and 5v output, besides their adjustable output. But they tend to be quite expensive...
A solution can be a wall-wart adapter, that plugs right into your Arduino. The on-board voltage regulator of the Arduino will step it down to 5v for the chip itself. The regulator can take any voltage between 6v and 12v, according to the specs.
Another great power solution is a computer power supply: they have lots of power, thermal protection, short circuit protection, and deliver the most common voltages (3v3, 5v, 12v). There are loads of Instructables on how to hack an old computer PSU, for example: https://www.instructables.com/id/A-Makers-Guide-to-...
A disadvantage is that the current protection is not sensitive at all, since it is designed for computer components that can draw over 30A or more in total, so your circuit may explode and catch fire, destroying anything that it's connected to, as long as it draws less than the rated current, the PSU will happily keep on supplying power.
Also, the PSU uses really high voltages, inside a metal case, so hacking it isn't without any risks...
You could also build your own power supply of course, but it will probably be cheaper to just buy a decent benchtop power supply.
Power sources for mobile applications can be coin cell batteries, if the circuit doesn't draw a lot of power, or standard AA batteries, a 9v battery, rechargeable Ni-MH or Li-ion batteries, a USB powerbank, or even solar panels.
I use two drawer cabinets to store all small components, and a dozen of other boxes for motors, PCBs, cables etc. Some have small compartments, to store screws, nuts and bolts.
If your Arduino or some other IC or chip came in a shiny plastic bag, don't throw it away! It is probably an antistatic bag, to protect components that are prone to damage due to ESD (ElectroStatic Discharge), use them to store your chips.
Also, most ICs come in a piece of antistatic foam, keep them for storing your chips, it protects them against ESD, and keeps the legs from bending.
The basic tools you'll need are wire cutters and wire strippers, probably some pliers and a set of small screwdrivers. A multimeter comes in handy very often, and if you have two of them, you can measure both voltage and current at the same time, which is a big plus, though not at all necessary.
You'll also need a soldering iron, and some solder, maybe a desoldering pump, to salvage parts from an old PCB.
For prototyping, you'll need a solderless breadboard, and some jumper wires. You could also use thin copper wire with a solid core. Either way, you'll need some wire, I usually buy red, black and white wire, about 10m each. (Red is used for positive, black for negative or ground, and white for 'other things') You'll be surprised of how fast you use it up.
Some perfboard can come handy for permanent circuits.