Hardware Hacking & Circuitry: Part 1: Electricity & Energy


(Community & PR manager) #1

Hello 0x00sec! Today, I present you with the first article of my hardware hacking series! This series will start from point 0, assuming that you know absolutely nothing about electricity. If you don’t exactly know what this series is going to be about, please read this.

In this first instalment of the series, I will give you a gentle introduction to what electricity really is and the basis of how it works.

Electricity is a wonderful thing. Our modern world depends on it, yet there is SO much about it that we simply don’t understand. Before we continue in this article, I want all of you to take a minute or two and ask yourself: How would the world look like without electricity? No 0x00sec, no computers, no decent light at night, no self-starting cars, no radio… I think you get the idea, people would get desperate if electricity were to disappear from their daily lives!

Because electricity has such a big influence on us humans, I think it is good for a hacker to know how electronics and electricity work. Because if you can manipulate something that controls the world, you will be able to manipulate the world itself. Okay, maybe this a little bit exaggerated, but you get the idea. Just think about EMP’s and hacking power grids. You can hack a power grid maybe by “conventional” hacking, but you won’t know what to do once inside!

That was the intro on why you should learn electronics. Let’s begin!


Before we start talking about electricity, it is essential to know a few things about energy. From now on, you will view everything around you as energy. Not because of some spiritual bullshit, but because it is a fact. There are many various forms of energy in the world. Here are a few examples:

  • Thermal energy: any type of heat, including the heat from your computer when playing heavy games.

  • Kinetic energy: things that move, like a spinning wheel or a driving car.

  • Potential energy: this is energy that has the potential to release itself. A perfect example would be a stretched bow or a spring under pressure.

  • Chemical energy: This the energy commonly found in minerals (like coal), but can also be found in stuff like batteries. I know the concept of Chemical energy is kinda hard to gasp right now, but things will clear up later.

There are many more types of energy that are self explanatory to what they are, like:

  • Wind energy.
  • Solar energy. (which is nothing more than a combination of thermal and light energy, really.)
  • Light energy.
  • Nuclear or atomic energy.
  • Sound energy.
  • The list goes on…

And of course, we also have the infamous electrical energy. I will now explain how all of these forms of energy relate to electricity, and vice-versa.

Converting Energy

The only way to truly understand the conversion of energy, is by including practical examples.

Everyone who has built a campfire as a kid, knows that wood can fuel fire. Fire is a type of thermal energy. And as we already learned, a material that holds energy (in this case the wood), is considered as chemical energy. So, we can safely say that chemical energy is being converted into thermal and light energy (remember that you can also see a fire, so what you “see” is light energy). There is also a bit of sound energy being converted, but efficiency or “energy loss” is something for later in this article, so let’s forget about it for now and imagine that the only energy being converted is chemical to thermal. So in short:

  • A campfire = chemical energy -> thermal energy

Let’s review another example: that of a car. We know that fuel is a substance that holds energy, so we can classify it as chemical energy. Your car’s engine converts the chemical energy into kinetic energy. Now again, your car engine also makes noise (sound energy) and produces heat (thermal energy), but that is yet again the concept of efficiency, to which we will get later. So in the case of a car, we could say that:

  • A driving car = chemical energy -> kinetic energy

Now for a final example, we will look at a nuclear power plant, and how it converts nuclear energy to the electrical energy we use in our homes. Nuclear energy can not be converted directly to electrical energy, so there are a few steps to be taken. First of all, nuclear energy is converted to thermal energy by splitting atoms (happening at K in the picture):

nuclear energy -> thermal energy.

That thermal energy is then used to turn water to steam (D), and that steam in turn drives a turbine (H).

thermal energy -> kinetic energy.

The spinning turbine is connected to an alternator (L) (an alternator is just a generator that generates alternating current (AC), which we use in our homes. More on that in later articles). This alternator then generates electricity.

kinetic energy -> electrical energy

Note: a power plant based on coal or fossil fuels works in the exact same way, except that the method to obtain thermal energy is different. Instead of splitting atoms, a coal power plant burns coal to obtain thermal energy. (Thanks, cpt. Obvious!).

So, the full conversion is: Nuclear energy -> thermal energy -> kinetic energy -> electrical energy.

Of course, there is much more to it, like transformers and such, but that is for a later article.

So, what is the point of explaining this? Well, it is vital to know that there is a law known as “Conservation of energy”, which states:

The amount of energy in the universe remains constant. Energy can not be created nor can it be destroyed, it can only be converted from one type to the other.

So the only thing we can do is convert energy, not create or destroy it. This is vital to remember, because it brings us to our next point: efficiency.

What is efficiency?

Efficiency simply means the amount of “useful” energy that we get from an initial amount of energy that has been converted.

To put the definition of efficiency into one sentence is quite hard (It took me 5 minutes to come up with above sentence), so I will try to explain things more in-depth:

We now know that energy can only be converted to other forms of energy. One more thing that also must be noted, is that energy can not be converted to only one other form of energy. What this means is that you can’t just burn wood and only have heat, for example. There is also light-energy. The same concept for a car engine: not all of the burned fuel is converted to kinetic energy. The engine also produces sound and heat. But you only want kinetic energy in the case of a car engine! That kinetic energy is known as useful energy. The heat and sound on the other hand is (you guessed it), useless energy. When we add both up with eachother, we get the total energy. So the effeciency formula for everything is this:

