HomeRaspberry Pi SensorsBeginner's electronics guide Raspberry Pi, Arduino

Beginner’s electronics guide Raspberry Pi, Arduino

Essential electronic knowledge to have to understand circuits better!

This beginner’s guide aims to give you basic knowledge, and understanding of electronic circuits. The Very much-needed thing if you want to explore RPI and Arduino boards. I hope this will give you a great source of information to tackle your projects, and a ground to explore the topic more.

After getting my Arduino board I quickly realized, that some basic knowledge is required for 2 key reasons:

  • to work smart and prevent your components from taking any damage
  • to learn when scripting can be replaced with simple circuitry

The first point goes without thinking, power can cause damage to your chips and modules. You can also use your components to drive the certain behavior of your components. Sometimes clever use or resistors, transistors, and capacitors can be equally effective as writing a python script. And it turns out much cheaper, as the circuit no longer has to be connected to the board itself!

Basics of electricity: A/C vs D/C

For our use, we can simplify this to socket power vs something that would be supplied through your 9V battery, USB port or a charger.
Alternating Current comes in many volts and it is the one to be really careful about! It runs through the wires with usually 50-60Hz frequency alternating the direction of the current. In many cases, you simply don’t want to play with this until you get an actual knowledge of what you want to do.
Direct Current is what we will be dealing with most.  As the name suggests the current flows in a specific direction – from an anode (+) to cathode (- or ground/GND). The anode is a point with the higher voltage available within the circuit and the current flows towards the lowest voltage point (cathode). Your typical power sources are safe to you (USB, battery, charger) as the voltage is nowhere close to cause any harm, but can fry your components!
In both cases, it is important to remember that current will flow using the path of the lower resistance as a default route.  If your design allows current to find an easier way to travel, it will, and it will cause a short-circuit.

The law and order of electricity

There are 3 values we have in mind when talking about currents.  Voltage (V), current (I) and resistance (R). Math on the table:

V=I*R or Ohm’s Law

This is not the most complicated equation but has a very practical use: keeping our equipment alive. Let’s break it down, shall we?

  • Voltage is a value of the differences in energy between the point of the highest voltage (anode +) and lowest (cathode -), expressed in Volts (V)
  • Current is a value that describes how much electricity goes through the circuit in a specific amount of time.  It is expressed in Amps  (A)
  • Resistance is the circuit ability to ‘slow’ down the energy transfer. Often enforced with resistors, it is expressed in Ohms (Ω)

Understanding these statements will allow you to create your own circuits without getting into a situation where you risk your elements being damaged.

Parallel vs serial

Serial vs parallel circuit
Serial vs parallel circuit

To make things even more complicated, playing with the equation above is driven by the design of your circuit. Connecting cables in a specific way will change energy flow.

  • Serial – elements are connected in line, the current has only one way to flow, Components are said to be connected in Series if the same current flows through component.
  • Parallel – elements of the same polarity are connected to one point, the current has multiple ways to travel    Components are said to be connected in Parallel if the same voltage is applied across them.

Kirchhoff’s 1st Law

total current or charge entering a junction or node is exactly equal to the charge leaving the node as it has no other place to go except to leave, as no charge is lost within the node

Kirchhoff’s 2nd Law

in any closed loop network, the total voltage around the loop is equal to the sum of all the voltage drops within the same loop

Depending on the circuit design Voltage and Current values will change based on the way you linked your wires and components.

VoltageCurrent

In serial connections current remains constant, flowing from one to another element (unless such element is designed to reduce current). Voltage is to be reduced passing every element in the circuit.  This is calculated by the formula:

Va+Vb…. +V=0

Voltage in parallel circuit

In a parallel circuit at the node (junction of the wires) value of incoming Current is the same as the value of outgoing one. If we run a wire, and split it into 2 parallel connections, we are essentially dividing current by 2.  4A Current after the node would have 2A values on each wire leaving the junction.Current in parallel circuit

If more incoming wires are attached to the node, the total sum of their corresponding currents is divided by the number of wires exiting the node ie. 2 wires supplying current of 6A each is routed to a node, and 3 wires are leaving the node. The Current of each wire leaving the node would equal to:

(6A+6A)/3 = 4A

Electronic components:

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

M5Paper

Programable, ESP32 based awesome dev platform with 4.7 e-ink display by M5Stack

More HATs

client-image
client-image

Argon One M.2

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO and M.2 SSD support

More cases on

client-image
client-image

Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Slow Internet Warning

0
From time to time my Internet grinds to a stop. Since Raspberry Pi 4 comes with a 1Gbps Ethernet, I decided to take advantage of it and create a reporting system in NodeRED that will monitor and report when the ISP is not keeping the contractual agreements. Works with Alexa, Google Home, Android and Windows 10.

How fast Raspberry Pi NAS is?

0
Let's see how fast Raspberry Pi NAS really is?

Argon18: Argon ONE SSD modification

0
Argon One case just got better - now you can boot it from USB without ruining the design thanks to Argon 18: Argon One SSD modification

HOW TO...

How to boot Raspberry Pi 5 from NVMe M.2 SSD

0
This is how you can boot your Raspberry PI 5 from NVMe in 10 min! Check out these easy instructions

It took me 2 months to boot CM4 from NVMe

0
Complete beginners guide to Compute Module 4 boot from NVMe.

Raspberry Pi Zero 2 W vs other Zero boards

0
It's time to test the Raspberry Pi Zero 2 W against other Raspberry Pi boards from Zero series: power, WiFi, temperature and core performance

C/C++ and MicroPython SDK for Raspberry Pi Pico on Windows

0
A guide to SDK toolchain for Raspberry Pi Pico and C/C++ , Micropython on Windows.

A comprehensive guide to Grafana & InfluxDB

0
How to use Grafana and InfluxDB on Raspberry Pi for IoT sensors in home automation