Home Raspberry Pi Sensors Beginner'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 in style with crypto-currency

SATA HAT

Add an SSD to Raspberry Pi 4 and turn it into a super-cooled NAS drive.

More HATs

Argon One

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO

More cases on

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.

Free wireless doorbell (Amazon Dash button hack)

0
The most terrifying situation I can imagine* is missing a parcel

Raspberry Pi NAS: (NAS-pi) Modding like a boss #part2

0
Plex and RAID1 NAS drive build log

MagPi – auto-downloader

0
Grab each edition of Mag Pi as soon as possible!

HOW TO...

How to boot Raspberry Pi 4 from USB

0
How to set up and boot Raspberry Pi 4 from USB drive - headless guide.

Raspberry Pi Zero, Raspberry Pi 3A+ WiFi without keyboard or cables

0
Getting Raspberry Pi boards connected in seconds

Everything you need to start using JSON

0
It's JSON not Jason, just saying!

How to use Join App in NodeRED

0
The day finally comes where Join app is almost everywhere!

Driving LCD with Arduino and Raspberry Pi

0
Displaying things on an LCD screen is as easy as going through a cup of jellybeans while writing this tutorial!