Ptotal = Puseful + Puseless

Example: A light bulb with a Ptotal of 60W converts 6W to heat (Puseless). The Puseful is 54W. (60W - 6W = 54W).

Note: the letter “P” is used as the symbol for power or energy.

Molecules & Atoms

As most of you remember from high school, every material is composed of things called “molecules”. A molecule is the smallest part of a material that still contains all the properties of said material. For example, water is made up out of 2 hydrogen molecules and one oxygen molecule. These two molecules define the properties of water.

Every molecule is made up out of the smallest things in the universe: atoms.

Fact: the way molecules are made up is by atoms that are held together by chemical bonds. And these bonds form by the exchange of electrons amongst atoms, making EVERYTHING electricity! Continue reading to figure out why.

An atom consists of 2 main parts: the core, which is called the nucleus. The nucleus is made up out of protons and neutrons. Protons are positively charged particles and commonly bear a “+” symbol in a schematic of an atom. Neutrons are neutrally charged particles, meaning that they aren’t positive or negative. They bear no symbol in a schematic.

Around the nucleus, there are electrons orbiting it. Electrons are negatively charged particles and usually bear a “-” sign when shown in a diagram.

Atoms can carry a charge. This charge is determined by the ratio of protons vs electrons. If there are more protons than electrons, then the atom is positively charged. If there are more electrons than protons, then the atom is negatively charged. Neutrons don’t affect anything when it comes to charge. If the amount of electrons and protons are equal, then the charge is neutral.

The schematic above shows a neutral atom. If you take away one proton, it becomes negative. If you take away one electron, it becomes positive.

Can you keep up so far? Great, let’s move on!

What is electricity?

Now that we know how atoms are made up, we can exactly figure out how electricity works! Remember that atoms can be either positively or negatively charged. Now, when two atoms are charged, one positive and one negative and are connected together by chemical bonds (conductivity), they will try to balance each other out to a neutral state. The electron from the negative atom will move to the positive atom. This flow of electrons is electricity. More specifically, it is called current, with the symbol of “I” and is expressed with the unit “Ampere (A)”.

It is important to note that electrons will always go to the positive atom, and not the opposite. We hardware hackers like to imagine that current goes from + to -. This is called conventional current. Just know that in reality, electrons go from - to +.

The amount of protons in a positive atom and the amount of electrons in a negative electron determine the charge or “pressure” of the electron flow. Basically the bigger the difference in protons/electrons, the bigger the tension. This tension is known as voltage, which has the “U” symbol and uses the unit “Volt V”.


That is it for today folks! Before I end the article, I have some homework for you to do. First of all, I want you to look around your home or wherever you spend your daily life in, and go look around for energy conversions in the real world. This will allow you to see the bigger picture. Comment your results! Example: A car driving by that throws wind in your direction is essentially kinetic energy -> wind energy.

I’m sorry if this article was boring, but I did my best in making it as interesting as possible. But I can not stress it enough how IMPORTANT this knowledge is! We need a very solid foundation before building a skyscraper. The things in this article are REALLY REALLY important to see the bigger picture! And a hacker who can’t see the bigger picture is useless!

Do you have questions or feedback? Comment below, PM me, or hit me up on IRC! Also make me alert of any spelling errors! I wrote this late in the night.

Next time, we will learn about how voltage and current relate to each other, and we will build our first circuit!


Hardware Hacking & Circuitry: Part 3: Magnetism, electromagnetism, and induction
(oaktree) #2

Ah, thermodynamics and such.


This is awesome dude! Can’t wait for Part 2!

(oaktree) #5

LOL @dtm it wouldn’t be right if nobody brought in string theory. @Phoenix750 alluded to the other energy outputs and stated why he omitted them from the fancy arrow key part.

Also, great meme, @n3xUs.

(oaktree) #7

His intention (feel free to contrast, @Phoenix750) was to avoid confusion.


cant wait for part two!!

(Community & PR manager) #10

The way you put stuff like that mostly depends on personal preference. There is no true rule, really. I just like to put it that way.

String theory is something beyond the scope of EE, so I assume atoms are the smallest things in the universe for this tutorial to keep things simple. Still good to bring it up though. @oaktree was right. I intend to keep things as less confusing as possible because EE can be hard in the beginning.



I understand where you’re coming from but the terms useful and useless aren’t as concrete or meaningful as input and output. It’s like saying some material is strong. What kind of strength does it have? Tensile? Compressive? Torsional?

(Community & PR manager) #12

I meant to give a gentle introduction to efficiency. Ratios are for a later article.


(Command-Line Ninja) #13

I’ve installed Pocket on my phone to read these posts, because they really are like a book, but I can ask the author questions. I’m gonna read this and it’s gonna be so ill.


Great stuff @Phoenix750! Really liked how you laid out the basics in a easy to understand way. :smiley:

(Community & PR manager) #15

Thanks @falcon403! The biggest hurdle I like to overcome is to get rid of the myth that EE is all about complex calculations and formulas. There is SO much more to it!


(Command-Line Ninja) #16

I already knew the basics, although it is nice to look over, there is always something to learn, and I actually learned a lot with it. I think this was very beneficial. Nice job!

(Community & PR manager) #17

This topic was automatically closed after 30 days. New replies are no longer allowed.